previous / back button

  • Posts: 38
  • Thank you received: 0
10 years 11 months ago #163079

-- url of the page with the problem -- : tuenni.ch
-- HikaShop version -- : 2.3.1
-- Joomla version -- : 2.5.22
-- PHP version -- : 5.4.4
-- Browser(s) name and version -- : Firefox 30.0
-- Error-message(debug-mod must be tuned on) -- : Error_message

in the checkout process with 3-4 pages, is there a possibility to add a previous button, not just a next button ?
I know, in the checkout bar, there is possible do go back, but it is not intuitive for a regular user.
thanks

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

  • Posts: 83993
  • Thank you received: 13605
  • MODERATOR
10 years 11 months ago #163126

Hi,

Yes that's possible. Here is another thread talking about that:
www.hikashop.com/forum/4-how-to/63243-ad...-checkout-pages.html

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

  • Posts: 38
  • Thank you received: 0
10 years 11 months ago #163232

Hello,

sorry, I search for it in the forum, but didn't find it.

in step after </form> I added

if($this->step!=0){
          echo $this->cart->displayButton(JText::_('HIKA_BACK'),'back',$this->params,hikashop::currentUrl(),'history.back();return false;','id="hikashop_checkout_back_button"');
      }
      ?>

and I changed JText::_('BACK') in JText::_('HIKA_BACK') so it works also in other languages.

wouldn't be good to add this back button in the core Hikashop ? Isn't that a normal thing in a shops ?

By the way, thank you for your your prompt reply! I appreciate it.

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

  • Posts: 38
  • Thank you received: 0
10 years 11 months ago #163237

after more tests of this back button, it doesn't seam to work all the time.

I get "extinguished document"...

I'm trying with replacing
hikashop::currentUrl(),'history.back();return false;'
with
hikashop_completeLink('checkout&task=step&step='.($this->step-1).$url_itemid)
but it doesn''t work yet.

Last edit: 10 years 11 months ago by linpi.

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

  • Posts: 38
  • Thank you received: 0
10 years 11 months ago #163249

so I have a solution that works for me

      if($this->step > 1){
          echo '<a class="hikashop_checkout_back_button" href="' . hikashop_completeLink('checkout&task=step&step='.($this->step-1).$url_itemid) . '">' . JText::_('HIKA_BACK') . '</a>';
      }

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

Time to create page: 0.061 seconds
Powered by Kunena Forum