Announcement

Collapse
No announcement yet.

Modify Shipping Charge in Basket

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Bruce - PhosphorMedia
    replied
    Is the ToolKit added surcharge actually labeled 'SHIPPING' as type (my memory says it defaults to something else).

    (We have a nifty little free tool called Database Viewer -- https://www.phosphormedia.com/product/pm_dbviewer.html -- to actually check whats in the database. Much faster than launching phpMyAdmin.)

    Also, why not just run the ToolKit process AFTER the internal shipping modules do there stuff and instead of inserting as a separate charge, add it to the current charge calculated. So,

    When the customer goes to OSEL, calculate the charges manually, save that value and in the shipping methods array, add that value to each of the relevant shipping options.

    When the customer goes to OPAY, pass that value in and do a BasketChargeDelete, BasketChargeInsert. (BTW: all of this can be done without toolkit.)

    Leave a comment:


  • Leanne
    started a topic Modify Shipping Charge in Basket

    Modify Shipping Charge in Basket

    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?

    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 )" />
Working...
X