Forums / Templates, Stylesheets, Page Layout / Products listing new or featured on info page

Products listing new or featured on info page

Started by lanadearg on 29 Mar 2013, 9:30 PM · Views: 1,542

Results 1 to 20 of 20
29 Mar 2013, 9:30 PM
#1
lanadearg avatar

lanadearg

New Zenner

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

Products listing new or featured on info page

Hi,
I need to display featured products or new products on product info page below product information.
Can anyone help me with doing this? Not having any success in moving it.:no:
Thanks.
http://giftseshop.com/

1 Apr 2013, 12:49 PM
#2
ajeh avatar

ajeh

Oba-san

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

Re: Products listing new or featured on info page

Please try to answer the question from your other post:

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?

This would really be of help to identify your problem and perhaps see what is happening or not happening ...

Then, do a search on:

<!--bof also purchased products module-->

what comes up for that?

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!

1 Apr 2013, 2:36 PM
#3
lanadearg avatar

lanadearg

New Zenner

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

Re: Products listing new or featured on info page

<!--bof also purchased products module-->

come:
/home/content/58/7996358/html/includes/templates/template_default/templates/tpl_document_general_info_display.php

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

Error: No matching Configuration Keys were found ...

1 Apr 2013, 2:59 PM
#4
ajeh avatar

ajeh

Oba-san

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

Re: Products listing new or featured on info page

You are not using the code that I gave you in the previous thread if you found nothing in the Developers Tool Kit by entering into the bottom input box:

then selecting Catalog and clicking search ...

You should have in your templates and overrides file:
/includes/template/your_template_dir/template/tpl_product_info_display.php

the code in RED:

<!--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-->

[B]<!-- 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 -->
[/B]

From what you are telling us, you do not have this code added to your template and override file and upload on to your server ...

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!

1 Apr 2013, 3:26 PM
#5
lanadearg avatar

lanadearg

New Zenner

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

Re: Products listing new or featured on info page

I did it, but not work, no change nothing.
If I write the phrase in that place, then it is reflected correctly. But the code doesn’t work.
I don’t know what happened.
Should I install a zencart 5?

1 Apr 2013, 3:33 PM
#6
ajeh avatar

ajeh

Oba-san

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

Re: Products listing new or featured on info page

Now let's check the settings on the display to see if we need to alter the code a little ...

What settings do you have in the Configuration ... Index Listing ... for the following:

Show New Products - below Product Listing
Show New Products below Product Listing

Show Featured Products - below Product Listing
Show Featured Products below Product Listing

Show Special Products - below Product Listing
Show Special Products below Product Listing

Show Upcoming Products - below Product Listing
Show Upcoming 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!

1 Apr 2013, 3:47 PM
#7
lanadearg avatar

lanadearg

New Zenner

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

Re: Products listing new or featured on info page

Yes, these settings work on the product listing. I turn them off them.
These settings are not displayed on the info page.

1 Apr 2013, 3:54 PM
#8
ajeh avatar

ajeh

Oba-san

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

Re: Products listing new or featured on info page

Okay now we need to customize the new code a little bit as those settings being OFF are why these do not show on your Product _info page ...

