Avoid add to cart / buy now url encoding for some affiliate/external products
-
Hello,
I have troubles with some external/affiliate product urls. I know it is a very specific question…
In fact, some affiliate networks use urls that contain special characters in query strings (in parameter name). Here is an example of such affiliate product url:
https://pdt.tradedoubler.com/click?a(3161967)p(292702)product(e50aafaa-2dbf-4ef1-b7f7-da9b968a9438)ttid(3)url(https%3A%2F%2Fwww.chaussures.fr%2Flot-de-2-paires-de-chaussettes-hautes-unisexe-happy-socks-xhap02-9300-multicolore-noir.html%3Futm_source%3DTradedoubler%26utm_medium%3Dcpc%26utm_campaign%3DTradedoubler)After the add-to-cart form submission (in other words, when I click on the “Buy now” button to purchase a product on the affiliate website), this url is encoded and doesn’t work anymore:
https://pdt.tradedoubler.com/click?a%283161967%29p%28292702%29product%28e50aafaa-2dbf-4ef1-b7f7-da9b968a9438%29ttid%283%29url%28https%3A%2F%2Fwww.chaussures.fr%2Flot-de-2-paires-de-chaussettes-hautes-unisexe-happy-socks-xhap02-9300-multicolore-noir.html%3Futm_source%3DTradedoubler%26utm_medium%3Dcpc%26utm_campaign%3DTradedoubler%29=Does someone know how I can do to avoid the url encoding after the form submit to make those affiliate urls working? What code should I add to my child theme to solve that?
Is it possible to avoid the url encoding only for TradeDoubler affiliate urls?Thanks a lot in advance!
PS: Is it possible to hide my affiliate links once the problem is solved, please?
- The topic ‘Avoid add to cart / buy now url encoding for some affiliate/external products’ is closed to new replies.