I want to add more boxes into the center body in order to display all the categories of products in homepage.
In "tpl_index_default.php":
I changed it to this:PHP Code:/**
* 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_MAIN_SPECIALS_PRODUCTS') { ?>
<?php
PHP Code:/**
* 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_MAIN_SPECIALS_PRODUCTS') { ?>
<?php
?>
<?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_MAIN_SPECIALS_PRODUCTS') { ?>
<?php
Now I have two Featured Products in the homepage. However, I they display the same products, what could i do to let them display different products?
I know that I can change the code in "featured_products.php" to let the featured products box display the categries I want.
I just don't understand how could "tpl_index_default.php" get the information of products from MySQL, I can't see any code about it in this file or the files link to it.
Also, is there any connection between "featured_products.php" and "tpl_index_default.php"? I can't find any.
Thanks for any help.


Reply With Quote
