News:

Support the VirtueMart project and become a member

Main Menu

Products with size and stock

Started by thefbi, March 05, 2022, 07:43:28 AM

Previous topic - Next topic

thefbi

Hi,
I have t-shirts with different sizes.
Some sizes are not in stock.
I can't find a way to manage the stock with the size variants.

I currently have my product and children's products, exemepl :
Women's T-shirt = parent
T-shirt woman 1 = child 1
T-shirt woman 2 = child 2
Etc.

These t-shirts all have sizes S / M / L / XL, which I made with a custom field type "Chain".

Thanks for help.

Joomla 3.6.10
VM 3.8.8 10472




Studio 42

you ahve tu use multivariant or use generic variant and unpublish parent and set category in child 1, child 2
TO handel stock, you need 1 child per variant S / M / L / XL...

balai


Studio 42

Stockable Custom Fields use child too.
So if you have not plenty of child/variants you can use Virtuemart core directly

thefbi

OK, thank you,
i will try that and come back post the results.

thefbi

I managed to solve my problem with the Virtuemart Multi variant.
I tried to understand how it all works with the Virtuemart doc (https://docs.virtuemart.net/tutorials/product-creation/221-multivariant.html), but frankly, it's very difficult to understand how it works just with the doc, which is barely one page long.
It's a pity that there are no more explanations and examples.

So I will explain here how to do what I did.

Goal : Create selection fields, with stock management, for T-shirts, of different colors, sizes and for men or women.

Steps to follow:
1. Create a parent product, example Fairy T-Shirt
2. Then create each variant as a child product, example: Fairy T-Shirt - Blue - Female - S / Fairy T-Shirt - Blue - Female - M / Fairy T-Shirt - Blue - Female - L / Fairy T-Shirt - Blue - Female - XL. Do the same for each variant of this T-shirt (color, size and gender).
3. Create a custom field Multiple Variant. Cart attribute => Yes / Cart option => Yes / Template position => According to your template / Save.
4. Go to the parent product, custom fields tab.
5. Choose the multiple variant field.
6. Delete the texts that are automatically displayed in the field next to the "Name" type.
Change the type in the drop down menu to "Use a custom label".
Rename the field to "Gender" and indicate in the text field, one per line, Female / Male.
7. Click on "new" (the small + sign) to add a tree structure.
8. Select "Use a custom label", name it "Color" and type the colors in the text field (one per line).
9. Repeat the operation for the sizes.
10. Save.
11. Select in front of each child product in the list the corresponding selection criteria, EXCEPT for the parent.
12. Save and close.
13. For each child, set the stock.
14. That's it!

You see, that is a documentation example, not too complicated to write.

thefbi

Here is some screenshot of the product custom field

GJC Web Design

GJC Web Design
VirtueMart and Joomla Developers - php developers https://www.gjcwebdesign.com
VM4 AusPost Shipping Plugin - e-go Shipping Plugin - VM4 Postcode Shipping Plugin - Radius Shipping Plugin - VM4 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
https://extensions.joomla.org/profile/profile/details/67210
Contact for any VirtueMart or Joomla development & customisation