Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / Code Matters / Bug Reports / [Done v1.3.9b] zenid added to the canonical element if first click is a linked prod

[Done v1.3.9b] zenid added to the canonical element if first click is a linked prod

Locked

Started by djdavedawson on 3 May 2010, 8:28 PM · Views: 2,619

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
3 May 2010, 8:28 PM
#1
djdavedawson avatar

djdavedawson

Zen Follower

Join Date:
Jul 2005
Location:
Orlando, Fl
Posts:
343
Plugin Contributions:
0

Post #1 by djdavedawson

I noticed that, If my first entry point to the store is a product page, then the zen id is added at the end of the canonical element. I tested it a few times by deleting my cookies then pasting the entry link in the address bar.

I don't know if it's a bug worth mentioning.

What do you think ?

Thanks

3 May 2010, 10:02 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,512
Plugin Contributions:
176

Post #2 by drbyte

v1.3.9a / v1.3.9b

djdavedawson:

I noticed that, If my first entry point to the store is a product page, then the zen id is added at the end of the canonical element. I tested it a few times by deleting my cookies then pasting the entry link in the address bar.

To stop that behavior, simply edit init_canonical.php and change the closing ');' on both calls to zen_href_link() from ");" to the following instead:```
, 'NONSSL', false);

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

3 May 2010, 10:42 PM
#3
kuroi avatar

kuroi

Totally Zenned

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

Post #3 by kuroi

I also wouldn't worry too much about it. If Google is your target, they believe that they're very good at spotting session IDs appended to links and taking account of them.

In one blog post they even went so far as to advise site developers not to remove them, basically because they thought they could do it better!

Kuroi Web Design and Development | Twitter

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

6 May 2010, 1:42 PM
#4
djdavedawson avatar

djdavedawson

Zen Follower

Join Date:
Jul 2005
Location:
Orlando, Fl
Posts:
343
Plugin Contributions:
0

Post #4 by djdavedawson

Thank you

This worked

, 'NONSSL', false);
6 May 2010, 3:31 PM
#5
blessisaacola avatar

blessisaacola

Totally Zenned

Join Date:
Feb 2004
Location:
Georgia, USA
Posts:
1,875
Plugin Contributions:
1

Post #5 by blessisaacola

djdavedawson:

Thank you

This worked

, 'NONSSL', false);


Which file do I need to change?  /includes/init_includes/init_canonical.php?

Not sure what I am missing, I don't see where to make the change :(
6 May 2010, 5:05 PM
#6
djdavedawson avatar

djdavedawson

Zen Follower

Join Date:
Jul 2005
Location:
Orlando, Fl
Posts:
343
Plugin Contributions:
0

Post #6 by djdavedawson

Change this:

$canonicalLink = zen_href_link($current_page, 'cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id($_GET['products_id'])) . '&products_id=' . $_GET['products_id']);

To this:

$canonicalLink = zen_href_link($current_page, 'cPath=' . zen_get_generated_category_path_rev(zen_get_products_category_id($_GET['products_id'])) . '&products_id=' . $_GET['products_id'], 'NONSSL', false);