[Skip to main content](#vessel-content)

#   Back button in checkout wont go back!

##

- **[lapartera69](/forum/user/12410-lapartera69 "View lapartera69's Profile")**
- [![lapartera69's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12410-lapartera69 "View lapartera69's Profile") Topic Author
- [ Offline](/forum/user/12410-lapartera69)

Less More

- Posts: 10
- Thank you received: 1
-
-

13 years 10 months ago -  13 years 10 months ago [\#82888](#82888) by [lapartera69](/forum/user/12410-lapartera69 "View lapartera69's Profile")  *[Back button in checkout wont go back!](/forum/2-general-talk-about-hikashop/76925-back-button-in-checkout-wont-go-back#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...  Any help would be greatly appreciated :) Thanks")* was created by *[lapartera69](/forum/user/12410-lapartera69 "View lapartera69's Profile")*

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...
Code:

&lt;?php if($this-&gt;nextButton){ echo $this-&gt;cart-&gt;displayButton(JText::_('HIKA_NEXT'),'next',$this-&gt;params,hikashop_completeLink('checkout&amp;task=step&amp;step='.($this-&gt;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-&gt;cart-&gt;displayButton(JText::_('HIKA_BACK'),'next',$this-&gt;params,hikashop_completeLink('checkout&amp;task=step&amp;step='.($this-&gt;step-1)),'','id="hikashop_checkout_previous_button"'); } ?&gt;

Any help would be greatly appreciated ![:)](/media/kunena/emoticons/3.png ":)")
Thanks

Last edit: 13 years 10 months ago by [lapartera69](/forum/user/12410-lapartera69 "View lapartera69's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2OTI1LWJhY2stYnV0dG9uLWluLWNoZWNrb3V0LXdvbnQtZ28tYmFjaz90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

13 years 10 months ago [\#82912](#82912) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Back button in checkout wont go back!](/forum/2-general-talk-about-hikashop/76925-back-button-in-checkout-wont-go-back#82912 "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...  Any help would be greatly appreciated :) Thanks")*

Hi,

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

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

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2OTI1LWJhY2stYnV0dG9uLWluLWNoZWNrb3V0LXdvbnQtZ28tYmFjaz90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[lapartera69](/forum/user/12410-lapartera69 "View lapartera69's Profile")**
- [![lapartera69's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/12410-lapartera69 "View lapartera69's Profile") Topic Author
- [ Offline](/forum/user/12410-lapartera69)

Less More

- Posts: 10
- Thank you received: 1
-
-

13 years 10 months ago [\#82930](#82930) by [lapartera69](/forum/user/12410-lapartera69 "View lapartera69's Profile")  Replied by *[lapartera69](/forum/user/12410-lapartera69 "View lapartera69's Profile")* on topic *[Back button in checkout wont go back!](/forum/2-general-talk-about-hikashop/76925-back-button-in-checkout-wont-go-back#82930 "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...  Any help would be greatly appreciated :) Thanks")*

Thanks so much Xavier! It worked a treat ![:)](/media/kunena/emoticons/3.png ":)")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzc2OTI1LWJhY2stYnV0dG9uLWluLWNoZWNrb3V0LXdvbnQtZ28tYmFjaz90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.050 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
