Jump to content

change default combination if out of stock


Recommended Posts

  • 5 months later...

Hi everyone!

 

I was about to start a same topic!

 

On my shop, on Categories pages, the products out of stock go at the end of list by modifying the Category.php class (prestashop v1.4.3):

 

      if ($random === true)
      {
         $sql .= ' ORDER BY (p.quantity > 0) DESC, RAND()';
         $sql .= ' LIMIT 0, '.(int)($randomNumberProducts);
      }
      else
      {
         $sql .= ' ORDER BY (p.quantity >0) DESC, '.(isset($orderByPrefix) ? $orderByPrefix.'.' : '').'`'.pSQL($orderBy).'` '.pSQL($orderWay).'
         LIMIT '.(((int)($p) - 1) * (int)($n)).','.(int)($n);
      }

 

 

If someone knows how to do the same on Manufacturers, products on sale, new products pages, I would be really happy just like Pharrell Williams sings :)

Link to comment
Share on other sites

  • 2 years later...

Since this is a feature that should have been implemented in the PS core functionalities and for over 2 years NO solutions were given except 2 paid modules, I am going to SPAM all the threads that address this matter.
I am sorry but it doesn't seem fair at all that such an important base feature is made available via paid module when it should have been rolled out in a PS update long time ago  :( 
 

I've seen so many PS stores losing customers because they see an Out of Stock message on a product that actually HAS stock on other combinations. It's already beyond ridiculous, this silence of the PS staff.
 

This a call of desperation to the PS staff, of a lot of PS users, not just mine.

Let the solution reveal itself at last!

#MegaBump

Link to comment
Share on other sites

  • 2 years later...
  • 1 month later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...