If you want Featured Products to show, edit the code and add the additional code in RED:

    if ([B]true || [/B]$show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_LISTING_BELOW_FEATURED_PRODUCTS') { ?>

If you want Specials to show, edit the code and add the additional code in RED:

    if ([B]true || [/B]$show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_LISTING_BELOW_SPECIALS_PRODUCTS') { ?>

If you want New Products to show, edit the code and add the additional code in RED:

    if ([B]true || [/B]$show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_LISTING_BELOW_NEW_PRODUCTS') { ?>

If you want Upcoming Products to show, edit the code and add the additional code in RED:

    if ([B]true || [/B]$show_display_category->fields['configuration_key'] == 'SHOW_PRODUCT_INFO_LISTING_BELOW_UPCOMING') {

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!

1 Apr 2013, 3:57 PM
#9
lanadearg avatar

lanadearg

New Zenner

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

Re: Products listing new or featured on info page

End of the story!:))) They appeared on the info page, when I turned on.
Now I just want to move them of product listing.
I think; I'll just wipe of the code on product listing?

1 Apr 2013, 3:58 PM
#10
ajeh avatar

ajeh

Oba-san

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

Re: Products listing new or featured on info page

No, I would not do that ...

I would customize the code as I just posted and it will work on the product _info when these settings are turned OFF for the 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!

1 Apr 2013, 4:06 PM
#11
lanadearg avatar

lanadearg

New Zenner

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

Re: Products listing new or featured on info page

A thousand thanks you, Ajeh!
The last question. Can I specify just on tpl_product_info_display.php that I want to only 6 featured pictures?

1 Apr 2013, 4:07 PM
#12
lanadearg avatar

lanadearg

New Zenner

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

Re: Products listing new or featured on info page

Ajeh:

No, I would not do that ...

I would customize the code as I just posted and it will work on the product _info when these settings are turned OFF for the Product Listing ...

it would be good!

1 Apr 2013, 4:17 PM
#13
ajeh avatar

ajeh

Oba-san

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

Re: Products listing new or featured on info page

To limit the Featured Products to 6 on the Product _info page, you can customize, using your templates and overrides by copying:
/includes/modules/featured_products.php

to the file:
/includes/modules/your_templates_dir/featured_products.php

and add the code in RED:

[B]// bof: limit Featured to 6 on product _info
if ($_GET['main_page'] == 'product_info') {
  if ($featured_products_query != '') $featured_products = $db->ExecuteRandomMulti($featured_products_query, 6);
} else {
[/B]  if ($featured_products_query != '') $featured_products = $db->ExecuteRandomMulti($featured_products_query, MAX_DISPLAY_SEARCH_RESULTS_FEATURED);
[B]}
// eof: limit Featured to 6 on product _info[/B]

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!

1 Apr 2013, 4:35 PM
#14
lanadearg avatar

lanadearg

New Zenner

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

Re: Products listing new or featured on info page

I want to show 6 pictures only on info page. It should not affect all pages, such as main page.

1 Apr 2013, 4:47 PM
#15
ajeh avatar

ajeh

Oba-san

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

Re: Products listing new or featured on info page

Did you even try the new code that only puts 6 Featured Products on the product_info page to see if that works?

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!

1 Apr 2013, 5:05 PM
#16
lanadearg avatar

lanadearg

New Zenner

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

Re: Products listing new or featured on info page

This code work!
The first code I removed and without it all work too. So I had to just turn on- no more. Now I only will move featured products from product listing.

1 Apr 2013, 5:07 PM
#17
ajeh avatar

ajeh

Oba-san

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

Re: Products listing new or featured on info page

I do not know why you insist on touching the products_listing ...

Just change the 1 file with the changes posted and you do not have a zillion files to maintain un upgrades and such ...

But do what you want ...

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!

1 Apr 2013, 5:32 PM
#18
lanadearg avatar

lanadearg

New Zenner

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

Re: Products listing new or featured on info page

But I have no other choice.
The first code is still not working for me.

1 Apr 2013, 5:34 PM
#19
ajeh avatar

ajeh

Oba-san

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

Re: Products listing new or featured on info page

You are using this code and it is not working?

<!--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-->

[B]<!-- 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 (true || $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 (true || $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 (true || $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 (true || $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 -->
[/B]

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!

1 Apr 2013, 5:52 PM
#20
lanadearg avatar

lanadearg

New Zenner

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

Re: Products listing new or featured on info page

Ajeh:

You are using this code and it is not working?

<!--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-->

[B]<!-- 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 (true || $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 (true || $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 (true || $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 (true || $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 --> [/B] ``` Just this code is not working. I removed it now.