English | 中文文档
Learn and rewrite parts of Shopify code based on my own business logic
- Shopify is powerful, but most of the themes are currently written in JQ, and some of the themes using React/Vue /ng are also compiled code that is hard to understand.
- Combined with its own business scenarios, this paper mainly rewrites Shopify product detail page multi-attribute combination switch and Shopify address select.
zepto & vue2.6
Shopify address page, country data from Shopify
tips:
- With the country switch as the entry point, refresh the overall UI. The UI layout needs to be defined in advance, as described in the
ADDRESS_FORMAT
in/checkout/checkout-countries.new.js
- The float animation for the Label of the form item needs to be added
transform: translateY(2px);
This component is inspired by sku multi-dimensional attribute state judgment algorithm It is recommended to master all the Knowledge points, otherwise reading the code will be more difficult