Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Back button in checkout process

Back button in checkout process

Locked

Views: 1,275

Results 1 to 8 of 8
This thread is locked. New replies are disabled.
8 Dec 2009, 7:19 AM
#1
stormieau avatar

stormieau

New Zenner

Join Date:
Nov 2008
Posts:
16
Plugin Contributions:
0

Back button in checkout process

Hi,

I did a search in the forums & FAQs but couldnt come up with an answer for this. Is there a simple way to add a 'back' button in the checkout process? So someone can go back to the previous step if they want?

Using ZenCart 1.3.8a, on linux server, PHP 5.2.6, MySQL.

Thanks for your help,

Raina

8 Dec 2009, 9:07 AM
#2
jcdk avatar

jcdk

Zen Follower

Join Date:
Oct 2009
Location:
Netherlands - NB
Posts:
144
Plugin Contributions:
0

Re: Back button in checkout process

Same request here, any help is apprciated.

8 Dec 2009, 1:10 PM
#3
aliepinieks avatar

aliepinieks

Zen Follower

Join Date:
Jun 2009
Location:
Brisbane, QLD AUS
Posts:
209
Plugin Contributions:
0

Re: Back button in checkout process

i haven't tried this myself (in the shopping cart), however i don't think there's any reason why this shouldn't work.

you could try placing the following php in the location you wish the button to appear...

<?php echo zen_back_link() . zen_image_button(BUTTON_IMAGE_BACK, BUTTON_BACK_ALT) . '</a>'; ?>

andy

ps: don't put the word andy there, it just won't work : )

8 Dec 2009, 2:12 PM
#4
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,604
Plugin Contributions:
0

Re: Back button in checkout process

Silly question - Why do you think you should have a back button during checkout?

8 Dec 2009, 7:56 PM
#5
stormieau avatar

stormieau

New Zenner

Join Date:
Nov 2008
Posts:
16
Plugin Contributions:
0

Re: Back button in checkout process

I don't think I should have one, in fact I've tried to convince the client that we don't need one, but they insist on it .. unfortunately.

Thanks for the help Andy, I will try that today,

Cheers
Raina

8 Dec 2009, 11:22 PM
#6
stormieau avatar

stormieau

New Zenner

Join Date:
Nov 2008
Posts:
16
Plugin Contributions:
0

Re: Back button in checkout process

Andy that sort of works ... but takes me back to the index page instead of the previous page ... any idea how to fix?

Thanks again,
Raina

9 Dec 2009, 11:42 AM
#7
aliepinieks avatar

aliepinieks

Zen Follower

Join Date:
Jun 2009
Location:
Brisbane, QLD AUS
Posts:
209
Plugin Contributions:
0

Re: Back button in checkout process

nice point kim. why drive them away!

i haven't looked at the code that drives this function, but the back button does present odd results when used in places it wasn't designed for.

my only other suggestion (sorry, bit short on time!) is to use the good old js method:

<a href="javascript:history.go(number)">YOUR_BUTTON_OR_TEXT_HERE</a>

where number is the number of pages you wish to traverse...

e.g. <a href="javascript:history.go(-1)">YOUR_BUTTON_OR_TEXT_HERE</a> //Goes back 1 page
e.g. <a href="javascript:history.go(2)">YOUR_BUTTON_OR_TEXT_HERE</a> //Goes forward 2 pages

there are many more uses, check out this link to see what else is possible: http://www.bloggingdeveloper.com/post/JavaScript-History-Object-History-Objects-Methods-and-Properties.aspx

cheers
andy

10 Dec 2009, 1:39 PM
#8
jcdk avatar

jcdk

Zen Follower

Join Date:
Oct 2009
Location:
Netherlands - NB
Posts:
144
Plugin Contributions:
0

Re: Back button in checkout process

cool, thanks!