I have my Catalog Mode set up and working properly; however, I am using long URL’s from Commission Junction’s product links. Whenever I enter a unique URL for a certain product and save it in the Buy Now URL section, it chops off my unique URL after I save it, thereby not directing the user to appropriate product on my affiliate’s site.
Please help. How can I fix this issue. Is there a particular piece of code that I can modify that will allow me to lengthen the Buy Now URL after is saved.
[quote name='wildman' timestamp='1308930590' post='115696']
I have my Catalog Mode set up and working properly; however, I am using long URL's from Commission Junction's product links. Whenever I enter a unique URL for a certain product and save it in the Buy Now URL section, it chops off my unique URL after I save it, thereby not directing the user to appropriate product on my affiliate's site.
Please help. How can I fix this issue. Is there a particular piece of code that I can modify that will allow me to lengthen the Buy Now URL after is saved.
[/quote]
Check the db field that stores this value. It probably has a max value set on it. Just increase this value in the table through PHPMyAdmin or a similar application.
Well I found a line in the file addon.xml under addons/catalog_mode.
Line 44 has varchar(255) field set. I changed this limit and then reuploaded, but it didn't work. I think you're right. The database now has a limit set somewhere. If anyone knows what exact field I should change in PHPmyadmin, I would greatly appreciate your help.
***********
SOLUTION
***********
Okay, so I figured it out. Here's the solution:
- You don't need to edit anything in your database or PHPmyadmin. If you already installed the Catalog Mode addon from the Administration Add-ons section, you need to go back and Uninstall it.
- Open this file in this directory:
addons/catalog_mode/addon.xml
- Change this line of code on Line 44:
From this…
ALTER TABLE?:products
ADDbuy_now_url
varchar(255) NOT NULL
To this…
ALTER TABLE?:products
ADDbuy_now_url
varchar(65536) NOT NULL
- FTP the file back to the directory on the server.
- Install the Category Mode again and you're done.
If you are interested in why I chose the long character limit of 65536, read this article:
MySQL different treatment between VarChar(255) and VarChar(65536) - Stack Overflow