Modifying the admin template for Products Description?
Is there a way to modify the ZenCart template so that when I add a new product, certain text/HTML is automatically entered into the Products Description field?
I don't necessarily need this for batch uploads (it would be 50/50), but definitely need it when manually adding products as a large number of our items have notes. It would seem easier to delete this text/HTML rather than constantly copying and pasting.
I'm working on a clean install (no updates) of Zen Cart 1.3.8a from a couple of weeks ago.
Thanks.
Re: Modifying the admin template for Products Description?
Search in the # Free Software Add Ons for "boilerplate"
Re: Modifying the admin template for Products Description?
Quote:
Originally Posted by
kobra
Search in the # Free Software Add Ons for "boilerplate"
"There is no product that matches the search criteria."
Re: Modifying the admin template for Products Description?
Once you create a product with the description, you can always copy it to create a new product (either in the same category or in another category) and the decription will go with it. Then you just need to modify the other product info leaving the description in place.
Re: Modifying the admin template for Products Description?
Sorry I thought he contributed it
His site - remove space
http ://www.thatsoftwareguy.com/zencart.html
Re: Modifying the admin template for Products Description?
Quote:
Originally Posted by
kobra
Sorry I thought he contributed it
His site - remove space
http ://www.thatsoftwareguy.com/zencart.html
Cool, thanks!
Re: Modifying the admin template for Products Description?
OK, I've looked at the mod and couldn't quite get it to work, but found another example in a different thread that did work. I can see using this in certain situations, but it's not exactly what I was looking for.
My real goal, and I may not have explained this correctly, is doing what afo suggested, but avoiding the repetition of copying products to create new products manually.
When I go to a category and click to add a new product, I want my template of text already inserted into the Products Description field. It needs to be there because I will be adding info to it that is product specific. I currently have a separate text file that I copy and paste this text from when needed. Is there a way to accomplish this?
Example of template text:
HTML Code:
Replaces:
<ul>
<li>
<li>
<li>
</ul>
Fits:
<ul>
<li>
<li>
<li>
</ul>
Specifications:
<ul>
<li>
<li>
<li>
</ul>
Some products may need just one LI, others may need 20. There are numerous other examples of what I use. It would seem easier to have all of that information already there rather than finding my file, copying, pasting and then making changes. But once I create that product, that template needs to no longer appear if I edit the product. Does that make sense?
Re: Modifying the admin template for Products Description?
I thought that this is what boilerplating does???
Re: Modifying the admin template for Products Description?
Quote:
Originally Posted by
kobra
I thought that this is what boilerplating does???
It adds text below the description when the product is displayed, similar to a footer or how one would use a server side include to replicate the same message on multiple pages.
This text is not editable from the admin panel when working on a product.
The mod you linked to would be great for adding text to a category of items that have special shipping conditions, etc., and like I mentioned, I can see where it will come in handy down the road. But it's not exactly what I'm looking for.
Re: Modifying the admin template for Products Description?
BP22, you would be best off just to copy & paste that chunk of code, since it needs to be customized every time for each product. There's no easy way to front-load the new description with this text.
The boilerplate tips are just articles on my site about how to do this sort of thing; it's not packaged up as a mod because there's not that much code to it.
Scott
Re: Modifying the admin template for Products Description?
Back to the boilerplate text, if I have 5 different messages to display (one for 5 different categories) what is the correct code to use in tpl_product_info_display.php that won't cause the normal description to repeat 5 times or crash the page?