How do we achieve this?
In this tutorial, we will create Custom Fields with Stock Control.
Once we have created this custom field we can use it on any amount of products within our shop.
OK let's get started.
Login to your admin panel of Joomla and go to your Virtuemart link in the components menu.
Click on the Products menu item and the "Custom Fields" link.
Once inside the page click new button in the top right corner.
The custom field creation page will open, fill in the details as described bellow.
- Custom Field Type: Use the drop-down menu and click on the Plug-ins selection at the bottom.
- Title: Type in Size for our title.
- Published: choose Yes or we won't see our created fields.
- Parent: Leave as is.
- Cart Attribute: Click the Yes Radial button, we want to show the choices in our cart.
- Description: Leave blank this is for displaying a description label next to the options.
- Default: Leave blank
- Tooltip: Leave blank. this puts a little blue icon in your product details when moused over displays the tip.
- Layout position: Leave Blank. Depending on your template you can re-position the custom field.
- Admin only: No
- Is a List: No
- Hidden: No
- Select a Plug-in: Click on the drop down menu and choose "stockable Variants"
Once you choose "Stockable Variants" a box will open giving you four options for your custom fields. We will only require one.
Option Name: Type in "Select Size" this is our label.
Option Values: type each individual size you require on a new row, you could just type the number if you want i added the text as my own preference.
Once you have typed in your required sizes click save in the top right corner.
If it saved ok then now we can hit save&close and add our custom field to all the products that require them, which in our case is the shoes we added earlier.
Adding Custom Field To Our Product
Now open the product of choice which in our case is the shoes we added earlier.
Click on the Custom Fields tab
In the Custom Field Type box click on the menu and choose "Size". This is the only one in the list because our shop is quite new and we haven't created any others yet.
A new product box will open where we will enter our new size options.
In the field below, type stock quantity into product in stock field. type a Product name copy/paste the existing product name i added "size 3" to distinguish it in our products table.
Click NEW green button.
You will see a message "Product successfully saved" as bellow.
Then change the name again to reflect "Size4" and click the green button again.
You will see there are two saves in our list.
Repeat this process untill you have all the sizes required changing the size as you go.
You will see we have a list of saved child products, THIS IS THE IMPORTANT BIT.
Don't click the save button but click the refresh icon in your browser or press F5 on your keyboard. IMPORTANT!
Once the screen refreshes you will now see our child products.
Now you will see the child products created with the size option, Product Name, and stock levels to the right.
use the dropdown list on each child product to change the size to match the name.
Now we are done with creating our sizes with stock control.
Click the save and close button to tak yo back into your products listings.
You will see our "Black Court Shoes" has 5 children and all our child products listed with size variant so we can keep tight control over our stock levels.In the front end of our shop.
Your product will have a variant Size list for your customers to choose form and the stock control in the back-end of your shop.