Adding back button

  • Posts: 2
  • Thank you received: 0
9 years 10 months ago #217706

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.4
-- PHP version -- : 5.4.20
-- Browser(s) name and version -- : Firefox 39.0.3

Hi,

I am trying to add a back funktion to the product detail page to get back to the product listing (overview page). unfortunately the good old javascript.history back funktion works though, but not properly if the product listing has more than one pages. so the browser says on whitepage "Document expired". So I need to set a real URL on the back button, but how does this work? Does HIKA not have a proper back-button funktion?

Thanks guys
Kevin

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

  • Posts: 12953
  • Thank you received: 1778
9 years 10 months ago #217717

Hello Kevin,
As it's said on that thread : www.hikashop.com/forum/2-general-talk-ab...on-product-page.html

There is no go back button option in hikashop. However, HikaShop integrates with the breadcrumb module of joomla. So, you could display that breadcrumb module and it would display the tree of categories on the product page. For example, if you look at our demo website on that page www.demo.hikashop.com/index.php?option=c...y_pathway=11&lang=en you can see the breadcrumb module displaying the categories above the product page.

Alternatively, you can also edit the file show of the view product and add such code:
<a href="#" onclick="history.back();return false;">Go back</a>

However, that will return to the previous page which might not be the page where you have the products of the same category (for example, if you access the product page via a link on this forum, pressing that go back button would make you return on that forum, like the back button of your browser).

Hikashop don't have a proper back-button function, so you'll probably have to directly develop it.

Using the breadcrumb can be a solution.

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

  • Posts: 2
  • Thank you received: 0
9 years 10 months ago #217784

Hi Mohamed,
thanks for your answer. At the moment I am trying to solve this with a backlink and the Product-Id $this->element->category_id (if someone is interested)
It sort of works, but it causes problems on other hand, but this will do it for the moment.

Thanks for the breadcrumb idea, this might be a solution, now I have to convince the designer to get rid of the back button :woohoo:

Thank you and cheers
Kevin

Last edit: 9 years 10 months ago by Papermoon.

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

Time to create page: 0.072 seconds
Powered by Kunena Forum