diff --git a/README.md b/README.md index aa4a973..f84fc52 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ Catalog amend for Magento 2 ================== -[![Latest version](https://img.shields.io/badge/latest-1.0.0-green.svg)](https://github.com/diepxuan/module-catalog) -[![Packagist](https://img.shields.io/badge/packagist-1.0.0-green.svg)](https://packagist.org/packages/diepxuan/module-catalog) +[![Latest version](https://img.shields.io/badge/latest-1.1.0-green.svg)](https://github.com/diepxuan/module-catalog) +[![Packagist](https://img.shields.io/badge/packagist-1.1.0-green.svg)](https://packagist.org/packages/diepxuan/module-catalog) [![Magento 2](https://img.shields.io/badge/Magento-%3E=2.1-blue.svg)](https://github.com/magento/magento2/tree/2.1) [![PHP >= 5.5.22](https://img.shields.io/badge/PHP-%3E=5.6.5-blue.svg)](https://packagist.org/packages/diepxuan/module-catalog) @@ -9,7 +9,8 @@ Catalog amend -------------- This extension amend the some feature to catalog for Magento 2. -- drag and drop positions in category +- ```1.0.0``` drag and drop to update products position in category. +- ```1.1.0``` dropdown out of stock. Installation diff --git a/composer.json b/composer.json index 942b8a7..ff91c9d 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "magento/framework": "100.1.*" }, "type": "magento2-module", - "version": "1.0.0", + "version": "1.0.1", "authors": [ { "name": "Tran Ngoc Duc", diff --git a/etc/module.xml b/etc/module.xml index e2f6023..c8e805a 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,9 +1,10 @@ - + + diff --git a/view/frontend/web/js/configurable.js b/view/frontend/web/js/configurable.js new file mode 100644 index 0000000..f6201dc --- /dev/null +++ b/view/frontend/web/js/configurable.js @@ -0,0 +1,31 @@ +define([ + 'jquery', + 'underscore', + 'mage/template', + 'priceUtils', + 'priceBox', + 'jquery/ui', + 'jquery/jquery.parsequery', + 'Magento_ConfigurableProduct/js/configurable', + 'Magento_Ui/js/modal/modal' +], function($, _, mageTemplate) { + 'use strict'; + + $.widget('mage.configurable', $.mage.configurable, { + + /** + * Generate the label associated with a configurable option. This includes the option's + * label or value and the option's price. + * @private + * @param {*} option - A single choice among a group of choices for a configurable option. + * @return {String} The option label with option value and price (e.g. Black +1.99) + */ + _getOptionLabel: function(option) { + console.log(option); + return option.label; + }, + + }); + + return $.mage.configurable; +});