Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / Pre installed Product Descriptions

Pre installed Product Descriptions

Views: 630

Results 1 to 7 of 7
23 Dec 2011, 8:10 PM
#1
martyng avatar

martyng

New Zenner

Join Date:
Apr 2008
Posts:
19
Plugin Contributions:
0

Pre installed Product Descriptions

Has anyone any idea how I can edit Product Descriptions to include a 'standard' paragraph in each new product added?

I want to put a footer to each Product Description that includes delivery info, etc and whilst I know I can cut and paste it each time there are other users of the store that forget to add this extra info.

Is there something I've missed in earlier posts or Add-Ons that will allow me to do this and if not where can I alter the code? :dontgetit

23 Dec 2011, 8:15 PM
#2
rescoccc avatar

rescoccc

Totally Zenned

Join Date:
May 2010
Location:
WA State
Posts:
1,700
Plugin Contributions:
2

Re: Pre installed Product Descriptions

You could add the info to includes/templates/your_template/templates/tpl_product_info_display.php

23 Dec 2011, 10:14 PM
#3
martyng avatar

martyng

New Zenner

Join Date:
Apr 2008
Posts:
19
Plugin Contributions:
0

Re: Pre installed Product Descriptions

RescoCCC:

You could add the info to includes/templates/your_template/templates/tpl_product_info_display.php
Thanks for the reply. I assume I need to enter something in Product Description part of tpl_product_info_display.php but everything I try messes up the programme. My php skills just aren't up to the task :no:

<!--bof Product description --> <?php if ($products_description != '') { ?> <div id="productDescription" class="productGeneral biggerText"><?php echo stripslashes($products_description); ?></div> <?php } ?> <!--eof Product description -->
24 Dec 2011, 12:28 AM
#4
rescoccc avatar

rescoccc

Totally Zenned

Join Date:
May 2010
Location:
WA State
Posts:
1,700
Plugin Contributions:
2

Re: Pre installed Product Descriptions

Try it like this:

<!--bof Product description --> <?php if ($products_description != '') { ?> <div id="productDescription" class="productGeneral biggerText"><?php echo stripslashes($products_description); ?></div> <?php } ?> Your additional information here. <!--eof Product description -->
24 Dec 2011, 12:56 AM
#5
website_rob avatar

website_rob

Inactive

Join Date:
Oct 2006
Location:
Alberta, Canada
Posts:
4,572
Plugin Contributions:
0

Re: Pre installed Product Descriptions

This would work better.

<!--bof Product description --> <?php if ($products_description != '') { ?> <div id="productDescription" class="productGeneral biggerText"><?php echo stripslashes($products_description); ?></div>

<br /><br />

<div id="standardProductFooter"> your info here </div> <?php } ?> <!--eof Product description -->

Putting it before the closing PHP tag makes sure it is included as part of the Product Description; showing just after the description but before pricing. Styling your footer text within its own DIV means you can easily adjust styling to your needs from within the main CSS file.

24 Dec 2011, 12:26 PM
#6
martyng avatar

martyng

New Zenner

Join Date:
Apr 2008
Posts:
19
Plugin Contributions:
0

Re: Pre installed Product Descriptions

Many, many thanks to all of you. :clap: That works great! I will save me so much time instead having to go back and check every new product for correct information...

Merry Christmas and a Great New Year to everyone :D

24 Dec 2011, 1:51 PM
#7
swguy avatar

swguy

Administrator

Join Date:
Feb 2006
Location:
Tampa Bay, Florida
Posts:
10,691
Plugin Contributions:
56

Re: Pre installed Product Descriptions

For a single consistent block of text, this technique works well, but if you have multiple blocks of text with product dependencies, you might want to look at my Boilerplate Text Addition help instructions here:

http://www.thatsoftwareguy.com/zencart_php_in_description.html