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.
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
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:
$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.
Offline
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