SandraE Posted May 6, 2007 Share Posted May 6, 2007 Hello Everyone, I'm modding my shop and I would like to know how to do this. If I put an own image say on the left column that links to a product category, how should the link look like? I've tried to paste say the osCsid in the images clickable link < a href="index.php?cPath=346&osCsid=7698fd54d421558ce2a5ce867e0c4a66" target="self"><img src="images\test.jpg></a> so when the link is clicked I will go to that category. This works fine, but the problem is that if there is anything in the cart it will get lost when clicking on my image. How han have an image linking to some product or category and not loosing the cart session when my image is clicked? Thank You for any advice! Link to comment Share on other sites More sharing options...
usernamenone Posted May 6, 2007 Share Posted May 6, 2007 &osCsid=7698fd54d421558ce2a5ce867e0c4a66 is a sessions ID and should not be used. Try your link with the sessions ID <a href=<?=tep_href_link('product_info.php', 'products_id=346')?>><img src=images/yourimage.gif ></a> Hello Everyone, I'm modding my shop and I would like to know how to do this. If I put an own image say on the left column that links to a product category, how should the link look like? I've tried to paste say the osCsid in the images clickable link < a href="index.php?cPath=346&osCsid=7698fd54d421558ce2a5ce867e0c4a66" target="self"><img src="images\test.jpg></a> so when the link is clicked I will go to that category. This works fine, but the problem is that if there is anything in the cart it will get lost when clicking on my image. How han have an image linking to some product or category and not loosing the cart session when my image is clicked? Thank You for any advice! Link to comment Share on other sites More sharing options...
SandraE Posted May 6, 2007 Author Share Posted May 6, 2007 &osCsid=7698fd54d421558ce2a5ce867e0c4a66 is a sessions ID and should not be used. Try your link with the sessions ID <a href=<?=tep_href_link('product_info.php', 'products_id=346')?>><img src=images/yourimage.gif ></a> Thanks a lot it worked! Can I ask you how the link would look if I would like the link of my image to point to a category? Link to comment Share on other sites More sharing options...
usernamenone Posted May 6, 2007 Share Posted May 6, 2007 open your browser to the catagorie that you want your link to go to and copy the part of the link link this. cPath=22 This should work for you. change the cpath=22 to the path you see in the browser. a href=<?=tep_href_link('index.php', 'cPath=22')?>><img src=images/yourimage.gif ></a> Link to comment Share on other sites More sharing options...
madcrazygirl Posted May 6, 2007 Share Posted May 6, 2007 I am very interested to see this as i just cannot get the code right for carrying the sessions! How would i for example get it right for the following link please: <a href="http://mysite.com/catalog/index.php/cPath/155?"target=""><img src="http://mysite.com/catalog/images/picture.gif" border="0" alt="checkout" width="150" height="130"></a> Link to comment Share on other sites More sharing options...
usernamenone Posted May 6, 2007 Share Posted May 6, 2007 You are loosing your sessions because you are not using the php code for the link and you are looping back through your web site via the www. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.