pohodak Posted November 28, 2013 Share Posted November 28, 2013 Hi, I want to see specials for a specific day. Where I use: Product::getPricesDrop((int)$this->context->language->id, 0, 20, false, null, null) I see all specials. Where I use for example: Product::getPricesDrop((int)$this->context->language->id, 0, 20, false, null, null, '2013-11-28 00:00:00','2013-11-29 00:00:00') See all products. Where is the problem? Link to comment Share on other sites More sharing options...
artyom-d Posted November 17, 2014 Share Posted November 17, 2014 Hi, I have the same problem and I think I know where is the problem. Function Product::getPricesDrop has something odd. At first with this piece of code it finds the correct specials within the needed dates $ids_product = Product::_getProductIdByDate((!$beginning ? $current_date : $beginning), (!$ending ? $current_date : $ending), $context); But then there is a very strange mysql query part : '.((!$beginning && !$ending) ? ' AND p.`id_product` IN ('.((is_array($tab_id_product) && count($tab_id_product)) ? implode(', ', $tab_id_product) : 0).')' : '').' So instead of adding condition to limit the products to ids that were found with first piece of code it just ignores it, because $beginning and $ending won't be false when you search for specific date. I think it is a typo, but maybe there is a hidden meaning behind that code? 1 Link to comment Share on other sites More sharing options...
JeepMania Posted May 11, 2016 Share Posted May 11, 2016 I have the same problem. I wanted to use beginning and ending arguments of getPricesDrop function to show only limited time promotions but it seams to be impossible with this part of code. Found the problem targeted in russian forum, but it is 6 years old... so code chaneged since 2010. Bug? is still here. Can anyone solve this issue? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now