Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / <?php If products page display xxx ?>

<?php If products page display xxx ?>

Views: 1,499

Results 1 to 3 of 3
6 Dec 2011, 3:38 PM
#1
jonnyboy22 avatar

jonnyboy22

Zen Follower

Join Date:
Jun 2008
Location:
Sheffield South Yorkshire
Posts:
165
Plugin Contributions:
1

<?php If products page display xxx ?>

hello, im using the following on my main page

<?php if($this_is_home_page)
                { ?>
MAIN PAGE ONLY STUFF HERE
 <?php } ?>

which works great and only displays the text on the main page. But is their a way to use this to only display text if the customer is viewing the product info page.

e.g.

<?php if($this_is_product_info_page)
                { ?>
MAIN PAGE ONLY STUFF HERE
 <?php } ?>

Basically im having issues with facebook like button not always loading due to facebooks server issues.
When the customer goes though checkout and gets to the checkout sucses page if facebook (or google and twitter) icons fail to load the page doesnt load (or goes white) and no order is tracked!
It only happens rarely but is very very annoying and the above would fix my problem as i can then not load the icons if its not a product page.

8 Dec 2011, 8:25 PM
#2
jonnyboy22 avatar

jonnyboy22

Zen Follower

Join Date:
Jun 2008
Location:
Sheffield South Yorkshire
Posts:
165
Plugin Contributions:
1

Re: <?php If products page display xxx ?>

<BUMP> anyone got any ideas? im stuck! :)

8 Dec 2011, 11:55 PM
#3
ajeh avatar

ajeh

Oba-san

Join Date:
Sep 2003
Location:
Ohio
Posts:
62,757
Plugin Contributions:
1

Re: <?php If products page display xxx ?>

You would need to test the:
$_GET['main_page']

Example:

if ($_GET['main_page'] == FILENAME_PRODUCT_INFO) {
  echo 'I AM PRODUCT_INFO!!';
}