-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Option weights ignored #4
Comments
I think at the time of creating the package, there were no option weights... (I could be wrong) The code in TablerateShippingMethod.php uses the following code to calculate the weight :
So it's probably the product->getWeight function that looks at the standard weight of a product and not the selected option. Perhaps @Mesuva can correct me if I'm wrong ? |
I've had a look at the $product->getWeight() function and it seems to take into account the variation weight ...
I'll try to reproduce your error and debug it as soon as possible (but i'm quite busy atm). |
I think the issue here might be that getTotalWeight($shippableItems) locates the product using $product = StoreProduct::getByID($item['product']['pID']); at this point I think the variation information is lost and the weight of only the main product is returned. |
Got it, these lines need adding at line 267
|
I have the table rates extension working well on a site to deliver different rates per country based on weight.
However this stops working for product options.
For example I have a product option here: https://www.laserphysics.co.uk/store/clinic-products/consumables/laser-ipl-gel for a '4 x 5 L cubitainer'
This is set up as an option with a 20.2kg weight.
The table rate for shipping this to Sweden is £144 but shipping is set at checkout at £65 which is the rate for shipping anything less than 0.5kg (the weight for the base product is set at 0).
It seems that option weights are ignored in the shipping calculation?
The text was updated successfully, but these errors were encountered: