Jump to content

Setting allow to order when out of stock for every particular product combination


roscibaldi

Recommended Posts

Hi

I'm new to prestashop and have only the very basic knowledge of PHP. I use Prestashop 1.4.8.3

 

I wonder if it's a very difficult task to change the code, so that I could set the "allow to order when out of stock" option for every single product attributes combination, not the whole product?

 

For example there could be a checkbox for every attributes combination in BO to set allow_oosp.

 

Or maybe is there any module for that?

  • Like 1
Link to comment
Share on other sites

  • 1 year later...

Actually, I managed to do that somehow. You can see the result for example here: http://bikefun.pl/gorskie/740170-kross-hexagon-x1-2014.html

 

I created new column "is_available" in the product_attributes table in the db.

Based on what number is in that column the combination can have statements like "shipping 1-2 days" or "shipping 3-5 days", defined in the template files. So inside one product I can have combinations available in store (shipping 24h), fully unavailable and available (but with quantity = 0) with shipping like 1-2 days or 3-5 days.

 

Actually, it did require not that much edits in a few classes, controllers and admin tabs. 

 

In fact, I did it in three steps:

1. Creating that mentioned column in product_attributes table and some interface to change the proper value in the combination tab.

2. Based on the value in that column displaying the add2cart button or not for particular combination - changes in template, controllers and classes.

3. Changing the rules for validating the cart and order, so that it wasn't complaining the product is out of stock or the quantity is not enough (I don't know what's the exact English message).

 

For someone experienced in PHP this should be a piece of cake, however, the update of prestashop would now be problematic, at least after the changes in a manner I did... I decided to stick for some time to the presta version I currently have.

 

Now I'm going to display those availability statuses in the product lines in the cart (I've got now blank place - doesn't look good) and below the products summary to display the estimated shipping date.

  • Like 2
Link to comment
Share on other sites

  • 10 months later...
  • 10 months later...
  • 4 years later...
On 11/9/2015 at 10:11 PM, rmatcar said:

Hi all,

 

I have the same problem and I have no idea how to solve this issue. If anyone can explain step by step to solve it I really appreciate.

 

I have mentioned this bug in the next link: http://forge.prestashop.com/browse/PSCSX-7247

 

Thank you!

I know this is an older post. But anyone managed to solve it or develop a module for it? Would be much appreciated. 

Link to comment
Share on other sites

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...