[ic] SpecialSub shipping_callout question
DB
db at m-and-d.com
Wed Feb 6 04:43:21 UTC 2019
> From db at m-and-d.com Tue Feb 5 22:35:39 2019
> From: db at m-and-d.com (DB)
> Date: Tue, 5 Feb 2019 17:35:39 -0500
> Subject: [ic] SpecialSub shipping_callout question
> Message-ID: <688f28c9-9184-977b-d407-43e17266eb2b at M-and-D.com>
>
> I'm trying to add a fixed amount to the shipping calculated at checkout
> if the shipping address is to certain states. Is there a way to access
> the value of the 'state' in the SpecialSub code such as this example:
>
> Sub custom_shipping <<EOS
> sub {
> my ($final, $mode, $opt, $o) = @_;
> $final *= .90 if $Scratch->{dealer} and $mode =~ /UPS/i;
> return $final;
> }
> EOS
> SpecialSub shipping_callout custom_shipping
>
> Thanks!
>
> DB
>
> From peter at pajamian.dhs.org Tue Feb 5 23:39:12 2019
> From: peter at pajamian.dhs.org (Peter)
> Date: Wed, 6 Feb 2019 12:39:12 +1300
> Subject: [ic] SpecialSub shipping_callout question
> In-Reply-To: <688f28c9-9184-977b-d407-43e17266eb2b at M-and-D.com>
> References: <688f28c9-9184-977b-d407-43e17266eb2b at M-and-D.com>
> Message-ID: <0fa8440a-2326-8da8-f42b-336c542ad4da at pajamian.dhs.org>
>
> On 06/02/19 11:35, DB wrote:
>> I'm trying to add a fixed amount to the shipping calculated at checkout
>> if the shipping address is to certain states. Is there a way to access
>> the value of the 'state' in the SpecialSub code such as this example:
>
> Try $Values->{state}
>
>
> Peter
Seems to work - thanks!
DB
More information about the interchange-users
mailing list