So this site is old and I am running 1.5.5.1 version through Mijoshop (plug in that connects OC to Joomla). Was playing around with the product.tpl template today and the add to cart button stopped working. Links to reviews also stopped working. So I put the file back to normal but still no luck. Tried clearing caches everywhere I could find them. Been working on this for hours and can't find a solution. I can add the product to cart from categories page (only have one product that I allow that to happen since the products have to be customized). So I would assume it has to do with the product.tpl file since that is the only thing I messed with. But not sure why putting it back to normal hasn't fixed it. Example product with problem: https://tablesaver.com/order-table-pads ... -table-pad
I really feel like this is a cache problem since I have put the original code back in place but not sure. Any input would be appreciated.
Only had a quick look. Looks like some modification is removing the \ escape from the template file you attached before the output is generated. An example would be line 465 of your attached file which contains is becoming
Which causes a JavaScript error. You could try, as a test, replacing any in JavaScript strings in the template with , but this won't solve the root cause of the problem.
Code: Select all
encodeURIComponent($('input[name=\'name\']').val())
Code: Select all
encodeURIComponent($('input[name='name']').val())
Code: Select all
\'
Code: Select all
"
Not sure how to take that suggestion as that code is even in the original unmodified OpenCart file. The only way I was able to get this to work was to through the "restore" process until I found the original file that worked. As I said before the code that is in there is the same that I have been using this entire time so not sure why saving the file is different than restoring it. Something odd definitely is going on. But I'm too exhausted from messing with it all day to put any more effort in. Looks like I am just leaving the page as is.
it seems working now.
Website designing & Development - https://webdesign-r.in
Indian Matrimonial sites - https://nikahmatrimonial.com
Source location undescribed.The only way I was able to get this to work was to through the "restore" process until I found the original file that worked.
Dedication and passion goes to those who are able to push and merge a project.
Regards,
Straightlight
Programmer / Opencart Tester
It can be found on line 465 for the product.tpl you attach to your post. Anyway, whatever you have restored has put back the \ escaping to the generated output.IsItFast wrote: ↑Sat Nov 10, 2018 1:43 pmNot sure how to take that suggestion as that code is even in the original unmodified OpenCart file. The only way I was able to get this to work was to through the "restore" process until I found the original file that worked. As I said before the code that is in there is the same that I have been using this entire time so not sure why saving the file is different than restoring it. Something odd definitely is going on. But I'm too exhausted from messing with it all day to put any more effort in. Looks like I am just leaving the page as is.
Who is online
Users browsing this forum: edkny and 131 guests