I'm setting up the Google shopping feed for a new site and I need to provide a cost for shipping on each item but I can't find any way to get the lowest possible (or any) shipping cost for that item. How can I get this?
1 Answer
It's not possible using the native Store tags to calculate the shipping address for an item before you add it to your cart (because that would require a destination address).
If you need to do this, the best way would be to use the EE query module to query the exp_store_shipping_rules
table and select the correct rate based on the item size/weight and destination country/state. How complicated this is depends on how many shipping rules you have set up and which attributes of the product you are using to calculate rates.
calculate_shipping()
method instore/libraries/store_shipping/store_shipping_default.php
.