When we add products through the backend in CS-Cart we are having some issues with the “Description” field removing some HTML tags. It seemed like it had been removing them arbitrarily but now we know one of the tags it is removing every time we save is the and align=“center” tags/attributes. I know this sounds crazy, but bear with me here. Here’s our exact process with images attached so you can see exactly what’s going on.
1.) Open a new product. Add a pre-existing HTML template code to the “Description” field in Source View.
2.) View the template code in HTML View to make sure it looks right before editing the actual text specific to each product.
3.) Open Source View, and edit the text for the product.
4.) Reopen the final product in HTML view again to make sure there aren’t any mistakes.
5.) Click Save.
6.) View product on live website to ensure further that everything listed ok.
To our astonishment somewhere between steps 2-4 CS-Cart creates a mind of its own and removes all of our tags and Align=“center” attributes so… in step 2, the template looks great, but in step 4 nothing is aligned in the center anymore!!!
Screenshots showing steps 1-4 are attached. Any help would be appreciated.
Also, here is a snippet of our template code if it will help:
[quote name=‘brandonvd’]Don’t get me wrong, I’m not an expert, but wouldn’t it be better to set up a id in your style sheet named center [/QUOTE]
Brandon, thank you for your response. While we knew we could do it this way, we would rather not for several reasons. Mainly because we have lots of products and would rather not have to change each one… I am sure next people will say, why don’t you just do an export to csv and then bulk change. Even if we concocted some crazy way of finding and replacing an exported list where we could replace all tags with a div tag, and then re-uploading, it just seems like a huge risk when you have lots of products, not to mention its a pain. Also, we aren’t even sure the center tag is the only thing being removed, we just caught that one immediately because it is so visibly obvious.
The real question is, why is CS-Cart deleting and
tags? I mean, that is a pretty valid question considering those are completely legit HTML tags and have no real reason to be deleted.
I totally understand what you are saying. I had all of my product descriptions one way that didn’t use the style sheet to it’s potential. The way I had it was not very good html and so it was difficult for my partner to add products. I ended up going through each of my products and changing the desciptions. This was a huge pain, but now my site is better for it.
As for changing this one tag, couldn’t you just use the find and replace feature of Excel. Basically find and replace all
Obviously you would want to test this on either a localhost or testing server before going live with it, but I would think this would work.
I wish I had an answer for you about why the tags are removed. Have you contacted CS-Cart yet?