Forums / General Questions / "Back to Shopping" always goes back to homepage

"Back to Shopping" always goes back to homepage

Locked

Views: 6,788

Results 1 to 20 of 43
This thread is locked. New replies are disabled.
30 Oct 2007, 10:56 AM
#1
possum avatar

possum

New Zenner

Join Date:
Sep 2007
Posts:
58
Plugin Contributions:
0

"Back to Shopping" always goes back to homepage

Hi,

If a user is in the shopping cart and selects "go back to shopping", they are returned to the site's homepage. Is it possible to have them returned to whatever page they were looking at when they added the product to their cart?

I've had feedback from a number of non-technical friends who've said that they find this counter-intuitive.

Thanks in advance for any thoughts you might have,

Possum.

30 Oct 2007, 12:49 PM
#2
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: "Back to Shopping" always goes back to homepage

The behaviour that you want, is what Zen Cart normally does. If it's not doing this for you then there may be a problem with how your site is structured or with php sessions. But it's difficult to say more without seeing your site (and even then it may not be clear).

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

31 Oct 2007, 9:49 AM
#3
possum avatar

possum

New Zenner

Join Date:
Sep 2007
Posts:
58
Plugin Contributions:
0

Re: "Back to Shopping" always goes back to homepage

Hi Kuroi,

Thanks for your answer to (both) my questions!

Here's a link to my website: http://www.possumbooks.com.au

and here's the code that is behind the "back to shopping" icon in the checkout page:

<!--bof shopping cart buttons-->
<div class="buttonRow forward"><a href="http://www.possumbooks.com.au/index.php?main_page=checkout_shipping"><img src="includes/templates/possumbooks/buttons/english/button_checkout.gif" alt="Checkout" title=" Checkout " width="84" height="21" /></a></div>
<div class="buttonRow back"><a href="http://www.possumbooks.com.au/index.php?main_page=index"><img src="includes/templates/possumbooks/buttons/english/button_continue_shopping.gif" alt="Continue Shopping" title=" Continue Shopping " width="132" height="21" /></a></div>

<!--eof shopping cart buttons-->

Any further thoughts would be great!

Cheers,

Possum.

31 Oct 2007, 12:19 PM
#4
possum avatar

possum

New Zenner

Join Date:
Sep 2007
Posts:
58
Plugin Contributions:
0

Re: "Back to Shopping" always goes back to homepage

Hi again,

A bit more experimenting and I have a better idea of what's going on now. When I go to the shopping cart from the product_info page the 'back to shopping' button correctly returns me to the product_info page

When I go to the shopping cart from any of the various product_listing pages, the 'back to shopping' button returns me to the home page. Correctly or incorrectly I don't know, but my personal preference would be to return to the same product_listing.

Possum.

2 Nov 2007, 9:45 PM
#5
possum avatar

possum

New Zenner

Join Date:
Sep 2007
Posts:
58
Plugin Contributions:
0

Re: "Back to Shopping" always goes back to homepage

I've found an answer to this problem.

