View Single Post
  #38  
Old 02-16-2009, 06:08 AM
 
delboy2028 delboy2028 is offline
 

Advanced Member
  
Join Date: Jan 2009
Location: UK
Posts: 97
 

Default Re: Random Featured Products using Recommended Products

In customer/main/welcome.tpl
Code:
{* $Id: welcome.tpl,v 1.28.2.3 2008/07/15 12:07:40 ferz Exp $ *} {if ($active_modules.Greet_Visitor ne "") and ($smarty.cookies.GreetingCookie ne "") and $logout_user eq ''} {assign var="_name" value=$smarty.cookies.GreetingCookie|replace:"\'":"'"} <h3>{$lng.lbl_welcome_back|substitute:"name":$_name} </h3> {elseif $lng.lbl_site_title} <h3>{$lng.lbl_welcome_to|substitute:"company":$lng.lbl_site_title}</h3> {else} <h3>{$lng.lbl_welcome_to|substitute:"company":$config.Company.company_name}</h3> {/if} {$lng.txt_welcome} <br /> {if $active_modules.Bestsellers ne "" and $config.Bestsellers.bestsellers_menu ne "Y"} {include file="modules/Bestsellers/bestsellers.tpl"} {/if} <br /> {if $f_products ne ""} {if $active_modules.Recommended_Products ne ""} {include file="modules/Recommended_Products/recommends_home.tpl" } {/if} {*{include file="customer/main/featured.tpl" f_products=$f_products}*} {/if} {if $newproducts ne ""} {include file="customer/main/newest.tpl" newproducts=$newproducts} {/if} {if $f_products eq "" && $newproducts eq ""} <img src="{$ImagesDir}/customer_images/welcome.jpg" alt="" /> {/if}


skin1/modules/Recommended_Products/

Code:
{* $Id: recommends_home.tpl,v 1.9 2006/09/25 14:51:45 hhiker Exp $ *} {if $recommends} {capture name=recommends} {include file="customer/main/products.tpl" products=$recommends} {/capture} {include file="dialog.tpl" title=$lng.lbl_recommends_home content=$smarty.capture.recommends extra='width="100%"'} {/if}

my home.php

Code:
<?php /*****************************************************************************\ +-----------------------------------------------------------------------------+ | X-Cart | | Copyright (c) 2001-2008 Ruslan R. Fazliev <rrf@rrf.ru> | | All rights reserved. | +-----------------------------------------------------------------------------+ | PLEASE READ THE FULL TEXT OF SOFTWARE LICENSE AGREEMENT IN THE "COPYRIGHT" | | FILE PROVIDED WITH THIS DISTRIBUTION. THE AGREEMENT TEXT IS ALSO AVAILABLE | | AT THE FOLLOWING URL: http://www.x-cart.com/license.php | | | | THIS AGREEMENT EXPRESSES THE TERMS AND CONDITIONS ON WHICH YOU MAY USE | | THIS SOFTWARE PROGRAM AND ASSOCIATED DOCUMENTATION THAT RUSLAN R. | | FAZLIEV (hereinafter referred to as "THE AUTHOR") IS FURNISHING OR MAKING | | AVAILABLE TO YOU WITH THIS AGREEMENT (COLLECTIVELY, THE "SOFTWARE"). | | PLEASE REVIEW THE TERMS AND CONDITIONS OF THIS LICENSE AGREEMENT | | CAREFULLY BEFORE INSTALLING OR USING THE SOFTWARE. BY INSTALLING, | | COPYING OR OTHERWISE USING THE SOFTWARE, YOU AND YOUR COMPANY | | (COLLECTIVELY, "YOU") ARE ACCEPTING AND AGREEING TO THE TERMS OF THIS | | LICENSE AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY THIS | | AGREEMENT, DO NOT INSTALL OR USE THE SOFTWARE. VARIOUS COPYRIGHTS AND | | OTHER INTELLECTUAL PROPERTY RIGHTS PROTECT THE SOFTWARE. THIS | | AGREEMENT IS A LICENSE AGREEMENT THAT GIVES YOU LIMITED RIGHTS TO USE | | THE SOFTWARE AND NOT AN AGREEMENT FOR SALE OR FOR TRANSFER OF TITLE.| | THE AUTHOR RETAINS ALL RIGHTS NOT EXPRESSLY GRANTED BY THIS AGREEMENT. | | | | The Initial Developer of the Original Code is Ruslan R. Fazliev | | Portions created by Ruslan R. Fazliev are Copyright (C) 2001-2008 | | Ruslan R. Fazliev. All Rights Reserved. | +-----------------------------------------------------------------------------+ \*****************************************************************************/ # # $Id: home.php,v 1.10.2.3 2008/04/11 18:09:11 osipov Exp $ # define('OFFERS_DONT_SHOW_NEW',1); // WCM - CDSEO Pro Links #require "./auth.php"; require_once "./auth.php"; include $xcart_dir."/modules/cdseolinks/cdseo_redirects.php"; // / WCM - CDSEO Pro Links require $xcart_dir."/include/categories.php"; if ($active_modules["Manufacturers"]) include $xcart_dir."/modules/Manufacturers/customer_manufacturers.php"; if (!empty($cat)) include "./products.php"; if (empty($products)) include "./featured_products.php"; if(!empty($active_modules["Recommended_Products"])) include "./recommends.php"; if ($active_modules["Bestsellers"]) include $xcart_dir."/modules/Bestsellers/bestsellers.php"; if ($active_modules["Random_Products"]) include $xcart_dir."/modules/Random_Products/randoms.php"; if (!empty($current_category) and is_array($current_category["category_location"])) { foreach ($current_category["category_location"] as $k => $v) $location[] = $v; } if (!empty($active_modules["Special_Offers"])) { include $xcart_dir."/modules/Special_Offers/category_offers.php"; } if (empty($products)) { include "./featured_products.php"; } if (empty($products) and empty($current_category)) { include "./newest.php"; } # Deleting the previously saved user information received from PayPal (Is performed when the user exits the checkout process) if (x_session_is_registered("paypal_token") || x_session_is_registered("paypal_express_details")) { x_session_unregister('paypal_token'); x_session_unregister("paypal_express_details"); } # # Assign Smarty variables and show template # $smarty->assign("main","catalog"); # Assign the current location line $smarty->assign("location", $location); func_display("customer/home.tpl",$smarty); ?>

this is my code nd i just get nothing
__________________
Version 5.3.1
Reply With Quote