-
AuthorPosts
-
rud0lph Friend
rud0lph
- Join date:
- January 2012
- Posts:
- 71
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 5
- Thanked:
- 1 times in 1 posts
August 1, 2012 at 5:13 pm #179575I have a navigation problem with the back buttons in my product details page and my shopping cart. They both navigate to the previous page they came from.
The problem arises if a user selects the shopping cart while on the product details page. This will cause a navigation loop between the two pages (product details and shopping cart).
I need one or both of these buttons to always go back to the product list page so the user can navigate freely within the site. Thanks in advance for any help to this problem.
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
rud0lph Friendrud0lph
- Join date:
- January 2012
- Posts:
- 71
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 5
- Thanked:
- 1 times in 1 posts
August 2, 2012 at 1:03 pm #462977Here is the code for the two buttons (‘Back to Shopping’ and ‘Back’):
‘Back to Shopping’
<a class=”btn-backtoshop” href=”/commerce/products/biochef/bioplastic-mixing-bowl”>« Back to shop</a>
This code changes the href statement depending on where the user came from (in above code it’s mixing bowl).‘Back’
<input class=”button” type=”button” onclick=”history.go(-1);” value=”Back”>
This code always goes back to previous page.Based on the code, the user will get in a nav loop between the mixing bowl details page and the shopping cart. I would prefer they both go back to the product page (/commerce/products).
I tried changing the ‘Back’ btn code to use ‘parent.location=/commerce/products/’ and that works, but I haven’t been able to get the ‘Back to Shopping’ btn to always go to the products page.
Hope this info helps to better understand my issue. Also, I checked the demo site and it has the same problem, although it doesn’t use the ‘Back’ button in the product details page.
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
August 3, 2012 at 6:56 am #463036Hi rud0lph,
I have installed a ja tiris demo and checked as following
At the product list page I clicked on a product title to navigate to a product details page, at the product detail page i clicked at the “add to cart” to go to the cart page, here at the cart page I clicked at the “BACK TO SHOP” button and I am seeing it directed me back to the product list page.
Please let me know what I was doing wrong and how can I replicate the problem myself 🙂
rud0lph Friendrud0lph
- Join date:
- January 2012
- Posts:
- 71
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 5
- Thanked:
- 1 times in 1 posts
August 3, 2012 at 1:37 pm #463078Maybe this helps explain…a picture is worth a thousand words:)
Product list page
Product details page
Cart page
Return to product details page, not product list page
There is a nav loop between cart and details.
- Sherlock Friend
Sherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
August 6, 2012 at 2:22 am #463255Hi rud0lph,
I followed exactly those steps you mentioned and at the Cart page when I select “Back to Shop” it directed me back to product list page not the product details page as mentioned.
you could open the file of componentscom_jshoppinglibstatic_config.php there if you find out this line of code
[PHP] $config->cart_back_to_shop = “product”; //product, list, shop[/PHP]change it to
[PHP] $config->cart_back_to_shop = “list”; //product, list, shop[/PHP]I hope that help, if it does not I think that I would need to access into your code for a further checking so please pm me your url, the admin account and the FTP info as well for further checking.
rud0lph Friendrud0lph
- Join date:
- January 2012
- Posts:
- 71
- Downloads:
- 0
- Uploads:
- 15
- Thanks:
- 5
- Thanked:
- 1 times in 1 posts
August 6, 2012 at 3:34 pm #463367The line of code you mention is not in my static_config.php file.
Sherlock FriendSherlock
- Join date:
- September 2014
- Posts:
- 11453
- Downloads:
- 0
- Uploads:
- 88
- Thanks:
- 221
- Thanked:
- 2478 times in 2162 posts
August 7, 2012 at 8:39 am #463457<em>@rud0lph 333279 wrote:</em><blockquote>The line of code you mention is not in my static_config.php file.</blockquote>
That’s strange, if you can pm me the FTP info and the admin account as well I will check it further for you 🙂
AuthorPostsViewing 8 posts - 1 through 8 (of 8 total)This topic contains 8 replies, has 2 voices, and was last updated by Sherlock 12 years, 3 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Jump to forum