Auto Update Product Quantity From Product Options
This extension adds functionality to the admin system so that when you amend the quantity of product options, the main product quantity is automatically updated.
If a product doesn't have any options, or doesn't have any with quantities (e.g. text fields) the main quantity field does not get altered.
If a product has options with quantities (checkbox, select, radio) the total quantity for each option is calculated, and the lowest overall option quantity is then used as the main product quantity. e.g. if you have an option "Size" with a total quantity of 100, and an option "Colour" with a total quantity of 75, the main product quantity will be set at 75, and a warning displayed on the "Data" tab, next to the quantity.
You are selling a shirt which has the following options:
Red -> quantity = 9
Blue -> quantity = 11
Green -> quantity = 5
Total = 25
Small -> quantity = 5
Medium -> quantity = 8
Large -> quantity = 12
Total = 25
When you edit the product, the main product quantity (on the data tab) will be set to 25.
This extension assumes that all option quantities should add up to the same amount for a given product, e.g. if you have 25 shirts in stock, the option quantity for colour should total 25, and the option quantity for size should also total 25.
If for some reason your shop contains options with different totals within the same product (e.g. colour total = 25, size total = 20) then you should be aware that this extension will use the LOWEST option total as the main product quantity.
Product option quantities will not be altered by this extension, only the main product quantity.
If you have any questions or concerns about the extension, you can email me at ocextender [AT] hotmail.co.uk - Please be sure to tell me which version of OpenCart you are using and whether you are using any bespoke modifications on your site (including VQMods). Please also tell me any error messages that are relevant to this module, or attach the error logs to your email.
Please don't forget to give a star rating for this module :)
Please have a look at my other extensions - you can find them here: http://www.opencart.com/index.php?route=extension/extension&filter_username=ocextender
It has been mentioned that this extension will conflict with the "Dependent Options" module (http://www.opencart.com/index.php?route=extension/extension/info&extension_id=5214&filter_search=Dependent%20Options&filter_download_id=28&page=1). Thanks to thepaladin for mentioning this.