It seems a bit odd to return the shopper from checkout page 2 to checkout page 1 in order to change the separate delivery option.
Also, if your store is setup for UK only zones, and you want to drop the separate shipping checkbox from page 1, or if you have modified OrderScript.pl to skip checkout page 1 entirely (refer to KB article http://community.actinic.com/showthread.php?t=45290), then it makes sense to allow shopper to be able to change the separate delivery address option on page 2.
My solution is to modify how the 'Change' button works. Instead of returning shopper to checkout page 1, checkout page 2 is reloaded with the separate shipping option toggled.
To do this you need to modify OrderScript.pl.
Go to line: 811
and change to:
Save, then do Refresh website (so os00000n.pl is rebuilt).
NOTE: The solution has been tested on v9.01 (IDWA). Needless to say, test fully on a dev server first, unless you're mad as a hat.
BTW, I've also been working on a solution to move delivery address from checkout page 3 to page 2, so it is shown directly below the invoice address.
My client does not want this right now, but if anyone's interested in a solution, let me know, I could be persuaded .
Jon.
Also, if your store is setup for UK only zones, and you want to drop the separate shipping checkbox from page 1, or if you have modified OrderScript.pl to skip checkout page 1 entirely (refer to KB article http://community.actinic.com/showthread.php?t=45290), then it makes sense to allow shopper to be able to change the separate delivery address option on page 2.
My solution is to modify how the 'Change' button works. Instead of returning shopper to checkout page 1, checkout page 2 is reloaded with the separate shipping option toggled.
To do this you need to modify OrderScript.pl.
Go to line: 811
Code:
if($sAction =~ m/$sChangeLocationButton/i) { $::g_nCurrentSequenceNumber = $::STARTSEQUENCE; $eDirection = $::FORWARD; }
Code:
if($sAction =~ m/$sChangeLocationButton/i) { $::g_nCurrentSequenceNumber = 0; # __AI__ Set sequence to page 0, causes reload sequence page 1 (was $::STARTSEQUENCE) $::g_LocationInfo{SEPARATESHIP} = !$::g_LocationInfo{SEPARATESHIP}; # __AI__ Toggle separate shipping $::g_BillContact{'SEPARATE'} = ($::g_LocationInfo{SEPARATESHIP} ne ''); # __AI__ Set separate delivery address flag $eDirection = $::FORWARD; }
NOTE: The solution has been tested on v9.01 (IDWA). Needless to say, test fully on a dev server first, unless you're mad as a hat.
BTW, I've also been working on a solution to move delivery address from checkout page 3 to page 2, so it is shown directly below the invoice address.
My client does not want this right now, but if anyone's interested in a solution, let me know, I could be persuaded .
Jon.
Comment