Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

cPath=XX and oscsid


tayl1684

Recommended Posts

Hi, Im trying to get some extra buttons for the top of my website (like amazon). Ive coded them into sts_display_output.php, filenames.php, english.php and of course the template. It all works fine except if I try to use a cPath as the link eg index.php?cPath=1. If I try to do this it it seems to format the link wrong

 

with sts

 

meccanoman.co.uk/catalog/index.php?cPath=1?osCsid=5b0811d89ddf6e8feedbb2bc8610f6df

 

 

a normal category link

meccanoman.co.uk/catalog/index.php?cPath=1&osCsid=5b0811d89ddf6e8feedbb2bc8610f6df

 

 

the difference seems to be its using a ? instead of a & after cPath=1

 

The link still works but it dumps the contents of the cart (it presumably looses the session)

 

Any help would be much appreciated as I'm supposed to be going live tommorrow at midnight!!!

 

The website is

Meccanoman

 

Many thanks in advance

 

Ian

 

Sorry I ment to post this in the Simple template system forum. will post again so feel free to delete this one if your an admin

Edited by tayl1684
Link to comment
Share on other sites

a normal category link

meccanoman.co.uk/catalog/index.php?cPath=1&osCsid=5b0811d89ddf6e8feedbb2bc8610f6df

the difference seems to be its using a ? instead of a & after cPath=1

 

The link still works but it dumps the contents of the cart (it presumably looses the session)

The trick is to use the tep_href_link function instead of hard coding it with a ?cPath=1 (then osC will add another ? and that gives you trouble).
Link to comment
Share on other sites

The trick is to use the tep_href_link function instead of hard coding it with a ?cPath=1 (then osC will add another ? and that gives you trouble).

 

I'm having a similar problem: the page that has the product links is the STS template page index.php_0.html so I think I would need to add an include to pass on the tep_href_link value in the html file. How do I add another include to the STS template?

 

On a side note, I tried:

 

product_info.php?products_id=29$sid which does pass on the sid but still dumps everything in the shopping cart.

:(

 

I'm fairly new to php and much more of a designer than a coder, and I don't have any links since I'm testing locally but any help would be greatly appreciated. Thanks!

Link to comment
Share on other sites

I'm having a similar problem: the page that has the product links is the STS template page index.php_0.html so I think I would need to add an include to pass on the tep_href_link value in the html file. How do I add another include to the STS template?
I'm not at all familiar with how STS works, but perhaps the contribution "Embed Link with SID in Description" is what you need?
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...