birchy82 Posted February 7, 2007 Posted February 7, 2007 ok here is the deal i need some help ASAP! i have a customer that needs to have a link in each products description so that when the customer clicks it, it brings them to another categorie kinda like a step by step process. here is what im using, it works in most browsers except internet explorer. i found it as a contribution on this site. <a href="%%+index.php?cPath=23_35&osCsid=%%-">Click Here For Matching Address Signs</a> the website is www.ygmailboxes.com go to any product that has the link in it that says "click here for" keep in mind it only does this in internet explorer as far as i know anyways. also the link has to keep the session. PLEASE HELP!
Velveeta Posted February 7, 2007 Posted February 7, 2007 ok here is the deal i need some help ASAP! i have a customer that needs to have a link in each products description so that when the customer clicks it, it brings them to another categorie kinda like a step by step process. here is what im using, it works in most browsers except internet explorer. i found it as a contribution on this site. <a href="%%+index.php?cPath=23_35&osCsid=%%-">Click Here For Matching Address Signs</a> the website is www.ygmailboxes.com go to any product that has the link in it that says "click here for" keep in mind it only does this in internet explorer as far as i know anyways. also the link has to keep the session. PLEASE HELP! I'm curious why you're using that %% thing... I'm guessing it's supposed to insert appropriate things in that url line, like the base url in the beginning, and then tack on the index.php<etc>... When I view the source of that page, I see this as the actual link being produced: <a href="http://www.ygmailboxes.com/./index.php?cPath=23_112&osCsid=&osCsid=e8b2cd491ede260369e768c925c05f89"><font face="Arial, Helvetica, sans-serif" size="2" color="#000066">Click Here For Matching Address Signs</font> </a> You'll notice that first, there's an unnecessary ./ right before the index.php, secondly, it's inserting an & html entity in place of the actual & symbol, and third, it's duplicating the osCsid entry (&osCsid=&osCsid=e8b2cd491ede260369e768c925c05f89)... Now, the & may be screwing up your url for one thing, because the http protocol should interpret that as a variable named "amp;osCsid" since the ampersand is used to denote a new variable, but even if it's interpreting it correctly as "osCsid", the duplicate value in that url line could be screwing something up, losing the session id in transit because it only processes the first osCsid variable or something, which is blank... Just a couple of ideas to be you started... If you were just using the "%%" above to blot out portions of the url, that's one thing, but if you were using it as say, some kind of javascript or browser-specific url substitution deal, why not simply generate the actual url on the backend via php so the proper format is output? You could do it with something like this: $url = tep_href_link(FILENAME_DEFAULT, tep_get_all_get_params(array('cPath','products_id')) . '&cPath=' . $whatever_your_new_cPath_variable_is); The tep_href_link function should also automatically tack the osCsid value onto the end of that url, taking care of that variable... the array passed in tep_get_all_get_params says to get all existing get variables (variables in the url string itself) except for the cPath and products_id variables (since they weren't in the url I pulled out of that page source), and then concatenate the new cPath onto the end of that list... And something like that would work across any browser, because the link is generated during page processing and the actual address is output in the anchor tag... Richard. Richard Lindsey
birchy82 Posted February 7, 2007 Author Posted February 7, 2007 what you just said would work by insterting that code right where the product description is on the back end? how might it look exactly im so stressed i cant even think rightnow...and the way i was doing it was a "contribution" someone posted on this site.
Velveeta Posted February 7, 2007 Posted February 7, 2007 what you just said would work by insterting that code right where the product description is on the back end? how might it look exactly im so stressed i cant even think rightnow...and the way i was doing it was a "contribution" someone posted on this site. Well, post the current code for it here and I'll show you how to modify it so it's all done on the backend... I need to know how it's grabbing that new cPath to insert into the link so I can duplicate it in my own little snippet here... Richard. Richard Lindsey
Recommended Posts
Archived
This topic is now archived and is closed to further replies.