Zen Cart Logo
If this is your first visit, check our documentation. To post, register or login.
Forums / General Questions / General Questions / How do i get new products and featured products centerboxes on product info page?

How do i get new products and featured products centerboxes on product info page?

Started by phillycheese123 on 30 Dec 2012, 1:09 AM · Views: 1,641

Results 1 to 13 of 13
30 Dec 2012, 1:09 AM
#1
phillycheese123 avatar

phillycheese123

New Zenner

Join Date:
Dec 2011
Posts:
11
Plugin Contributions:
0

Post #1 by phillycheese123

I am trying to get the new products and featured products centerboxes to show up on the product info page.

i thought if i pasted this code it would work...

<?php require($template->get_template_dir('tpl_modules_products_featured_listing.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_products_featured_listing.php'); ?> <?php require($template->get_template_dir('tpl_modules_products_new_listing.php ',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_products_new_listing.php '); ?>

but all i get is the names of the two php files and this
"More featured products will be added soon. Please check back later."

why doesnt this work?

30 Dec 2012, 7:00 PM
#2
kobra avatar

kobra

Black Belt

Join Date:
Aug 2005
Location:
Arizona
Posts:
31,500
Plugin Contributions:
4

Post #2 by kobra

admin > config > index listing

Zen-Venom Get Bitten

31 Dec 2012, 4:11 PM
#3
ajeh avatar

ajeh

Oba-san

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

Post #3 by ajeh

A quick method to make the Centerboxes show on the product_info page in the same manner that they would show when on the immediate Category of the Products Listing would be to add, using your templates and overrides, to the bottom of your file:
/includes/templates/your_template_dir/templates/tpl_product_info_display.php

<!-- bof: include centerboxes on product_info -->
<div>
<?php

$new_products_category_id = $cPath;

//// bof: categories
$show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_LISTING_BELOW);
if ($error_categories == false and $show_display_category->RecordCount() > 0) {
?>

<?php
  $show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_LISTING_BELOW);
  while (!$show_display_category->EOF) {
?>

<?php
    if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_LISTING_BELOW_FEATURED_PRODUCTS') { ?>
<?php
/**
 * display the Featured Products Center Box
 */
?>
<?php require($template->get_template_dir('tpl_modules_featured_products.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_featured_products.php'); ?>
<?php } ?>

<?php
    if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_LISTING_BELOW_SPECIALS_PRODUCTS') { ?>
<?php
/**
 * display the Special Products Center Box
 */
?>
<?php require($template->get_template_dir('tpl_modules_specials_default.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_specials_default.php'); ?>
<?php } ?>

<?php
    if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_LISTING_BELOW_NEW_PRODUCTS') { ?>
<?php
/**
 * display the New Products Center Box
 */
?>
<?php require($template->get_template_dir('tpl_modules_whats_new.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_whats_new.php'); ?>
<?php } ?>

<?php
    if ($show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_LISTING_BELOW_UPCOMING') {
      include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_UPCOMING_PRODUCTS));
    }
?>
<?php
  $show_display_category->MoveNext();
  } // !EOF
?>

<?php
} //// eof: categories
?>

</div>
<!-- eof: include centerboxes on 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!

30 Mar 2013, 5:28 PM
#4
lanadearg avatar

lanadearg

New Zenner

Join Date:
Nov 2012
Location:
Buenos Aires
Posts:
35
Plugin Contributions:
0

Post #4 by lanadearg

Ajeh, I did, but unfortunately it doesn’t work.

30 Mar 2013, 5:43 PM
#5
ajeh avatar

ajeh

Oba-san

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

Post #5 by ajeh

Go to the Configuration ... Index Listing ...

What are your settings for:

Show New Products - below Product Listing
Show Featured Products - below Product Listing
Show Special Products - below Product Listing

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!

30 Mar 2013, 6:10 PM
#7
ajeh avatar

ajeh

Oba-san

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

Post #7 by ajeh

I am not sure where you put the code, but I am not seeing signs of it in the View Source ...

Did you add it to the code in:
/includes/templates/classic/templates/tpl_product_info_display.php

NOTE: the question I asked is still related as the settings are in the code that I posted so I need to know what they are set to ...

NOTE: you should really make your own custom template and NOT be customizing the Classic Template as that is used for testing ...

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!

30 Mar 2013, 6:46 PM
#8
lanadearg avatar

lanadearg

New Zenner

Join Date:
Nov 2012
Location:
Buenos Aires
Posts:
35
Plugin Contributions:
0

Post #8 by lanadearg

Yes, I put code in "my template" and not work.
Maybe solution here is “related products”. But also not work with 1.3.9.
I think, the only solution is to install version 1.5 and add “related products”
Thanks for your help, Ajeh!

30 Mar 2013, 9:32 PM
#9
ajeh avatar

ajeh

Oba-san

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

Post #9 by ajeh

My point is that in the View Source of your product _info you should see:

<!-- bof: include centerboxes on product_info -->

and that is now displaying ...

You should have the new code placed below:

<!--bof also purchased products module-->
<?php require($template->get_template_dir('tpl_modules_also_purchased_products.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_also_purchased_products.php');?>
<!--eof also purchased products module-->

and it does not appear to be there ...

I try that code on my site without an issue ...

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!

30 Mar 2013, 10:08 PM
#10
lanadearg avatar

lanadearg

New Zenner

Join Date:
Nov 2012
Location:
Buenos Aires
Posts:
35
Plugin Contributions:
0

Post #10 by lanadearg

I tried this code

  1. to the bottom of file:
    /includes/templates/your_template_dir/templates/tpl_product_info_display.php
  2. below code
!--bof also purchased products module-->
<?php require($template->get_template_dir('tpl_modules_also_purchased_products.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_also_purchased_products.php');?>
<!--eof also purchased products module-->

Not work.
I don’t have folders “templates” in /includes/templates/classic/templates/tpl_product_info_display.php ;
You mention anything about these folders.
Now I think, I accidentally erased them?
I think that they were not there.

30 Mar 2013, 10:29 PM
#11
ajeh avatar

ajeh

Oba-san

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

Post #11 by ajeh

Amuse me ...

Make a directory:
/includes/templates/classic/templates

and add the file:
tpl_product_info_display.php

and add the code that I posted ...

What happens? :lookaroun

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!

31 Mar 2013, 3:03 PM
#12
lanadearg avatar

lanadearg

New Zenner

Join Date:
Nov 2012
Location:
Buenos Aires
Posts:
35
Plugin Contributions:
0

Post #12 by lanadearg

I did it. But still not working. I will find other ways. Thank you Ajeh!

31 Mar 2013, 3:18 PM
#13
ajeh avatar

ajeh

Oba-san

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

Post #13 by ajeh

Not sure what to tell you but the code still does not appear to be in your View Source ...

Go to the Tools ... Developers Tool Kit ... and in the bottom input box enter:

<!-- bof: include centerboxes on product_info -->

and select Catalog and click Search ...

What comes up?

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!