Back button in checkout wont go back!

  • Posts: 10
  • Thank you received: 1
11 years 4 months ago #82888

Hi all

Just wondering if someone can help me out!

Added code for a back button in checkout but cant get it to go back to the last step, instead it moves forward. I haven't done a lot of coding in php and have read previous posts but still cant seem to work it out. This is what I have...

<?php
 
    if($this->nextButton){
      echo $this->cart->displayButton(JText::_('HIKA_NEXT'),'next',$this->params,hikashop_completeLink('checkout&task=step&step='.($this->step+1)),'if(hikashopCheckChangeForm(\'order\',\'hikashop_checkout_form\')){ if(hikashopCheckMethods()){ document.getElementById(\'hikashop_validate\').value=1; document.forms[\'hikashop_checkout_form\'].submit();}} return false;','id="hikashop_checkout_next_button"');
 
     echo $this->cart->displayButton(JText::_('HIKA_BACK'),'next',$this->params,hikashop_completeLink('checkout&task=step&step='.($this->step-1)),'','id="hikashop_checkout_previous_button"');
      }
    ?>

Any help would be greatly appreciated :)
Thanks

Last edit: 11 years 4 months ago by lapartera69.

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

  • Posts: 13201
  • Thank you received: 2322
11 years 4 months ago #82912

Hi,

After trying that code, it doesn't work.
You should try:

<input onclick="location.href='<?php $stepb = $this->step-1; echo hikashop_completeLink('checkout&task=step&step='.$stepb.$url_itemid);?>'" type="button" name="Back" value="<?php echo JText::_('HIKA_BACK'); ?>" class="btn button hikashop_cart_input_button" id="hikashop_checkout_previous_button"; />

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

  • Posts: 10
  • Thank you received: 1
11 years 4 months ago #82930

Thanks so much Xavier! It worked a treat :)

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

Time to create page: 0.066 seconds
Powered by Kunena Forum