You are here:  » Quotes and Apostrophes in Buy Url


Quotes and Apostrophes in Buy Url

Submitted by bat on Fri, 2012-12-14 14:50 in

Hi David
I'm having an issue with one of my merchants, who has quotation marks " and apostrophes ' in their product link (Buy URL). Whenever I click "Visit Store" on my installation, it just breaks the url up and doesn't display the required page.
I.e.
Original URL: http://www.example.com/products/Bad-Boy-%27Contender%27-Boxer-Short-Red.html
Result when click Visit Store http://www.example.com/products/Bad-Boy-%5C%5C%5C%27Contender%5C%5C%5C%27-Boxer-Short-Red.html

How do I go about fixing this so that it appears as ' or " respectively?

Many thanks

Submitted by support on Fri, 2012-12-14 15:15

Hi bat,

Some urlencoding going awry somewhere - original URL is fine - %27 is the urlencoding for ' so that's all good, the question is where the translation from that to %5C%5C%5C%27 is taking place. There's no processing of the Buy URL at all during import, so buy_url in the product record should be the literal value from the feed, whether using tracking or not.

Could you please let me know the installation URL and feed filename (I'll remove before publishing your reply) and I'll check it out on my test server - I can see that the ' is becoming tripple escaped somewhere but not entirely sure where...

Thanks
David.
--
PriceTapestry.com

Submitted by bat on Fri, 2012-12-14 15:53

Thanks David. It's {link saved}
I actually made the feed manually as the merchant hasn't got a feed, so if it's something that I can change within Microsoft Excel, I can do it.

Submitted by support on Fri, 2012-12-14 16:48

Thanks bat,

That's imported fine - but as it's CSV I think it may be related to PHP's Magic Quotes functionality. The first thing I would suggest would be to add the following line to the end of your config.php (just before the closing PHP tag)

  ini_set('magic_quotes_runtime', 0);

...then re-import and that might do the trick. If not of course let me know and I'll help you investigate further - it's certainly something peculiar as every does look in order...

Hope this helps!

Cheers,
David.
--
PriceTapestry.com

Submitted by bat on Fri, 2012-12-14 18:38

Still not working.
I've tried using the affiliate prefix manually with the url and I'm wondering if that's to blame and there's no work around?
Here it is (please hide it)
{link saved}

Submitted by support on Sat, 2012-12-15 12:27

Hi bat,

I've just followed up by email as it would be useful to check this out over FTP for you if that would be OK...

Thanks,
David.
--
PriceTapestry.com

Submitted by kenan on Sat, 2018-03-03 20:03

.csv import with quotation marks (") and apostrophes (') still problem.
Pricetapestry importing the products to db but when I click 'buy url' it shows product's image. :)
I am using {link saved} for scraping data from web sites. Likely I can take the data .xml format.
Specially it's problem when the product is TV (e.g. VESTEL 50FD7300 50'' 127 CM FHD SMART TV)

Submitted by support on Mon, 2018-03-05 09:12

Hello kenan and welcome to the forum!

If XML isn't an option if you could you perhaps email me the feed that you using (zipped if large) so that I can see exactly how the encoder is representing data I'll check it out on my test server for you...

Thanks!
David.
--
PriceTapestry.com