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 04-19-2021 16:28:43

Murphys001
Member
Registered: 09-06-2014
Posts: 23

Multipe Despatch Options in Checkout Page

Hello,

I use a custom shipping script which calculates a 2nd shipping option depending on if certain criteria is met.
However, no notification exists on the Checkout page about alternative shipping options unless the site visitor scrolls down to Delivery Information section  (3rd box)

To notify the visitor in the Order Totals section (ie 1st box):-
1) Would it be possible to append to the text "Delivery Exc VAT" to indicate that other shipping options are available? or
2) Provide some other form of notification in the Order Totals box?
Any ideas would be appreciated and ideally could the notification be conditional on only if a 2nd shipping option is actually available?

The 2nd shipping option (when applicable) creates a new variable named $shipcost2 and is triggered when variable $2ndoption = true.

I'm a newbie to K9 with limited program skills, so please post any replies on this basis.

Thanks

Last edited by Murphys001 (04-20-2021 08:00:55)

Offline

 

#2 04-21-2021 08:14:10

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

Re: Multipe Despatch Options in Checkout Page

Assuming you're using version 9.0.3 or later, update your custom shipping script, and in the case where you add the second shipping option, use this code to add a notice:

Code:

$shipnotice = 'Please note: A secondary shipping option is available for you to choose.';

$this->globals('core_settings.ecom.checkoutheadermessage',$shipnotice);

The notice will show up at the top of the checkout page whenever shipping is calculated.  So you will notice it shows up upon entry to checkout, and then only when changes are made that affect the shipping calculations (like address changes, item updates, etc).  This should be sufficient for you.


Nick Hendler

Offline

 

#3 04-21-2021 08:32:53

Murphys001
Member
Registered: 09-06-2014
Posts: 23

Re: Multipe Despatch Options in Checkout Page

Nick,

Thanks, that changed worked....

I now have a road carrier ($shipname) option only or a road carrier PLUS postage ($shipname2) options shown at checkout screen.

Code in custom shipping script ends....

if($postage_option == false) {
    $custom = array($shipname => $shipcost);
    } else {
        $shipnotice = 'Please note: A secondary shipping option is available for you to choose.';
        $this->globals('core_settings.ecom.checkoutheadermessage',$shipnotice);   
        $custom = array($shipname => $shipcost, $shipname2 => $shipcost2);
    }
$this->globals('ecom.customship_response',$custom)
?>

Last edited by Murphys001 (04-22-2021 03:03:42)

Offline

 

#4 04-22-2021 09:55:44

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

Re: Multipe Despatch Options in Checkout Page

Perfect!


Nick Hendler

Offline

 

Board footer