WooCommerce stock per attribute - wordpress

I have a technical problem with the WooCommerce plugin that I can't seem to find an answer for.
I got a variable product that has two different times for workshops.
So an example to simplify:
Product: Event day ticket
Workshop 1: Red | Blue | Green
Workshop 2: Red | Blue | green
On workshop 1, every attribute needs to have 5 stock but on workshop 2 every attribute needs to have 10 stock.
I can make combination variables but if I do that, every combination has it's own stock. Not the attribute itself.
Any idea on how to work with issue?
I hope I explained it well enough.

I ran into something similar and the answer is a Variable Product with addons (one option is WooCommerce's own plugin # https://woocommerce.com/products/product-add-ons/). You'd create Workshop as a variable attribute, then create product variations and set each Workshop's total number of tickets in the variations. Then create product addons for Red, Blue, and Green (you can set the cost of addons to any value including 0). That should give you the result you're seeking.

Attributes define available "options" (like colors as you have it) but you need to set the product to be a variable product (the default is simple product) using the dropdown at the top of that configuration section. Then, on the attributes section, check the box to use the attributes as variations. Finally, on the variations tab, create the variations from attributes.
Now, you can set stock levels, prices, and more for each variation of the product where a variation is a single or combination of attributes.
Note: You may need to go into the Woocommerce settings and check the box to manage inventory at the variation level. This is from memory so I don't recall if it's in the Woocommerce settings or an option when you switch the product to variable.

Related

linking two options filed in gravity form to one another

The issue i am facing is that i want to have two sepreate options field in gravity forms linked to one another. For example if i select option 1 in one filed then the same options get selected in the second field and update the price likewise.
enter image description here
on selecting the addon it updates the price based on number of adults.
i want to do the same with kids but if one select a addon mapped to adults the one mapped to kids should be automatically slected.

Customize function Variation product in Woocommerce

I have a project in wordpress and I am using woocommerce.
I have 3 attributes for each product and some variation. Look like this:
Now is mandatory to choose at least 1 variation for each attribute in order to get a price.
I wonder if its possible to get out a price from a first choice so I dont need to be forced to select the second and third attribute.
In my case I would like to get a 25 euro price if I select "digital".
So in some way "hide" or obfuscate all the other choices when "digital" is selected.
I found this plugin: "Simple linked variations for WooCommerce". but this just hide 1 variation based on one attribute and it does not show the price either.
I guess there must be something in the code that show the price ONLY if all 3 attributes are selected. And can hide/obfuscade another attribute (or give value 0).... ?
I solved it using product add-ons" instead of variations.
https://woocommerce.com/products/product-add-ons/
This extension lets you create various add-ons for a product, and you can set up conditions like the one I describe.

Algolia - WordPress custom ranking attribute by taxonomy / term

I have list of events that are correctly indexed into Algolia. I would like to be able to "order by" taxonomy/term.
1) first taxonomy is called events_weight (5 terms 1,2,3,4,5). I need the events to be able to order by the term displaying the ones that are 1 at the top and those that are 5 in the bottom. Is this at all possible?
2) second taxonomy is called events_status (active, inactive, promotion). Again I need to be able to order them. Promotion first, then active, then inactive. Is this possible?
Thank you
In your Algolia Dashboard, you can add the events_weight attributes as custom ranking.
For events_status, I would recommend you to convert the values to an integer, to use it as a custom ranking (or sorting).
You can add them both and decide which one go first. This video explains Algolia's tie breaking algorithm.

Woocommerce: Use Stock Management for different attributes

I would like to use the Stock Management in Woocommerce. I have some products which use variing attributes (sizes in my case), however, the stock management only lets me enter a anmount for the whole product (eg 11 running Shirts instead of 11 running shirts in size L). Is there any way to use stock management on attributes?
Thank you for your help.
From the variable product documentation:
Each variation may be assigned:[...]
Stock quantity – Stock for the specific variation, or left blank to use the product’s stock settings.
So, set your product as variable product and check "used for variation" for your size attribute like this:
Then go on the variation tab and generate a variation for each attribute value. On each variation, you have a checkbox to activate the stock management for this attribute value - if it's not checked, it will use the general product inventory in the inventory tab.

Drupal Commerce Products for printing company

I'm new to Commerce I hope some kind fellow could give me some directions here.
I am creating an ecommerce website for a printing company. I will give an example of what I require
For instance they will offer A6 flyers but these come in different specifications each with differing prices
Here is an example:
http://4frontdesigns.co.uk/Untitled-1.jpg
So down the left column are quantities of flyers and along thw top different speciifications of those flyers with the prices shown in the middle.
Any help much appreciated
Can I just add each variation of these one by one as it is not possible to just say that a certain additional attribute to the product will add so much $$ to the base price.
Would I just add each variation one by one then some how pull these all into one display?
You could use the commerce price table module like Flo suggested or look at the Price attributes Module https://www.drupal.org/project/commerce_pricing_attributes
It uses option sets and then add to (or subtract from) the price based on the selected attribute.
The answer for me was to create each product variation as its own product. So every variation gets added as a separate product.
If you are wondering how to add different variations to product such as paper size or colour, you would do this with taxonomy. Simply create a taxonomy term called colour and then add all the colours into this term that you would require.
Then when you create your product type in commerce, you would add this as an option to choose from when adding products by doing the following. Go to manange fields for the product type you want to add it for and add a new field, type of data = term reference. You will then select the desired taxonomy term and also there will be an option to 'Enable this field to function as an attribute field on Add to Cart forms.' - You want to select this!
Then what you do is create a product display and pull all these in to a single page, which then gives you drop down options to change, and the price changes accordingly in real time.
You can create a product display by creating a new content type first, call it product display... Then add a field to this content type which is a 'product reference'.
Now add new content, pick to create a product display (what we have just created) and choose the products that you want to appear on that page.
Then automatically Drupal Commerce will take care of the rest. Hope this helps someone!

Resources