Surataro Posted August 19, 2013 Share Posted August 19, 2013 (edited) Hello everyone, After scratching my brain for 4 days, here I am, I've encountered a unusual problem after upgrading my prestashop tool from the 1.5.3.1 to the 1.5.4.1 version. No item under the price drop page is displayed, I've tried changing the NewProductController.php, PriceDropController.php and the BestSalesController.php in order to have it ignore the $this->order by, I've tried changing the way the order by is done by using the BO and countless other things, but nothing has worked for me so far. If anyone has an idea, I'll be really thanksful as this feature is a really important one for us. Thanks in advance for the time you'll be willing to spend in your answers. Edited August 20, 2013 by Nemo1 (see edit history) Link to comment Share on other sites More sharing options...
NemoPS Posted August 19, 2013 Share Posted August 19, 2013 Can you check if you have something in your ps_specific_price table? Link to comment Share on other sites More sharing options...
Surataro Posted August 19, 2013 Author Share Posted August 19, 2013 Hello Nemo1 and thanks for your reply, Yes, There are entries in the ps_specific_price table. Link to comment Share on other sites More sharing options...
NemoPS Posted August 19, 2013 Share Posted August 19, 2013 I see. Are ou using any overrides? In that PriceDropController, can you try duping this: Product::getPricesDrop($this->context->language->id, (int)$this->p - 1, (int)$this->n, false, $this->orderBy, $this->orderWay) Link to comment Share on other sites More sharing options...
Surataro Posted August 19, 2013 Author Share Posted August 19, 2013 By duping you mean put it in comment? I did it in the line where the array receive infos for products. 'products' => Product::getPricesDrop($this->context->language->id, (int)$this->p - 1, (int)$this->n, false, $this->orderBy, $this->orderWay), it didn't change the behaviour of the website neither did it generate any error on the price drop list page, but it didn't display anything either. Link to comment Share on other sites More sharing options...
NemoPS Posted August 19, 2013 Share Posted August 19, 2013 Sorry, I meant duMping, like this var_dump(Product::getPricesDrop($this->context->language->id, (int)$this->p - 1, (int)$this->n, false, $this->orderBy, $this->orderWay) ); Link to comment Share on other sites More sharing options...
Surataro Posted August 19, 2013 Author Share Posted August 19, 2013 Just did it, no changes, but a text appear on the upper left corner of the page (as not in any parsing from smaty) it displays "bool(false)" Link to comment Share on other sites More sharing options...
NemoPS Posted August 19, 2013 Share Posted August 19, 2013 It means that function is not grabbing any product. Do you use different languages? Try this var_dump(Product::getPricesDrop($this->context->language->id); 1 Link to comment Share on other sites More sharing options...
Surataro Posted August 19, 2013 Author Share Posted August 19, 2013 The website is in Danish, I've just did the dump for the languageid variable, the result returned is "bool(false)" Link to comment Share on other sites More sharing options...
NemoPS Posted August 19, 2013 Share Posted August 19, 2013 I see. At this point, download a fresh 1.5.4.1 and replace the entire classes folder, see if it works 1 Link to comment Share on other sites More sharing options...
Surataro Posted August 19, 2013 Author Share Posted August 19, 2013 I didn't change anything in this folder, but I'll try that later today, thanks for your input, really appreciated Nemo1. I'll keep you updated Link to comment Share on other sites More sharing options...
Surataro Posted August 20, 2013 Author Share Posted August 20, 2013 Hello Nemo1, I tried replacing the files in the class folder, it didn't work. After some deeper researchs, I found out the query used to display all the best sales/new product etc was way too big, (or so was my understanding of it) I then deleted all the rules for the special price (sigh) and redid it with a lot of care checking each time if the items were still there, it did work, but I feel kinda defeated by the fact that I didn't found a more "dev like" solution Thanks again for your help, without a doubt it pointed me in the right direction. Now I need to find a way to pass this post in the "solved" state Link to comment Share on other sites More sharing options...
NemoPS Posted August 20, 2013 Share Posted August 20, 2013 No worries, I did it for you Link to comment Share on other sites More sharing options...
lucats55 Posted August 27, 2013 Share Posted August 27, 2013 I've experienced the same problem. But i was starting from a 1.5.4.1 version with a massive product import. No prestashop migrations involved. I've analyzed the query produced by the function getPricesDrop in the class Product.php. The query requires that the products to be visualized in SPECIALS have the "Specify Prices" attributes coherently compiled. I mean that my products have the attribute relative to the minimum quantity at which the price applies set to ZERO. After setting this to ONE (or more) the "SPECIAL" page populates correctly. Link to comment Share on other sites More sharing options...
Recommended Posts