sephzero Posted March 15, 2011 Share Posted March 15, 2011 Hello, for my e-commerce website i need to choose shipment type based on volume of products and not according to their weight, is this possible to do?Example:i have to ship this 2 productsproduct 1 - 3kg - 1m^3product 2 - 1kg - 0,5m^3the amout of m^3 is 1,5, so i want the user can only choose shipment n.2PS: i'm sorry for my bad english, i'm not so good at it..Thankyou for your answers, cheers Link to comment Share on other sites More sharing options...
Radu Posted March 16, 2011 Share Posted March 16, 2011 it's not possible without modifying core files and database, there is no newbie solution from my point of view.but some general lines:1. add for ps_product a new field called volume, decimal(4,2) 2. modify classes/Product.php to fit the new field volume (check the weight field for instance where it appears and just duplicate the same thing for volume)3. in admin/tabs/AdminProducts.php duplicate what you have for weight for volume (so you can add volume for each product)4. in classes/Carrier.php modify the function getCarriers: loop through the cart items to sum the volume up and depending on the value take out some carriers from the $carriers arraya second solution for points 1-3 is using product features but here you are left with no validation of the volume field (mandatory, integer) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now