birchy82 Posted January 25, 2007 Posted January 25, 2007 im using this to link products to categories i put this in the products description: <p><strong><a href="%%+index.php?cPath=21_32_63&osCsid=%%-"><font color="#000066" size="2" face="Arial, Helvetica, sans-serif">Click Here For Posts</font> </a></strong>.</p> works fine on mozilla and netscape but on internet explorer it returns you back to the index page... can anyone give me a hand here with this or is there a contribution that will allow me to link a product to a categorie?
lostndazed Posted January 25, 2007 Posted January 25, 2007 First: Please, please, do NOT use this part of the code in your link! osCsid=%%- Not only is that a security risk for your site, but there have been many weird tales of mixed up shopping carts, etc. All due to people visiting a site with the same Session ID (osC = osCommerce, sid = session id). I'm assuming you are merely using %% as a place holder to hide identity. A % actually means something different in SQL code. OK, now to answer your question: <a href="%%+index.php?cPath=21_32_63&osCsid=%%-"> Try instead using your full domain path: <a href="http://www.domainName.com/index.php?cPath=21"> There is a more osCommerce purist approach, but I'm a tired puppy, and hopefully, this will solve your immediate issue.
birchy82 Posted January 25, 2007 Author Posted January 25, 2007 First: Please, please, do NOT use this part of the code in your link! osCsid=%%- Not only is that a security risk for your site, but there have been many weird tales of mixed up shopping carts, etc. All due to people visiting a site with the same Session ID (osC = osCommerce, sid = session id). I'm assuming you are merely using %% as a place holder to hide identity. A % actually means something different in SQL code. OK, now to answer your question: <a href="%%+index.php?cPath=21_32_63&osCsid=%%-"> Try instead using your full domain path: <a href="http://www.domainName.com/index.php?cPath=21"> There is a more osCommerce purist approach, but I'm a tired puppy, and hopefully, this will solve your immediate issue. [/quo i tryed that and it didnt work it drops the session id so whatever might be in the customers cart it gets lost. what might be the other osCommerce approach you mentioned?
birchy82 Posted January 25, 2007 Author Posted January 25, 2007 i tryed that and it didnt work it drops the session id so whatever might be in the customers cart it gets lost. what might be the other osCommerce approach you mentioned?
birchy82 Posted January 26, 2007 Author Posted January 26, 2007 Which page are you putting the link in? its going in the products description unless there is a contribution like the related products contribution that would allow for me to relate products to categories
lostndazed Posted January 26, 2007 Posted January 26, 2007 I *think* this might work for you. I haven't tested it. Assuming you want the link to go to a single category, get the category number and put in the spot where it reads cPathNumber. <a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=' . 'cPathNumber");?>"> The FILENAME_DEFAULT pulls info from the includes/filenames.php file. You might want to know that, because not every link will use FILENAME_DEFAULT. For instance, on my site, I have a link that goes to my shipping information page. <a href="<?php echo tep_href_link(FILENAME_SHIPPING); ?>" class="headerNavigation">Shipping Information</a> Good luck. HOpe this helps.
lostndazed Posted January 26, 2007 Posted January 26, 2007 Using your example link from above: <a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=' . 'cPathNumber");?>"> Would look like this: <a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=' . '21_32_63");?>"> (Your category structure is 3 levels deep, right?)
birchy82 Posted January 26, 2007 Author Posted January 26, 2007 Using your example link from above: <a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=' . 'cPathNumber");?>"> Would look like this: <a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=' . '21_32_63");?>"> (Your category structure is 3 levels deep, right?) some parts are 4 deep i think like this: http://www.ygmailboxes.com/product_info.ph...=64_113_126_151 is this going to matter?
lostndazed Posted January 26, 2007 Posted January 26, 2007 Naw. It shouldn't. Let me know how it goes.
lostndazed Posted January 26, 2007 Posted January 26, 2007 Hey, I tried the link that you left. This one works and shows CATEGORIES: http://www.ygmailboxes.com/index.php?cPath=144_181_182 A Link to another product, like you gave, is not going to work. http://www.ygmailboxes.com/product_info.php?cPath=64_113_126_151
birchy82 Posted January 26, 2007 Author Posted January 26, 2007 Hey, I tried the link that you left. This one works and shows CATEGORIES: http://www.ygmailboxes.com/index.php?cPath=144_181_182 A Link to another product, like you gave, is not going to work. http://www.ygmailboxes.com/product_info.php?cPath=64_113_126_151 that last one was an accident but the first one u said that works is how i was linking them but it doesnt work with internet explorer on my clients computer for some reason so i just figured it wasnt working with internet explorer at all. i tryed your way and i got this error....i've been at this for so long im gonna go crazy haha did i do something wrong? i even tryed the link you use for your website with the shipping and i got the same error. Not Found The requested URL /< was not found on this server.
lostndazed Posted January 26, 2007 Posted January 26, 2007 Hm, let me try the code on my page. Will be right back.
lostndazed Posted January 26, 2007 Posted January 26, 2007 I had a typo in the link. I just tested in successfully on my site with this link: <a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=' . '1_27'); ?>"> A text link to Jazz Category</a>
lostndazed Posted January 26, 2007 Posted January 26, 2007 Geez, I'm sorry. My last post probably didn't make much sense. My first post with a linking code had a typo. (Gotta watch the ' and the " !) This one I've tested and it worked fine for me, and should for you: <a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=' . '1_27'); ?>"> A text link to Category</a>
birchy82 Posted January 26, 2007 Author Posted January 26, 2007 Geez, I'm sorry. My last post probably didn't make much sense. My first post with a linking code had a typo. (Gotta watch the ' and the " !) This one I've tested and it worked fine for me, and should for you: <a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=' . '1_27'); ?>"> A text link to Category</a> dont mean to be a pain dude but it still aint workin im still gettin this error lol maybe its me! i dont know. Not Found The requested URL /< was not found on this server. i dont know what it could be im putting it in my products description so i dont know its not workin thanks for workin with me though!!!!!!!
lostndazed Posted January 26, 2007 Posted January 26, 2007 Well, if the page is not found, it may just be that you are not using the correct cPath numbers? 21_32_67 Try this: <a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=' . '21_32_67'); ?>"> See More Of The Oasis Collection</a>
lostndazed Posted January 26, 2007 Posted January 26, 2007 Use for CATEGORY LINKS <a href="<?php echo tep_href_link(FILENAME_DEFAULT, 'cPath=' . '21_32_67'); ?>"> See More Of The Oasis Collection</a> Use for PRODUCT LINKS <a href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . '21_32_67'); ?>"> See PRODUCT 5100B</a>
lostndazed Posted January 26, 2007 Posted January 26, 2007 It works. See: http://www.mediamedley.com/reviews.php The test link is there. When you save your file, and get ready to upload it to your server, are you refreshing the file in the FTP program before uploading? It took me a while to learn that little trick. I kept saving the file, had left the FTP program open, and then uploaded, but the changes never took because I didn't know to refresh first.
birchy82 Posted January 26, 2007 Author Posted January 26, 2007 ok i know why its working for you and not me....the reason is that you are uploading the file via ftp. i have to have it in the products description and alot of the differant products will have differant links so that why i have to doit that way. so when i put the link in there im doing it from the admin back end in the actual products description. HMMMMMMMMMMM what to do now lol
lostndazed Posted January 27, 2007 Posted January 27, 2007 im using this to link products You know what? I was thinking, and just realized something. The products_info.php page is dynamic. That means everytime the page is pulled, it's likely to have a different product. And if the data is different, the link to the category should match the data. The link example I gave you was a STATIC link, meaning it would only go to the same category, no matter which product was shown. I'm kind of surprised no one else had pointed that out. Sooo. You'd probably have to add some extra programming code to your page to dynamically catch the correct category. I'm not sure I could help you with that. Sorry I didn't catch this earlier.
birchy82 Posted January 28, 2007 Author Posted January 28, 2007 yeah you are right i appreciate all of the help you gave me and in that you actually helped me solve a differant problem i was having..... Thanks alot, Ryan
ribsforgrillin Posted January 30, 2007 Posted January 30, 2007 I am trying to link two products as well and am having the issue of a 404 page not found. I am using this: <a href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, 'cPath=' . '21_32_67'); ?>"> See PRODUCT 5100B</a> I can't seem to find a way to link to a product from another product page. Does anyone have any ideas??
Recommended Posts
Archived
This topic is now archived and is closed to further replies.