04.07.2019 Views

frontend-developer-1

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Customize and Create JavaScript<br />

// app/code/SwiftOtter_Test/web/js/<br />

<br />

<br />

<br />

<br />

<br />

<br />

This layout XML is merged together, converted into JSON, and is available on the<br />

<strong>frontend</strong>.<br />

A common system on the <strong>frontend</strong> is to use layout processors. In the checkout one<br />

page block, in the getJsLayout method, you will see that these layout processors<br />

have the opportunity to modify the UI component details before they are rendered.<br />

This is especially helpful for the checkout as customer details are likely to change<br />

should they refresh the page after filling in their information. In the case of the<br />

checkout layout processor, you can find their contract here.<br />

HELPFUL LINKS:<br />

• https://www.mage2.tv/content/javascript/<strong>frontend</strong>-uicomponents/configuring-uicomponents-with-layout-xml/<br />

• https://alanstorm.com/magento-2-understanding-ui-componentregions/<br />

Copyright © 2018, SwiftOtter, Inc.<br />

88

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!