Skip to main content

Timeline for how to build sku in magento2

Current License: CC BY-SA 3.0

5 events
when toggle format what by license comment
Apr 19, 2017 at 13:57 comment added 3bu1 require([ 'jquery' ], function ($) { $(document).ready(function() { alert($("input[type=text][name='product[sku]']").val()); }); }); this is my code...it says undefined.
Apr 19, 2017 at 13:12 comment added Kingshuk Deb Where you are doing it? In console or in code? If in console then it should work as expected. But if you are coding it then you need to use jQuery as module in rquirejs. Copy the code i have given and try to delete the alert part and add your code over there.
Apr 19, 2017 at 13:07 comment added 3bu1 but when i say $("xxxxx").val() it will give undefined, as there is no attribute value
Apr 19, 2017 at 12:57 comment added Kingshuk Deb Well you can code simple jQuery there too. Like this require([ 'jquery' ], function ($) { $(document).ready(function() { alert('hii'); }); });
Apr 19, 2017 at 12:35 history asked 3bu1 CC BY-SA 3.0