You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.
Hi,
If a customer adds two different items to my cart and one of them is "Type 1" I would like the cart to ignore the shipping cost of "Type 1" and only use the shipping script for the other item.
E.G.
Cart: Item TYPE 1 + Item TYPE 2 = shipping from Item TYPE 2 Shipping script only.
If Cart: Item TYPE 1 + Item TYPE 1 = shipping as normal.
So don't calculate shipping for some products if in a mixed product cart, based on the Shipping Script "TYPE 1".
I would like "Shipping Script 1" to only run if there is no other shipping scripts in that Purchase Order, else ignore "Shipping Script 1" and only use the other shipping script.
How do I do this?
Cheers,
Bruce.
Last edited by west4 (07-15-2024 05:57:43)
Offline
Seems to me that you already have the basic pseudocode down for this. I would create one custom shipping script and in it perform the logic necessary to complete the task. You should be able to extract the required information from a global array variable and apply it to the code.
if Item_Count >1 then
run subroutine2
else run subroutine1
Pretty simple, in principle.
Last edited by dskowron (07-20-2024 14:07:46)
Offline
You can use custom data for your inventory items to define the type and check the custom data for the items in your cart using the cart contents. That would be the best way to set and check the product type. You're going to have to point all items to the same shipping script and fork the logic in that script to handle both cases.
Offline