I need to calculate the flat shipping rate based on the items/quantity ordered.
Please help.......
Also, I do not see weight.php file in /catalog/extensions/shipping. Could you please let me know how to get this file, in case if i need it
you can base your new shipping method on this contribution http://www.opencart.com/contribution/in ... tion_id/49
change the code that uses subtotal and replace it with some that uses quantity.
change the code that uses subtotal and replace it with some that uses quantity.
There isn't anywhere specific that I can show you but you have some alternatives...
- Look at catalog\controller\cart.php to see how to iterate through the products in the cart. You will see the quantity for each product, you only need to add them up into your own variable.
- Extract the total number of products using your own sql query from the order_info table for the current order reference.
Who is online
Users browsing this forum: No registered users and 1 guest