Skip to content

Commit

Permalink
1.0.1 | Initial for configuration dropdown
Browse files Browse the repository at this point in the history
  • Loading branch information
caothu159 committed Sep 8, 2017
1 parent 0bcb9e1 commit e308315
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 6 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
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)

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
Expand Down
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@
"require":
{
"php": "~5.6.5|7.0.2|7.0.4|~7.0.6",
"magento/framework": "100.1.*"
"magento/framework": "100.1.*",
"magento/module-catalog": "100.1.*",
"magento/module-configurable-product": "100.1.*"
},
"type": "magento2-module",
"version": "1.0.0",
"version": "1.0.1",
"authors": [
{
"name": "Tran Ngoc Duc",
Expand Down
3 changes: 2 additions & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Diepxuan_Catalog" setup_version="1.0.0">
<module name="Diepxuan_Catalog" setup_version="1.0.1">
<sequence>
<module name="Magento_Backend" />
<module name="Magento_Catalog" />
<module name="Magento_ConfigurableProduct" />
</sequence>
</module>
</config>
31 changes: 31 additions & 0 deletions view/frontend/web/js/configurable.js
Original file line number Diff line number Diff line change
@@ -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;
});

0 comments on commit e308315

Please sign in to comment.