{"action":"created","issue":{"url":"https://api.github.com/repos/magento/magento2/issues/7322","repository_url":"https://api.github.com/repos/magento/magento2","labels_url":"https://api.github.com/repos/magento/magento2/issues/7322/labels{/name}","comments_url":"https://api.github.com/repos/magento/magento2/issues/7322/comments","events_url":"https://api.github.com/repos/magento/magento2/issues/7322/events","html_url":"https://github.com/magento/magento2/issues/7322","id":187430406,"number":7322,"title":"Extend Magento widget JS","user":{"login":"gabs77","id":300134,"avatar_url":"https://avatars.githubusercontent.com/u/300134?v=3","gravatar_id":"","url":"https://api.github.com/users/gabs77","html_url":"https://github.com/gabs77","followers_url":"https://api.github.com/users/gabs77/followers","following_url":"https://api.github.com/users/gabs77/following{/other_user}","gists_url":"https://api.github.com/users/gabs77/gists{/gist_id}","starred_url":"https://api.github.com/users/gabs77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabs77/subscriptions","organizations_url":"https://api.github.com/users/gabs77/orgs","repos_url":"https://api.github.com/users/gabs77/repos","events_url":"https://api.github.com/users/gabs77/events{/privacy}","received_events_url":"https://api.github.com/users/gabs77/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-11-04T20:26:24Z","updated_at":"2016-11-05T13:08:51Z","closed_at":null,"body":"Magento 2.1.2\r\n\r\n### Steps to reproduce\r\n<!--- Provide a set of unambiguous steps to reproduce this bug include code, if relevant  -->\r\nI create in app/code/Namespace/Modulename/view/frontend/requirejs-config.js\r\n`var config = {\r\n    map: {\r\n         '*': {\r\n                priceBox:'namespace_modulename/js/custompricebox',\r\n         }\r\n    }\r\n};`\r\n\r\nIn app/code/Namespace/Modulename/view/frontend/web/js/custompricebox.js\r\n\r\n`\r\ndefine(\r\n    [\r\n        'jquery',\r\n        'Magento_Catalog/js/price-utils',\r\n        'underscore',\r\n        'mage/template',\r\n        'mage/priceBox',\r\n        'jquery/ui'\r\n    ],\r\n    function ($, utils, _, mageTemplate) {\r\n\r\n        'use strict';\r\n        console.log('test');\r\n        $.widget('namespace_modulename.custompricebox', $.mage.priceBox, {\r\n            reloadPrice: function reDrawPrices() {\r\nconsole.log('test');\r\n                var priceFormat = (this.options.priceConfig && this.options.priceConfig.priceFormat) || {},\r\n                    priceTemplate = mageTemplate(this.options.priceTemplate);\r\n\r\n                _.each(this.cache.displayPrices, function (price, priceCode) {\r\n                    price.final = _.reduce(price.adjustments, function(memo, amount) {\r\n                        return memo + amount;\r\n                    }, price.amount);\r\n\r\n                    // you can put your custom code here.\r\n\r\n                    price.formatted = utils.formatPrice(price.final, priceFormat);\r\n\r\n                    $('[data-price-type=\"' + priceCode + '\"]', this.element).html(priceTemplate({data: price}));\r\n                }, this);\r\n            },\r\n        });\r\n\r\n        return $.namespace_modulename.custompricebox;\r\n    }\r\n);\r\n`\r\n\r\n### Expected result\r\n<!--- Tell us what should happen -->\r\n1. On load product page, the browser load custompricebox.js \r\n2. the console developer have the following text : test\r\n \r\n### Actual result\r\n1. On load product page, the browser don't load custompricebox.js \r\n2. the console developer don't have the following text : test\r\n<!--- (This may be platform independent comment) -->\r\n"},"comment":{"url":"https://api.github.com/repos/magento/magento2/issues/comments/258610434","html_url":"https://github.com/magento/magento2/issues/7322#issuecomment-258610434","issue_url":"https://api.github.com/repos/magento/magento2/issues/7322","id":258610434,"user":{"login":"gabs77","id":300134,"avatar_url":"https://avatars.githubusercontent.com/u/300134?v=3","gravatar_id":"","url":"https://api.github.com/users/gabs77","html_url":"https://github.com/gabs77","followers_url":"https://api.github.com/users/gabs77/followers","following_url":"https://api.github.com/users/gabs77/following{/other_user}","gists_url":"https://api.github.com/users/gabs77/gists{/gist_id}","starred_url":"https://api.github.com/users/gabs77/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabs77/subscriptions","organizations_url":"https://api.github.com/users/gabs77/orgs","repos_url":"https://api.github.com/users/gabs77/repos","events_url":"https://api.github.com/users/gabs77/events{/privacy}","received_events_url":"https://api.github.com/users/gabs77/received_events","type":"User","site_admin":false},"created_at":"2016-11-05T13:08:51Z","updated_at":"2016-11-05T13:08:51Z","body":"I have already read this article and several others article.\r\nSome developers try with me and we can't make it with success."}}
{"actor":{"display_login":"gabs77"}}