Well, I have found a kinda kludgy way to do what I want, but it seems to work. Below is an example, in case someone else wants/needs it, too.
1. First, create a file containing the common code that you want to insert on multiple products. Here is a simplified example where I want multiple products to all say the same thing about the colors that are available. For this example, this code will be stored in the file called [myfilename.html]
HTML Code:
<br>It comes in 3 lovely colors: red, green, and blue. blah blah blah.<br>
2. Next, login to your Zen Cart Admin, go to Categories/Products, and edit each Product one-by-one in Plain Text mode. Insert an iframe in the description field where you want the common code to appear. Be sure to set the height, width, and specify the name of the file with the common code on the iframe statement:
HTML Code:
<p>
This widget is really great!
<iframe frameborder="0" seamless width="xxx" height="yyy" src="http://[mydomainname.com]/[myfilename.html]"></iframe>
You will just love it!
</p>
So this produces the following output when viewed in a browser:
This widget is really great!
It comes in 3 lovely colors: red, green, and blue. blah blah blah.
You will just love it!
You should probably also do one more thing and that is add a link statement to a css definition file at the top of the included file. This because the iframe doesn't pass along css definitions to its contents. No worries, though, as you can easily do this with a statement that looks like this:
HTML Code:
<link rel="stylesheet" type="text/css" href="/includes/templates/css/[stylesheetname.css]" />
If you want to see a working example, browse on over to http://keylessentrylocks.com/index.p...products_id=98. Click on #5. Lock Colors in the accordion-style control to see some stuff that was included as described above. And while you are there, if you see something you like, feel free to buy it! (sorry, couldn't resist a bit of shameless site promotion )
One problem with this method is that you need to specify a height and width or you will get scroll bars. Sometimes that is ok, but sometimes not. Another problem is that I want to use a Dreamweaver jQuery tab control (which is similar to the accordion control on the page now), but that one doesn't seem to work. Not sure why yet. Enlighten me if you know!
This example shows how to insert common code elements into a Product Description file, but I would expect it will also work with EZ Pages and Define Pages. I just haven't tested that yet.
If you know of an easier way, please do let us all know.
Good luck and hope this is helpful to someone.
Bookmarks