PDA

View Full Version : value separator


a12c4magic
15-08-2005, 18:31/06:31PM
I have the SEO urls installed, but I stayed on cName and pName,
because my host doesn't support mod_rewrite for some reason

I have a url that looks like this:

mywebsite/product_info.php?pName=a4-ultra-pro-9-pocket-portolio-blue&cName=albums-and-folders

I tried changing all the & symbols I could find to & but it stopped the category links from working, so

My question is where is the & symbol that appears in the url above defined as I would like to change it from & to &amp: so that at least it will validate

failing that is there a way to set a php value separator in the style sheet
or maybe in the html_output.php file to achieve the desired effect?

g1smd
15-08-2005, 18:33/06:33PM
Additional information:

This is an osCommerce question.


Anyone familiar with how that package works?


One thing I can help with: The building of URLs in links has nothing to do with the stylesheet.



Footnote: You need to type & in your forum post above, in order to get it to show as & in the forum message itself.

a12c4magic
15-08-2005, 22:06/10:06PM
Ok problem solved I edited
includes/functions/html_output.php
by inserting
$link = str_replace('&', '&', $link);
above
return $link;

then I edited
includes/functions/general.php
by inserting
$url = str_replace('&', '&', $url);
below
function tep_redirect($url) {

The page in question now validates, all that remains is to check it is still functional *LOL

a12c4magic
15-08-2005, 22:16/10:16PM
Well most pages validate if not all *LOL

ihelpyou
15-08-2005, 23:59/11:59PM
Isn't it great members can ask, and then answer their own question? That shows me quite a learning capability that many out there don't seem to possess. :)

a12c4magic
16-08-2005, 08:32/08:32AM
When I post a question, I continue to try and figure out the answer myself, however it’s helpful if someone can post the solution and in this case it would have saved me several hours of trawling through php code.

Hopefully the solution I posted will help someone else.

g1smd
16-08-2005, 11:38/11:38AM
Sorry that I couldn't help with a solution. I'm a raw beginner with osCommerce, so although I can help with the basics, and most validation stuff, finding where that exact function was located in the all the PHP and mySQL code was beyond me at the time.

Anyway, glad you found it, even of you were up until 4am messing about with it. :cheers:

a12c4magic
16-08-2005, 15:05/03:05PM
Originally posted by g1smd
Sorry that I couldn't help with a solution. I'm a raw beginner with osCommerce, so although I can help with the basics, and most validation stuff, finding where that exact function was located in the all the PHP and mySQL code was beyond me at the time.

Anyway, glad you found it, even of you were up until 4am messing about with it. :cheers:

Hey no need to apologise and besides it was a learning curve.

I was never that big on sleep anyway *LOL