Kryptronic Software Support Forum

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.

#1 07-15-2024 05:56:53

west4
Member
From: UK
Registered: 04-16-2008
Posts: 646
Website

Shipping with multi scripts issue

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)


I'd rather have a full bottle in front of me, than a full frontal labotomy.

Offline

 

#2 07-20-2024 14:05:13

dskowron
Member
Registered: 11-26-2008
Posts: 142

Re: Shipping with multi scripts issue

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

 

#3 07-29-2024 08:00:46

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19850
Website

Re: Shipping with multi scripts issue

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.


Nick Hendler

Offline

 

Board footer