Back button on the Checkout Steps

  • Posts: 10
  • Thank you received: 0
11 years 2 months ago #118520

I wan't to create a back button because some people don't now how the breadcrum works.

<a href="#" onclick="history.back();return false;">Go back</a>

But is there a other way?

And if it's not how can i get the same button as next?

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
11 years 2 months ago #118534

Hi,

You can probably use the code:

<input type="button" value="Previous" onclick="window.location.href('<?php echo $this->params,hikashop_completeLink('checkout&task=step&step='.($this->step-1)); ?>')"/>
In the view "checkout / step".

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
11 years 2 months ago #118542

the code comes a button but not with the good css and the button don't work

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
11 years 2 months ago #118547

Something like this will probably do the job, you'll just have to add some CSS code to customize it :

<?php if($this->step > 0){ ?>
<a href="<?php echo hikashop_completeLink('checkout&task=step&step='.($this->step-1)); ?>"> BACK </a>
<?php } ?>

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
11 years 2 months ago #118548

When i replace the code (old code) the button disappears?

Last edit: 11 years 2 months ago by pvankrugten.

Please Log in or Create an account to join the conversation.

  • Posts: 26151
  • Thank you received: 4027
  • MODERATOR
11 years 2 months ago #118566

Hi,

Can you please explain using an image what you want exactly for the result ?
I don't understand if you want a button or not.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 10
  • Thank you received: 0
11 years 2 months ago #118574

See picture, i wan't a back button the same is next

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 26151
  • Thank you received: 4027
  • MODERATOR
11 years 2 months ago #118596

Hi,

You can use the code given by Xavier and Mohamed with a little modification

<?php if($this->step > 0){ ?>
<input type="button" value="Previous" onclick="window.location.href = '<?php echo hikashop_completeLink('checkout&task=step&step='.($this->step-1), false, false, true); ?>'; return false;"/>
<?php } ?>
But you have to add a class in the input and change your CSS in order to have the look you want.
You can't use the same class than the next button. The arrow is not display in the same direction.
So it require some customization from your side.

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 91
  • Thank you received: 3
10 years 8 months ago #143240

If you use this, you can also make a value Previous in your language file and get the word Previous in the languages you want.

<?php if($this->step > 0){ ?>
<input type="button" value="<?php echo JText::_('Previous') ?>" onclick="window.location.href = '<?php echo hikashop_completeLink('checkout&task=step&step='.($this->step-1), false, false, true); ?>'; return false;"/>
<?php } ?>

The following user(s) said Thank You: Mohamed Thelji

Please Log in or Create an account to join the conversation.

  • Posts: 12953
  • Thank you received: 1778
10 years 8 months ago #143264

Thanks for your feedback :).

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 1
10 years 1 month ago #174185

Hi there, if you want to stay with the text "Back" and still control the text via the language files, have a look here.....

TOPIC: Add Back Button on Checkout Pages

Please Log in or Create an account to join the conversation.

Time to create page: 0.112 seconds
Powered by Kunena Forum