Magento 2 orderflow Bookmarklet

Test order

Source (tele2.nl)


Download Bookmarklet:


View Bookmarklet Code:

Bookmarklet Source Code:

javascript%3A%20%28function%28%29%20%7B%20%27use%20strict%27%3B%20var%20data%20%3D%20%5B%7B%20customer_title%3A%20%27male%27%2C%20firstname_initials%3A%20%27F%27%2C%20firstname%3A%20%27Test%27%2C%20lastname_prefix%3A%20%27%27%2C%20lastname%3A%20%27Test%27%2C%20date_of_birth%3A%20%272%20september%201945%27%2C%20%7D%2C%20%7B%20email%3A%20%[email protected]%27%2C%20email_confirmation%3A%20%[email protected]%27%2C%20zipcode%3A%20%271112XS%27%2C%20house_number%3A%20%2758%27%2C%20phone%3A%20%270640000000%27%20%7D%2C%20%7B%20id_type_dutch%3A%20%27passport%27%2C%20document_number_dutch%3A%20%27ABC123456%27%2C%20iban%3A%20%27NL98INGB0000000002%27%2C%20number_protection%3A%20true%2C%20number_mapping%3A%20true%20%7D%2C%20%7B%20family_status%3A%20%27married%27%2C%20monthly_income%3A%203000%2C%20monthly_expenses%3A%201000%20%7D%2C%20%7B%20agreement%3A%20true%20%7D%5D%3B%20function%20populateField%28key%2C%20value%29%20%7B%20var%20ctrl%20%3D%20document.getElementsByName%28key%29%5B0%5D%3B%20if%20%28ctrl.type%20%3D%3D%3D%20%27checkbox%27%20%7C%7C%20ctrl.type%20%3D%3D%3D%20%27radio%27%29%20%7B%20ctrl.checked%20%3D%20value%3B%20return%3B%20%7D%20ctrl.value%20%3D%20value%3B%20var%20blurEvt%20%3D%20document.createEvent%28%22HTMLEvents%22%29%3B%20blurEvt.initEvent%28%27blur%27%2C%20false%2C%20true%29%3B%20ctrl.dispatchEvent%28blurEvt%29%3B%20var%20changeEvt%20%3D%20document.createEvent%28%22HTMLEvents%22%29%3B%20changeEvt.initEvent%28%27change%27%2C%20false%2C%20true%29%3B%20ctrl.dispatchEvent%28changeEvt%29%3B%20%7D%20function%20populateStep%28step%2C%20_data%29%20%7B%20console.log%28%27populateStep%20%3A%3A%20%27%2C%20step%2C%20_data%29%3B%20Object.keys%28_data%29.forEach%28function%20%28key%29%20%7B%20populateField%28key%2C%20_data%5Bkey%5D%29%3B%20%7D%29%3B%20if%20%28data%5Bstep%5D%20%21%3D%3D%20undefined%29%20%7B%20var%20panels%20%3D%20document.querySelectorAll%28%27.panel-collapse.in%27%29%3B%20var%20currentPanel%20%3D%20panels%5Bpanels.length%20-%201%5D%3B%20currentPanel.querySelector%28%27.t2-btn-next%27%29.click%28%29%3B%20pollForStep%28step%20+%201%2C%20function%28%29%20%7B%20populateStep%28step%20+%201%2C%20data%5Bstep%5D%29%3B%20%7D%29%3B%20%7D%20%7D%20function%20pollForStep%28step%2C%20callback%29%20%7B%20var%20panels%20%3D%20document.querySelectorAll%28%27.panel-collapse.in%27%29%3B%20var%20stepPanelOpen%20%3D%20panels%5Bstep%20-%201%5D%20%21%3D%3D%20undefined%20%3F%20true%20%3A%20false%3B%20if%20%28%21document.getElementsByName%28Object.keys%28data%5Bstep%20-%201%5D%29%5B0%5D%29.length%20%7C%7C%20%21stepPanelOpen%29%20%7B%20setTimeout%28function%28%29%20%7B%20pollForStep%28step%2C%20callback%29%3B%20%7D%2C%20100%29%3B%20%7D%20else%20%7B%20callback%28%29%3B%20%7D%20%7D%20pollForStep%281%2C%20function%28%29%20%7B%20populateStep%281%2C%20data%5B0%5D%29%3B%20%7D%29%3B%20%7D%29%28%29%3B


Rate it:


Tags:

Comments

Comments so far. Add yours.