Jump to content

Unique stock for combination


Recommended Posts

Hello! 

I'm searching a module who i can do this:

- Put a unique stock in combination

- This stock need to be changed once time and affect all products.

 

Here is my problem:

We sell t-shirts on demand, the client choose the product (the print on t-shirt), then choose the size, model and color. When the order is completed we start to make the t-shirt with a t-shirt printer.

Our stock is limited by our combinations, like size, model and color, not by the product by self. If the client place the order and it be out of stock, all products need to be out of stock with this combination (like: Size M, Color Black).

 

Link to comment
Share on other sites

In PrestaShop a product combination is made by combining attributes. From what I understand from your post, your attributes are size, model, color and print.

 

I can think of 2 approaches for your case.

 

First and the one that might be the easiest to implement is to make a module that will be hooked on actionUpdateQuantity and every time the quantity is changed for one combination it will look after other combinations that have the same size, model and color and update their quantity. The performance of this will depend on the number of combinations with those 3 attributes, more combinations, more updates to make.

 

Second and harder to implement is to modify the behavior of PrestaShop customization feature. Have product combinations made only by size, model and color. Create a module from which you can add predefined customizations (prints) to product combinations. List the predefined customizations in Front Office product page. In this case you don't have to worry about multiple quantities, you have only the quantity of the product combination and there can't be other combinations with the same size, model and color.

  • Like 1
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...