Skip to main content

previous / back button

More
12 years 3 months ago #163079 by linpi
previous / back button was created by linpi
-- 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.

More
12 years 3 months ago #163126 by nicolas
Replied by nicolas on topic previous / back button
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.

More
12 years 3 months ago #163232 by linpi
Replied by linpi on topic previous / back button
Hello,

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

in step after </form> I added
Code:
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.

More
12 years 3 months ago - 12 years 3 months ago #163237 by linpi
Replied by linpi on topic previous / back button
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: 12 years 3 months ago by linpi.

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

More
12 years 3 months ago #163249 by linpi
Replied by linpi on topic previous / back button
so I have a solution that works for me
Code:
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.186 seconds
Powered by Kunena Forum