I updated line 982 of /includes/functions/functions_general.php which read

 if (sizeof($_SESSION['navigation']->path)-2 > 0) {

to

 if (sizeof($_SESSION['navigation']->path)-1 > 0) {

Now I'm returning to the product list from the checkout when I go directly there from the product list page (without going to product info). I haven't found anything that this breaks yet. I'll update this post if I do.

Cheers,

Possum

28 May 2010, 6:50 PM
#6
jacdesigner avatar

jacdesigner

Zen Follower

Join Date:
Jun 2005
Location:
Austin, Texas, US
Posts:
205
Plugin Contributions:
0

Re: "Back to Shopping" always goes back to homepage

I am having this same problem on a recent 1.3.9 site. When you add a product to the cart, visit the cart and click on the Continue Shopping button (back to shop), it takes you to the website index page. We would rather have the default "back" behavior.

We have not modified the default template for the shopping cart page. I checked the template default just in case, and the zencart_back behavior is there.

Does anyone have a suggestion as to why the continue shopping link appears to be directing to the primary domain (thus sending to the homepage)?

Here is the link to the store: http://www.brazoscollection.com/index/index_php

Will the above suggested code work with a newer 1.3.9 site?

This message brought to you by Jac.
Happily developing sites with Zen Cart since 2003.

28 May 2010, 7:04 PM
#7
jacdesigner avatar

jacdesigner

Zen Follower

Join Date:
Jun 2005
Location:
Austin, Texas, US
Posts:
205
Plugin Contributions:
0

Re: "Back to Shopping" always goes back to homepage

A little more information - even weirder - this seems to be intermittent. Most of the time it directs you to the main domain homepage, occassionally after adding several products to the cart it does go back a page. Then if you shop a little more and add something else, the continue link takes you to the homepage again. Not a consistent pattern!

This message brought to you by Jac.
Happily developing sites with Zen Cart since 2003.

28 May 2010, 7:55 PM
#8
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,683
Plugin Contributions:
0

Re: "Back to Shopping" always goes back to homepage

Are you adding the products from the product detail page or from the listing?

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

28 May 2010, 7:57 PM
#9
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,683
Plugin Contributions:
0

Re: "Back to Shopping" always goes back to homepage

Silly question ... why is the shop inside the index directory?

http://www.brazoscollection.com/index/index_php

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

28 May 2010, 8:04 PM
#10
jacdesigner avatar

jacdesigner

Zen Follower

Join Date:
Jun 2005
Location:
Austin, Texas, US
Posts:
205
Plugin Contributions:
0

Re: "Back to Shopping" always goes back to homepage

Kim:

Are you adding the products from the product detail page or from the listing?

Thank you for the reply, Kim. Actually we have tried both, and the same behavior seems to occur.

This message brought to you by Jac.
Happily developing sites with Zen Cart since 2003.

28 May 2010, 8:07 PM
#11
jacdesigner avatar

jacdesigner

Zen Follower

Join Date:
Jun 2005
Location:
Austin, Texas, US
Posts:
205
Plugin Contributions:
0

Re: "Back to Shopping" always goes back to homepage

Kim:

Silly question ... why is the shop inside the index directory?

http://www.brazoscollection.com/index/index_php

Actually I don't think the store is truly inside an /index folder that might just be an issue with the SEO friendly url implementation. When I FTP in I see everything in /htdocs. However, the client did ask for their specific vision of the homepage, which is static and different design per their requirements. So it might have something to do with keeping the homepage separate.

This message brought to you by Jac.
Happily developing sites with Zen Cart since 2003.

11 Jul 2010, 12:28 AM
#12
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: "Back to Shopping" always goes back to homepage

After upgrade to 1.3.9d when at shopping cart page and customer clicks on back to shopping button - it gives them 404 error page!

When I look at links on the page...directs to main_page=page_not_found.

How do I get them to main page or back where they were shopping?
Anything, but page not found!

Thanks, Kim

kburner
Burner Christian Bookstore
https://www.burnerbooks.com

11 Jul 2010, 2:59 PM
#13
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: "Back to Shopping" always goes back to homepage

I cannot reproduce this error ...

What happens if you switch to the Classic Template?

Where were you when you , just before you got to the shopping_cart page?

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!

14 Jul 2010, 4:04 PM
#14
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: "Back to Shopping" always goes back to homepage

I go to individual product page and click add to cart. Then I go to shopping cart page...when at shopping cart page click on left button called back to shopping. It takes me to page not found.

http://www.burnerbooks.com/index.php?main_page=page_not_found

Thanks, Kim

kburner
Burner Christian Bookstore
https://www.burnerbooks.com

14 Jul 2010, 4:15 PM
#15
kuroi avatar

kuroi

Totally Zenned

Join Date:
Apr 2006
Location:
London, UK
Posts:
10,475
Plugin Contributions:
11

Re: "Back to Shopping" always goes back to homepage

Doesn't seem to matter where I wander on your site, when I go to the shopping cart, that button is pre-programmed to always go next to page not found. That's not normal.

Ajeh's question is really important for tracking this down though. What happens if you temporarily switch back to the Classic template.

Kuroi Web Design and Development | Twitter

(Questions answered in the forum only - so that any forum member can benefit - not by personal message)

14 Jul 2010, 7:45 PM
#16
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: "Back to Shopping" always goes back to homepage

kuroi:

Doesn't seem to matter where I wander on your site, when I go to the shopping cart, that button is pre-programmed to always go next to page not found. That's not normal.

Ajeh's question is really important for tracking this down though. What happens if you temporarily switch back to the Classic template.

I switched to classic and when clicked on button takes me back to product I added to cart. It does NOT take me to page not found.

I must have messed up a file somewhere when I upgraded. I just do not know which one.

Kim

kburner
Burner Christian Bookstore
https://www.burnerbooks.com

24 Jul 2010, 11:48 AM
#17
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: "Back to Shopping" always goes back to homepage

I still have this problem. It does not happen with classic template. It must be a file that I did not change over to my template when I did the new upgrade. Does anyone know which file? I can not seem to locate it.

Thanks, Kim

kburner
Burner Christian Bookstore
https://www.burnerbooks.com

29 Jul 2010, 12:40 AM
#18
kburner avatar

kburner

Totally Zenned

Join Date:
Apr 2008
Location:
Flint, Michigan
Posts:
684
Plugin Contributions:
0

Re: "Back to Shopping" always goes back to homepage

kburner:

I still have this problem. It does not happen with classic template. It must be a file that I did not change over to my template when I did the new upgrade. Does anyone know which file? I can not seem to locate it.

Thanks, Kim

Can anyone help? I still do not have this resolved and do not know what file.

kburner
Burner Christian Bookstore
https://www.burnerbooks.com

29 Jul 2010, 12:56 AM
#19
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,683
Plugin Contributions:
0

Re: "Back to Shopping" always goes back to homepage

Kim -

Your site is set up to not go to the shopping cart page after you add something to the cart, correct?

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

29 Jul 2010, 1:01 AM
#20
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,683
Plugin Contributions:
0

Re: "Back to Shopping" always goes back to homepage

I am not sure of the 'why', but if you use the link in the header of your shopping cart sidebox instead of the 'edit cart' link to access the shopping cart page then hit the 'continue shopping' the cart goes to the home page.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.