Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / modifying product_info_display.php page

modifying product_info_display.php page

Views: 620

Results 1 to 4 of 4
16 Jul 2013, 4:21 PM
#1
asdfwen avatar

asdfwen

New Zenner

Join Date:
May 2012
Posts:
30
Plugin Contributions:
0

modifying product_info_display.php page

Hi, I added the below code to the product_info_display.php. It works good.

<div class="content" id="discountPolicy5" style="background: #999933; padding: 3px; width: 400px;"> " Buy 2 or more lace wigs,get $30 off" </div>

You may have a view of my website. https://www.frhair.com

Now, I have a question. I want to add different words on different category products info page. Is it possible?
For example:
Category A, add "ABC"
Category B, add" DEF"
Category C, add"GHI"

Thanks for your help.

16 Jul 2013, 10:47 PM
#2
asdfwen avatar

asdfwen

New Zenner

Join Date:
May 2012
Posts:
30
Plugin Contributions:
0

Re: modifying product_info_display.php page

is there anybody who can help me?

16 Jul 2013, 10:58 PM
#3
rbarbour avatar

rbarbour

Totally Zenned

Join Date:
Feb 2010
Posts:
2,159
Plugin Contributions:
10

Re: modifying product_info_display.php page

I would normally suggest adding something like this to your product_info:

<?php
if (in_array($cPath,explode(",",'9')) ) {
echo '<div class="content" id="discountPolicy5" style="background: #999933; padding: 3px; width: 400px;"> 
     " Buy 2 or more lace wigs,get $30 off" </div>';
  } else if (in_array($cPath,explode(",",'1,23,33,35')) ) {
echo '<div class="content" id="discountPolicy5" style="background: #999933; padding: 3px; width: 400px;"> 
     " Buy 2 or more lace wigs,get $10 off" </div>';
  } else if (in_array($cPath,explode(",",'7,8,10')) ) {
echo '<div class="content" id="discountPolicy5" style="background: #999933; padding: 3px; width: 400px;"> 
     " Buy 2 or more lace wigs,get $20 off" </div>';
  } else {
echo '';
}
?>

Not sure it will work with a URL re-writer.

17 Jul 2013, 12:38 AM
#4
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,876
Plugin Contributions:
8

Re: modifying product_info_display.php page

You might try Product Articles from Plugins (based on swguy's boilerplate file technique). It works on a per-product basis, i.e. you would need to add an HTML comment similar to

<!-- HTML_A_INCLUDE_discount10 -->

to each product description, which would cause the content of discount10.html to be output in the location you set up.
With this, you can include (and change) as many customized messages as you like without further touching PHP files.