If this is your first visit, check our documentation. To post, register or login.

<?php If products page display xxx ?>

Started by jonnyboy22 on 6 Dec 2011, 3:38 PM · 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

Post #1 by jonnyboy22

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.

Want to switch servers? see our how to migrate Zencart guide
Supercharge your website with our **Fast Zencart Hosting**

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

Post #2 by jonnyboy22

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

Want to switch servers? see our how to migrate Zencart guide
Supercharge your website with our **Fast Zencart Hosting**

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

ajeh

Oba-san

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

Post #3 by ajeh

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

Example:

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

Linda McGrath
If you have to think ... you haven't been zenned ...

**Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!**

Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today!]
Officially PayPal-Certified! Just click here

Try our Zen Cart Recommended Services - Hosting, Payment and more ...
Signup for our Announcements Forums to stay up to date on important changes and updates!