Jump to content

blockspecials module problem


Recommended Posts

hello, i want to print special product start and end time to my product tpl.

 

i open blockspecials.tpl from theme and find this block

 

 

{if $specific_prices.reduction_type == 'percentage' && ($smarty.now|date_format:'%Y-%m-%d %H:%M:%S' <= $specific_prices.to && $smarty.now|date_format:'%Y-%m-%d %H:%M:%S' >= $specific_prices.from )}

 

than i want to show like this

 

start date {$specific_prices.from} end date {$specific_prices.to}

 

but is how like bellow

 

 

0000-00-00 00:00:00

 

 

i also open blockspecials.php from module and open this line

 

 

 

public function hookRightColumn($params)

{

if (Configuration::get('PS_CATALOG_MODE'))

return ;

 

if (!($special = Product::getRandomSpecial((int)$params['cookie']->id_lang)) && !Configuration::get('PS_BLOCK_SPECIALS_DISPLAY'))

 

print_r($special);

 

after that try to print product attribute but find that it send blank data. so where is the bug.??

 

can any one help me.

Edited by smartdatasoft (see edit history)
Link to comment
Share on other sites

in .tpl use this:

 

$specific_prices|print_r

 

what you've got in output?

 

rray ( [id_specific_price] => 11 [id_specific_price_rule] => 0 [id_cart] => 0 [id_product] => 1 [id_shop] => 0 [id_shop_group] => 0 [id_currency] => 0 [id_country] => 0 [id_group] => 0 [id_customer] => 0 [id_product_attribute] => 0 [price] => -1.000000 [from_quantity] => 1 [reduction] => 0.040000 [reduction_type] => percentage [from] => 2013-05-16 00:00:00 [to] => 2013-05-16 22:00:00 [score] => 1 ) 1

 

this out put i got now

 

but some time ago that do not show from and to date. if i again go to a product and assign special date and price that show no product. is that cache query

Link to comment
Share on other sites

rray ( [id_specific_price] => 11 [id_specific_price_rule] => 0 [id_cart] => 0 [id_product] => 1 [id_shop] => 0 [id_shop_group] => 0 [id_currency] => 0 [id_country] => 0 [id_group] => 0 [id_customer] => 0 [id_product_attribute] => 0 [price] => -1.000000 [from_quantity] => 1 [reduction] => 0.040000 [reduction_type] => percentage [from] => 2013-05-16 00:00:00 [to] => 2013-05-16 22:00:00 [score] => 1 ) 1

 

this out put i got now

 

but some time ago that do not show from and to date. if i again go to a product and assign special date and price that show no product. is that cache query

 

i just saw that it solve the problem, not sure why this happen some times the block special show product, but i i delete old special price and add new price than it will not show but after some time later it show again special product.??

Link to comment
Share on other sites

×
×
  • Create New...