Guest Posted March 30, 2013 Share Posted March 30, 2013 I have about 20 products with the same description, but I want to be able to edit these easily. Is there a way I can use a master description they all use? So if i edit the master it changes them all? Can I show a Html page within a HTML page or use include file? Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 31, 2013 Share Posted March 31, 2013 Welcome Simon2k11! Glad to see you made it to the forums. There are three short answers of: no. There is one other answer of: maybe. 1. CubeCart uses a template engine (Smarty with CC5) and it is designed to not re-parse through already parsed template code. So, this does not work: <?php $common_description = "{include file='common.html'}"; $Smarty->assign('DESCRIPTION', $common_description); ?> The DESCRIPTION placeholder in the template will be replaced with {include file='common.html'} and that will be that. 2. Others have tried to trick a browser into loading a CSS resource and then displaying the text. <?php $common_description = '<STYLE TYPE="text/css"><!-- @import url(http://www.example.com/common_description.css); --></STYLE>'; $Smarty->assign('DESCRIPTION', $common_description); ?> file: common_description.css contents: This is actually the product's description. No CSS here. Nope. 3. Others have tried to trick a browser into loading an image resource and hoping it will display text if the image file is actually text instead of a real image. Nope. 4. The better fake-out is to use an <iframe> tag as the product description. The iframe loads the specified text file. 5. Another fake-out is to have a javascript <script> tag have a jQuery $.load() function call. <?php // The rich text editor may or may not allow you to enter script tags in the content window. // http://api.jquery.com/load/ $common_description = '<script>$("#product_description").load("common_description.html")</script>'; $Smarty->assign('DESCRIPTION', $common_description); ?> Even though #5 seems to be the most promising, realize that when this page gets crawled by Google, et al, scripts may or may not get executed. If not, your brilliant and inciteful product description prose will not be seen. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted March 31, 2013 Share Posted March 31, 2013 Since all of your descriptions are identical, would it be possible to use a Search/Replace Query on the database to accomplish this? Quote Link to comment Share on other sites More sharing options...
Guest jazzjazZ Posted April 2, 2013 Share Posted April 2, 2013 I guess this is a good description and obviously will catch up with the query database. So worth trying though! Quote Link to comment Share on other sites More sharing options...
Guest Posted April 9, 2013 Share Posted April 9, 2013 I've checked to see if I can use an uploaded image to show my product description and this works fine. Is there any cons to this? Could it really hinder google results? Quote Link to comment Share on other sites More sharing options...
bsmither Posted April 9, 2013 Share Posted April 9, 2013 I can't answer the google question as I am search-engine atheistic. But pictures of text that is not "deemed" to be text will be treated as an image. By "deemed" as text, I mean to say that a scanned image of a book page is intended to be OCR'd then indexed. The book and its images of the pages have a known destiny. An image of your product description does not and so is treated just as another image. Those with sight disabilities won't be able to have their screenreaders read the image (unless you put the entire description in the alt attribute). Quote Link to comment Share on other sites More sharing options...
AppleOnRed Posted May 11, 2014 Share Posted May 11, 2014 I had the same problem and resolved it this way: My host provides phpMyAdmin which I used to Export the database file Inventory, in CSV. Then I edited the downloaded file to use replace etc. then Upload with Replace ticked. However, I had a problem. I changed the product NAME also, and now my HTML files still have the same old name and so does the SEO. I need to update these but I haven't been able to find where the old name is stored. That was why I was looking here. So be careful what you change. Don't change column 1; the id. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted May 11, 2014 Share Posted May 11, 2014 Could you create your basic product listing, but not enabled, and clone it to make the variations for each individual product? Quote Link to comment Share on other sites More sharing options...
havenswift-hosting Posted May 11, 2014 Share Posted May 11, 2014 Hi Having 20 products / pages with exactly the same description is a very bad idea from an SEO point of view due to duplicate content issues so whichever way to try to achieve this is not good. If these products really do have the same description, then why not simply create one product and have product options Thanks Iam Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.