I have a site with somewhat complex shipping needs, and I have not been able to come up with anything using shipping rules to make it work.
Product A ships for 6% of Product A's total only to Canada
Product B ships for 25% of Product B's total only to Canada
These two product types are frequently ordered together.
Currently the Tool Kit is being used to add a surcharge to the basket charges if Product B is in the cart. But, the price of Product B is being included in the shipping calculations in addition to the surcharge.
What I would like to do is to be able to delete the shipping charge and the surcharge from the basket and replace them with a properly calculated single shipping charge, but I'm not having much luck so far. for the moment, I'm just playing with deleting the existing shipping charge and replacing it with the surcharge. When I view the Tokenlist on the OPAY page, it looks correct. The original shipping charge is gone, and the new shipping charge shows. But, on the front end, I'm not seeing the change. Any idea what I'm doing wrong, or alternatively, a better way to go about this?
Product A ships for 6% of Product A's total only to Canada
Product B ships for 25% of Product B's total only to Canada
These two product types are frequently ordered together.
Currently the Tool Kit is being used to add a surcharge to the basket charges if Product B is in the cart. But, the price of Product B is being included in the shipping calculations in addition to the surcharge.
What I would like to do is to be able to delete the shipping charge and the surcharge from the basket and replace them with a properly calculated single shipping charge, but I'm not having much luck so far. for the moment, I'm just playing with deleting the existing shipping charge and replacing it with the surcharge. When I view the Tokenlist on the OPAY page, it looks correct. The original shipping charge is gone, and the new shipping charge shows. But, on the front end, I'm not seeing the change. Any idea what I'm doing wrong, or alternatively, a better way to go about this?
Code:
<mvt:do file="g.Module_Library_DB" name="l.success" value="BasketCharge_Delete_All_Type(g.Basket:basket_id, 'SHIPPING')" /> <mvt:assign name="g.amount" value="glosub(g.hardware_formatted_surcharge,'$','')" /> <mvt:assign name="l.basket_charge:basket_id" value="g.Basket:basket_id" /> <mvt:assign name="l.basket_charge:type" value="'SHIPPING'" /> <mvt:assign name="l.basket_charge:descrip" value="'Shipping: UPS Ground'" /> <mvt:assign name="l.basket_charge:amount" value="g.amount" /> <mvt:assign name="l.basket_charge:disp_amt" value="g.amount" /> <mvt:assign name="l.basket_charge:tax_exempt" value="0" /> <mvt:do file="g.Module_Library_DB" name="l.success" value="BasketCharge_Insert( l.basket_charge )" />
Comment