zenrider420 Posted March 20, 2009 Share Posted March 20, 2009 I want the header of the Featured items block to read "Featured Items for XXX" (XXX being the current month)... How can i write that in there... when I try "print strftime('%f');" it doesn't seem to work... Any ideas? Link to comment Share on other sites More sharing options...
rocky Posted March 20, 2009 Share Posted March 20, 2009 Here's how I would do it. Modify modules/homefeatured/homefeatured.php, starting at line 157, change: $smarty->assign(array( 'allow_buy_when_out_of_stock' => Configuration::get('PS_ORDER_OUT_OF_STOCK', false), 'max_quantity_to_allow_display' => Configuration::get('PS_LAST_QTIES'), 'category' => $category, 'products' => $products, 'currency' => new Currency(intval($params['cart']->id_currency)), 'lang' => Language::getIsoById(intval($params['cookie']->id_lang)), 'productNumber' => sizeof($products), 'displayprice' => Configuration::get('HOME_FEATURED_DISPLAY_PRICE'), 'addcart' => Configuration::get('HOME_FEATURED_ADD_CART'), 'view' => Configuration::get('HOME_FEATURED_VIEW') )); to: $today = getdate(); $smarty->assign(array( 'allow_buy_when_out_of_stock' => Configuration::get('PS_ORDER_OUT_OF_STOCK', false), 'max_quantity_to_allow_display' => Configuration::get('PS_LAST_QTIES'), 'category' => $category, 'products' => $products, 'currency' => new Currency(intval($params['cart']->id_currency)), 'lang' => Language::getIsoById(intval($params['cookie']->id_lang)), 'productNumber' => sizeof($products), 'displayprice' => Configuration::get('HOME_FEATURED_DISPLAY_PRICE'), 'addcart' => Configuration::get('HOME_FEATURED_ADD_CART'), 'view' => Configuration::get('HOME_FEATURED_VIEW'), 'month' => $today['month'] )); Then in modules/homefeatured/homefeatured.tpl, change line 3 from: {l s='featured products' mod='homefeatured'} to: {l s='featured products for' mod='homefeatured'} {$month} Link to comment Share on other sites More sharing options...
zenrider420 Posted March 20, 2009 Author Share Posted March 20, 2009 Hey there Rocky! Thanks for taking the time to reply.I totally see the logic with what your saying, only when I try it, when adding 'month' => $today ['month'] into the .php file, only the top header and left column display omitting the middle and right column. as soon as i remove just the above expression, it all works ok...hmmm... maybe it is the placement. i'll mess around with it and see if i can't figure it out. Link to comment Share on other sites More sharing options...
Recommended Posts