Jump to content

Homefeatured Module - Print Date in Header


Recommended Posts

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

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

×
×
  • Create New...