Zen Cart Logo
Forums / General Questions / A question about zen_back_link

A question about zen_back_link

Locked

Views: 1,526

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
27 Jan 2008, 10:34 PM
#1
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

A question about zen_back_link

I have a page which can be accessed by clicking on a link while viewing a product.
On the page I put a back button using zen_back_link. I was expecting zen_back_link would redirect me to the product page, not quite so. It sends me back to the index page instead. Weird.

Amd I doing something wrong here?

27 Jan 2008, 10:43 PM
#2
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: A question about zen_back_link

That's a problem I've noticed for awhile but not sure where to correct the coding. Even with just the default "Back" code, on some pages it works properly and on some it doesn't. Doesn't seem to be any rhyme or reason to it.

27 Jan 2008, 11:00 PM
#3
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: A question about zen_back_link

yeah, I even tried the set_snapshot to make sure the page is recorded, no luck so far. Maybe a developer can answer this.

28 Jan 2008, 12:33 AM
#4
cjpinder avatar

cjpinder

Totally Zenned

Join Date:
Apr 2007
Location:
Herts. UK
Posts:
893
Plugin Contributions:
0

Re: A question about zen_back_link

There is some information and a possible workaround in the following thread...
http://www.zen-cart.com/forum/showthread.php?t=60902

Regards,
Christian.

28 Jan 2008, 12:40 AM
#5
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: A question about zen_back_link

Thanks Christian,

Tried to flip Admin->Configuration->Layout Settings->Skip 1-product categories from true to false, still the same behavior though. Weird.

28 Jan 2008, 12:52 AM
#6
cjpinder avatar

cjpinder

Totally Zenned

Join Date:
Apr 2007
Location:
Herts. UK
Posts:
893
Plugin Contributions:
0

Re: A question about zen_back_link

I think you have to change...

     if (sizeof($_SESSION['navigation']->path)-2 > 0) {
```...to...
```php
     if (sizeof($_SESSION['navigation']->path)-2 >= 0) {
```...as well as switching off the skip 1-product categories.

Regards,
Christian.
28 Jan 2008, 8:27 PM
#7
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: A question about zen_back_link

Doesnt seem to solve it.
Another thing: if I set navigation snapshot on one page, then use zen_redirect to login page, the user will be redirected back to that page after logging in. If I leave a login link on the page for the user to click on, that does not happen though.