Jump to content

Product Combinations Help


Recommended Posts

I have been using combinations to allow customers to select things like color options etc but have one issue.

 

I want to be able to set one quantity not based on all criteria.

 

So lets say I am selling a 3D printed ball, but you can choose from 5 different colors. On my end quantities dont matter by color choice. So I'l just like to say I have 25 balls available and no matter the color or attribute choices it would subtract from 25 balls.

 

That way it saves me time and I can limit the amount I want to sell without making it seem there are 125 balls available just because I have to set each color to 25 to represent the quantities.

 

Here is an example from one of my products I'd like to be able to do this with. So is there any way to make color/attributes not pertain to quantity per choice but rather a single quantity overall?

 

So if someone chooses 2 red 4 blue-grey it wouldn't subtract from the color quantity but take 6 away from 25 available?

K4gjluT.png

Edited by cyris69 (see edit history)
Link to comment
Share on other sites

Or, could there be a way to skip using attributes all together and instead of the button/drop down being use that way but instead just making that add to order notes?

 

I tried using teh Customization tab and using text fields but that displays too low in the product page and easily overlooked.

Link to comment
Share on other sites

I am afraid they is no simple solution. If you setup 25 for each you might be able to get away a bit easier by modifying the Stock class, and have t always pull quantities out of the original product, instead of combinations. Still, it requires some php modifications (not easy at all)

  • Like 1
Link to comment
Share on other sites

I will be honest, if you know little about php it will be a headache, likely unsuccessful. It's hard to guide you as I didn't try it myself and it might take a few trials.

 

You can begin by having a look at the OrderHistory class, changeIdOrderState() method. Look for

 

StockAvailable::updateQuantity($product['product_id'], $product['product_attribute_id'], -(int)$product['product_quantity'], $order->id_shop);

 

And use 0 instead of product_attribute_id.

It *should*  grab default quantities here, when the order status changes

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