shoplazza-cli 1.1.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (400) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/LICENSE +21 -0
  3. package/README.md +206 -332
  4. package/README.zh.md +318 -0
  5. package/package.json +24 -70
  6. package/scripts/install.js +144 -0
  7. package/scripts/jsbuild/dev/index.js +123 -0
  8. package/scripts/jsbuild/index.js +77 -0
  9. package/{lib/checkout/build → scripts/jsbuild}/plugin/vite-plugin-add-extension-id.js +4 -2
  10. package/scripts/jsbuild/vite.config.js +35 -0
  11. package/scripts/run.js +29 -0
  12. package/.editorconfig +0 -28
  13. package/.prettierrc +0 -9
  14. package/bin/shoplazza +0 -137
  15. package/fixtures/assets/blog.scss +0 -74
  16. package/fixtures/assets/cart_modal.scss +0 -450
  17. package/fixtures/assets/collection_detail.js +0 -234
  18. package/fixtures/assets/collection_detail.scss +0 -345
  19. package/fixtures/assets/collection_list.scss +0 -11
  20. package/fixtures/assets/collection_slider.scss +0 -169
  21. package/fixtures/assets/feature_columns.scss +0 -26
  22. package/fixtures/assets/feature_product.scss +0 -109
  23. package/fixtures/assets/footer.js +0 -58
  24. package/fixtures/assets/footer.scss +0 -337
  25. package/fixtures/assets/four_images.scss +0 -29
  26. package/fixtures/assets/gallery.scss +0 -55
  27. package/fixtures/assets/header.js +0 -178
  28. package/fixtures/assets/header.scss +0 -929
  29. package/fixtures/assets/image_text.scss +0 -72
  30. package/fixtures/assets/logo_bar.scss +0 -11
  31. package/fixtures/assets/newsletter.scss +0 -90
  32. package/fixtures/assets/not_found.scss +0 -39
  33. package/fixtures/assets/page_detail.scss +0 -16
  34. package/fixtures/assets/pagination.scss +0 -150
  35. package/fixtures/assets/postcss.config.js +0 -6
  36. package/fixtures/assets/product_description.scss +0 -88
  37. package/fixtures/assets/product_detail.js +0 -634
  38. package/fixtures/assets/product_detail.scss +0 -1106
  39. package/fixtures/assets/relative_product.scss +0 -45
  40. package/fixtures/assets/reviews.scss +0 -70
  41. package/fixtures/assets/rich_text.scss +0 -71
  42. package/fixtures/assets/search.js +0 -87
  43. package/fixtures/assets/search.scss +0 -67
  44. package/fixtures/assets/slide.scss +0 -51
  45. package/fixtures/assets/slider.scss +0 -141
  46. package/fixtures/assets/test.scss +0 -1
  47. package/fixtures/assets/theme.css +0 -976
  48. package/fixtures/assets/theme.scss +0 -1100
  49. package/fixtures/assets/three_images.scss +0 -20
  50. package/fixtures/assets/tools.scss +0 -23
  51. package/fixtures/assets/two_images.scss +0 -24
  52. package/fixtures/assets/video.scss +0 -45
  53. package/fixtures/assets/video_text.scss +0 -63
  54. package/fixtures/config/settings_data.json +0 -107
  55. package/fixtures/config/settings_schema.json +0 -690
  56. package/fixtures/layout/theme.liquid +0 -76
  57. package/fixtures/locales/ar-SA.json +0 -212
  58. package/fixtures/locales/de-DE.json +0 -290
  59. package/fixtures/locales/en-US.json +0 -290
  60. package/fixtures/locales/es-ES.json +0 -290
  61. package/fixtures/locales/fr-FR.json +0 -290
  62. package/fixtures/locales/id-ID.json +0 -212
  63. package/fixtures/locales/it-IT.json +0 -212
  64. package/fixtures/locales/ja-JP.json +0 -289
  65. package/fixtures/locales/ko-KR.json +0 -290
  66. package/fixtures/locales/nl-NL.json +0 -290
  67. package/fixtures/locales/pl-PL.json +0 -290
  68. package/fixtures/locales/pt-PT.json +0 -212
  69. package/fixtures/locales/ru-RU.json +0 -212
  70. package/fixtures/locales/th-TH.json +0 -212
  71. package/fixtures/locales/zh-CN.json +0 -290
  72. package/fixtures/locales/zh-TW.json +0 -290
  73. package/fixtures/sections/apps.liquid +0 -47
  74. package/fixtures/sections/blog.liquid +0 -137
  75. package/fixtures/sections/collection_desc.liquid +0 -34
  76. package/fixtures/sections/collection_detail.liquid +0 -436
  77. package/fixtures/sections/collection_image.liquid +0 -104
  78. package/fixtures/sections/collection_list.liquid +0 -161
  79. package/fixtures/sections/collection_name.liquid +0 -34
  80. package/fixtures/sections/collection_slider.liquid +0 -330
  81. package/fixtures/sections/feature_columns.liquid +0 -275
  82. package/fixtures/sections/feature_product.liquid +0 -227
  83. package/fixtures/sections/footer.liquid +0 -488
  84. package/fixtures/sections/four_images.liquid +0 -160
  85. package/fixtures/sections/gallery.liquid +0 -258
  86. package/fixtures/sections/header.liquid +0 -1157
  87. package/fixtures/sections/html.liquid +0 -40
  88. package/fixtures/sections/image_text.liquid +0 -350
  89. package/fixtures/sections/instagram_plus.liquid +0 -393
  90. package/fixtures/sections/logo_bar.liquid +0 -183
  91. package/fixtures/sections/newsletter.liquid +0 -225
  92. package/fixtures/sections/not_found.liquid +0 -39
  93. package/fixtures/sections/overlay_image.liquid +0 -648
  94. package/fixtures/sections/page_detail.liquid +0 -39
  95. package/fixtures/sections/photo_collection.liquid +0 -433
  96. package/fixtures/sections/product_description.liquid +0 -208
  97. package/fixtures/sections/product_detail.liquid +0 -611
  98. package/fixtures/sections/products.liquid +0 -216
  99. package/fixtures/sections/relative_product.liquid +0 -121
  100. package/fixtures/sections/reviews.liquid +0 -115
  101. package/fixtures/sections/rich_text.liquid +0 -157
  102. package/fixtures/sections/search.liquid +0 -163
  103. package/fixtures/sections/slide.liquid +0 -719
  104. package/fixtures/sections/three_images.liquid +0 -157
  105. package/fixtures/sections/two_images.liquid +0 -125
  106. package/fixtures/sections/video.liquid +0 -95
  107. package/fixtures/sections/video_text.liquid +0 -128
  108. package/fixtures/snippets/bgset.liquid +0 -21
  109. package/fixtures/snippets/card_title.liquid +0 -8
  110. package/fixtures/snippets/cart_modal.liquid +0 -74
  111. package/fixtures/snippets/collection.liquid +0 -77
  112. package/fixtures/snippets/collection_filter_modal.liquid +0 -56
  113. package/fixtures/snippets/default_image_4.liquid +0 -14
  114. package/fixtures/snippets/default_image_6.liquid +0 -18
  115. package/fixtures/snippets/default_image_8.liquid +0 -23
  116. package/fixtures/snippets/four_images_item.liquid +0 -8
  117. package/fixtures/snippets/header_ads.liquid +0 -95
  118. package/fixtures/snippets/hero_image.liquid +0 -94
  119. package/fixtures/snippets/icon_video_play_large.liquid +0 -1
  120. package/fixtures/snippets/icon_video_play_medium.liquid +0 -4
  121. package/fixtures/snippets/icon_video_play_small.liquid +0 -4
  122. package/fixtures/snippets/lazyimg.liquid +0 -22
  123. package/fixtures/snippets/lazyimg_art.liquid +0 -36
  124. package/fixtures/snippets/lazysizes.liquid +0 -41
  125. package/fixtures/snippets/link.liquid +0 -2
  126. package/fixtures/snippets/pagination.liquid +0 -48
  127. package/fixtures/snippets/product.liquid +0 -126
  128. package/fixtures/snippets/product_art_tpl.liquid +0 -152
  129. package/fixtures/snippets/product_info_body.liquid +0 -337
  130. package/fixtures/snippets/product_info_tpl.liquid +0 -423
  131. package/fixtures/snippets/product_label.liquid +0 -46
  132. package/fixtures/snippets/settings.liquid +0 -295
  133. package/fixtures/snippets/social-meta-tags.liquid +0 -106
  134. package/fixtures/snippets/video_html.liquid +0 -11
  135. package/fixtures/snippets/video_source.liquid +0 -98
  136. package/fixtures/snippets/video_thumb_icon.liquid +0 -2
  137. package/fixtures/templates/404.liquid +0 -1
  138. package/fixtures/templates/collection.liquid +0 -92
  139. package/fixtures/templates/index.liquid +0 -206
  140. package/fixtures/templates/page.liquid +0 -1
  141. package/fixtures/templates/product.liquid +0 -99
  142. package/fixtures/templates/search.liquid +0 -1
  143. package/jest.config.js +0 -192
  144. package/lib/__tests__/log.test.js +0 -15
  145. package/lib/__tests__/utils.test.js +0 -69
  146. package/lib/app/api/cli.js +0 -225
  147. package/lib/app/api/openapi.js +0 -121
  148. package/lib/app/api/partnerOpenapi.js +0 -104
  149. package/lib/app/bin/index.js +0 -20
  150. package/lib/app/bin/javy/javy-arm-linux-v5.0.1 +0 -0
  151. package/lib/app/bin/javy/javy-arm-macos-v5.0.1 +0 -0
  152. package/lib/app/bin/javy/javy-x86_64-linux-v5.0.1 +0 -0
  153. package/lib/app/bin/javy/javy-x86_64-macos-v5.0.1 +0 -0
  154. package/lib/app/bin/javy/javy-x86_64-windows-v5.0.1 +0 -0
  155. package/lib/app/commands/config/actions/link.js +0 -189
  156. package/lib/app/commands/config/actions/use.js +0 -40
  157. package/lib/app/commands/config/index.js +0 -25
  158. package/lib/app/commands/config/link.js +0 -11
  159. package/lib/app/commands/config/use.js +0 -11
  160. package/lib/app/commands/deploy/actions/deploy.js +0 -196
  161. package/lib/app/commands/deploy/index.js +0 -11
  162. package/lib/app/commands/dev/actions/dev.js +0 -206
  163. package/lib/app/commands/dev/index.js +0 -11
  164. package/lib/app/commands/generate/actions/extension.js +0 -97
  165. package/lib/app/commands/generate/actions/generateCheckout.js +0 -58
  166. package/lib/app/commands/generate/actions/generateFunction.js +0 -56
  167. package/lib/app/commands/generate/actions/generateTheme.js +0 -128
  168. package/lib/app/commands/generate/extension.js +0 -11
  169. package/lib/app/commands/generate/index.js +0 -22
  170. package/lib/app/commands/index.js +0 -82
  171. package/lib/app/commands/info/actions/info.js +0 -168
  172. package/lib/app/commands/info/index.js +0 -11
  173. package/lib/app/commands/init/actions/init.js +0 -176
  174. package/lib/app/commands/init/index.js +0 -14
  175. package/lib/app/commands/versions/actions/list.js +0 -210
  176. package/lib/app/commands/versions/index.js +0 -22
  177. package/lib/app/commands/versions/list.js +0 -14
  178. package/lib/app/constant/code.js +0 -7
  179. package/lib/app/constant/color.js +0 -18
  180. package/lib/app/constant/extension.js +0 -16
  181. package/lib/app/constant/host.js +0 -23
  182. package/lib/app/constant/sso.js +0 -7
  183. package/lib/app/index.js +0 -8
  184. package/lib/app/services/auth/config.js +0 -33
  185. package/lib/app/services/auth/index.js +0 -9
  186. package/lib/app/services/auth/oauth-server.js +0 -70
  187. package/lib/app/services/auth/partner-token.js +0 -45
  188. package/lib/app/services/auth/sso-token.js +0 -69
  189. package/lib/app/services/auth/store-token.js +0 -100
  190. package/lib/app/services/auth/url-builder.js +0 -23
  191. package/lib/app/services/config/index.js +0 -41
  192. package/lib/app/services/devServer/app.js +0 -76
  193. package/lib/app/services/devServer/index.js +0 -103
  194. package/lib/app/services/devServer/middleware/hmacValidatorMiddleWare.js +0 -20
  195. package/lib/app/services/devServer/middleware/index.js +0 -5
  196. package/lib/app/services/devServer/tunnel/index.js +0 -43
  197. package/lib/app/services/devServer/tunnel/providers/cloudflare.js +0 -364
  198. package/lib/app/services/devServer/tunnel/providers/ngrok.js +0 -70
  199. package/lib/app/services/devServer/utils/index.js +0 -5
  200. package/lib/app/services/devServer/utils/secureCompare.js +0 -5
  201. package/lib/app/services/devServer/views/app.ejs +0 -133
  202. package/lib/app/services/extension-build/buildCheckout.js +0 -47
  203. package/lib/app/services/extension-build/buildFunction.js +0 -57
  204. package/lib/app/services/extension-build/buildTheme.js +0 -100
  205. package/lib/app/services/extension-build/index.js +0 -23
  206. package/lib/app/services/extension-build/plugins/vite-plugin-add-extension-id.js +0 -26
  207. package/lib/app/services/extension-diff/index.js +0 -132
  208. package/lib/app/services/extension-upsert/index.js +0 -21
  209. package/lib/app/services/extension-upsert/upsertCheckout.js +0 -44
  210. package/lib/app/services/extension-upsert/upsertFunction.js +0 -52
  211. package/lib/app/services/extension-upsert/upsertTheme.js +0 -113
  212. package/lib/app/services/oss/index.js +0 -45
  213. package/lib/app/services/partner/index.js +0 -52
  214. package/lib/app/store/base-store.js +0 -37
  215. package/lib/app/store/config-store.js +0 -55
  216. package/lib/app/store/config.js +0 -21
  217. package/lib/app/store/index.js +0 -14
  218. package/lib/app/store/install-store.js +0 -41
  219. package/lib/app/store/sso-store.js +0 -55
  220. package/lib/app/utils/asyncPool.js +0 -42
  221. package/lib/app/utils/debug/index.js +0 -16
  222. package/lib/app/utils/env.js +0 -24
  223. package/lib/app/utils/error.js +0 -20
  224. package/lib/app/utils/git.js +0 -20
  225. package/lib/app/utils/json.js +0 -27
  226. package/lib/app/utils/path.js +0 -33
  227. package/lib/app/utils/platform.js +0 -37
  228. package/lib/app/utils/request/cli.js +0 -72
  229. package/lib/app/utils/request/debug.js +0 -13
  230. package/lib/app/utils/request/openapi.js +0 -67
  231. package/lib/app/utils/request/partnerOpenapi.js +0 -47
  232. package/lib/app/utils/toml.js +0 -56
  233. package/lib/app/utils/views/message.js +0 -68
  234. package/lib/app/utils/views/select.js +0 -36
  235. package/lib/app/utils/withTempDir.js +0 -55
  236. package/lib/auth/__mocks__/getCode.js +0 -7
  237. package/lib/auth/__mocks__/index.js +0 -0
  238. package/lib/auth/child.js +0 -23
  239. package/lib/auth/getCode.js +0 -39
  240. package/lib/auth/index.js +0 -134
  241. package/lib/check.js +0 -28
  242. package/lib/checkout/api.js +0 -164
  243. package/lib/checkout/build/plugin/vite-plugin-transform-extension-html.js +0 -207
  244. package/lib/checkout/build/vite.config.js +0 -34
  245. package/lib/checkout/build.js +0 -38
  246. package/lib/checkout/config.js +0 -97
  247. package/lib/checkout/create.js +0 -132
  248. package/lib/checkout/delete.js +0 -26
  249. package/lib/checkout/deploy.js +0 -59
  250. package/lib/checkout/dev/index.js +0 -143
  251. package/lib/checkout/fields.js +0 -29
  252. package/lib/checkout/index.js +0 -63
  253. package/lib/checkout/preview.js +0 -52
  254. package/lib/checkout/pull.js +0 -22
  255. package/lib/checkout/push.js +0 -141
  256. package/lib/checkout/template/README.md +0 -34
  257. package/lib/checkout/template/_gitignore +0 -4
  258. package/lib/checkout/template/extension.config.js +0 -4
  259. package/lib/checkout/template/extensions/extension-template/extension.json +0 -10
  260. package/lib/checkout/template/extensions/extension-template/src/content.html +0 -3
  261. package/lib/checkout/template/extensions/extension-template/src/index.html +0 -5
  262. package/lib/checkout/template/extensions/extension-template/src/index.js +0 -11
  263. package/lib/checkout/template/extensions/extension-template/src/script.html +0 -3
  264. package/lib/checkout/template/extensions/extension-template/src/style.html +0 -3
  265. package/lib/checkout/template/package.json +0 -17
  266. package/lib/checkout/undeploy.js +0 -40
  267. package/lib/checkout/util.js +0 -201
  268. package/lib/checkout/verify.js +0 -16
  269. package/lib/checkout/version.js +0 -7
  270. package/lib/commands/__tests__/login.test.js +0 -77
  271. package/lib/commands/__tests__/logout.test.js +0 -29
  272. package/lib/commands/__tests__/store.test.js +0 -44
  273. package/lib/commands/__tests__/switch.test.js +0 -45
  274. package/lib/commands/login.js +0 -120
  275. package/lib/commands/logout.js +0 -23
  276. package/lib/commands/store.js +0 -14
  277. package/lib/commands/switch.js +0 -52
  278. package/lib/commands/theme/__tests__/delete.test.js +0 -49
  279. package/lib/commands/theme/__tests__/init.test.js +0 -21
  280. package/lib/commands/theme/__tests__/list.test.js +0 -80
  281. package/lib/commands/theme/__tests__/package.test.js +0 -17
  282. package/lib/commands/theme/__tests__/publish.test.js +0 -61
  283. package/lib/commands/theme/__tests__/pull.test.js +0 -69
  284. package/lib/commands/theme/__tests__/push.test.js +0 -63
  285. package/lib/commands/theme/__tests__/serve.test.js +0 -107
  286. package/lib/commands/theme/delete.js +0 -64
  287. package/lib/commands/theme/init.js +0 -51
  288. package/lib/commands/theme/list.js +0 -28
  289. package/lib/commands/theme/package.js +0 -37
  290. package/lib/commands/theme/publish.js +0 -56
  291. package/lib/commands/theme/pull.js +0 -62
  292. package/lib/commands/theme/push.js +0 -106
  293. package/lib/commands/theme/serve.js +0 -153
  294. package/lib/commands/theme/share.js +0 -20
  295. package/lib/commands/version.js +0 -6
  296. package/lib/common/constants.js +0 -24
  297. package/lib/common/db/partner.js +0 -91
  298. package/lib/common/inquirers/choose-app.js +0 -79
  299. package/lib/common/inquirers/choose-partner.js +0 -74
  300. package/lib/common/log.js +0 -15
  301. package/lib/common/login.js +0 -125
  302. package/lib/common/logout.js +0 -16
  303. package/lib/db/__mocks__/index.js +0 -9
  304. package/lib/db/__tests__/analytics.test.js +0 -19
  305. package/lib/db/__tests__/user.test.js +0 -20
  306. package/lib/db/analytics.js +0 -48
  307. package/lib/db/index.js +0 -9
  308. package/lib/db/user.js +0 -71
  309. package/lib/function/bin/index.js +0 -20
  310. package/lib/function/bin/javy/javy-arm-linux-v5.0.1 +0 -0
  311. package/lib/function/bin/javy/javy-arm-macos-v5.0.1 +0 -0
  312. package/lib/function/bin/javy/javy-x86_64-linux-v5.0.1 +0 -0
  313. package/lib/function/bin/javy/javy-x86_64-macos-v5.0.1 +0 -0
  314. package/lib/function/bin/javy/javy-x86_64-windows-v5.0.1 +0 -0
  315. package/lib/function/commands/compile.js +0 -43
  316. package/lib/function/commands/create.js +0 -77
  317. package/lib/function/commands/list.js +0 -18
  318. package/lib/function/commands/release.js +0 -69
  319. package/lib/function/index.js +0 -24
  320. package/lib/function/template/js/README.md +0 -37
  321. package/lib/function/template/js/_gitignore +0 -4
  322. package/lib/function/template/js/extension.config.json +0 -5
  323. package/lib/function/template/js/package.json +0 -17
  324. package/lib/function/template/js/src/index.js +0 -64
  325. package/lib/function/utils.js +0 -29
  326. package/lib/log.js +0 -13
  327. package/lib/openAPI/__mocks__/index.js +0 -20
  328. package/lib/openAPI/api.js +0 -76
  329. package/lib/openAPI/index.js +0 -56
  330. package/lib/oss.js +0 -102
  331. package/lib/partner-api/axios.js +0 -67
  332. package/lib/partner-api/index.js +0 -79
  333. package/lib/report.js +0 -37
  334. package/lib/theme-extension/api/index.js +0 -96
  335. package/lib/theme-extension/commands/build.js +0 -114
  336. package/lib/theme-extension/commands/connect.js +0 -73
  337. package/lib/theme-extension/commands/create.js +0 -105
  338. package/lib/theme-extension/commands/deploy.js +0 -56
  339. package/lib/theme-extension/commands/list.js +0 -35
  340. package/lib/theme-extension/commands/release.js +0 -59
  341. package/lib/theme-extension/commands/serve.js +0 -179
  342. package/lib/theme-extension/commands/versions.js +0 -55
  343. package/lib/theme-extension/index.js +0 -29
  344. package/lib/theme-extension/template/basic-app/README.md +0 -125
  345. package/lib/theme-extension/template/basic-app/extension.config.json +0 -4
  346. package/lib/theme-extension/template/basic-app/package.json +0 -18
  347. package/lib/theme-extension/template/basic-app/theme-app/assets/index.css +0 -4
  348. package/lib/theme-extension/template/basic-app/theme-app/assets-manifest.json +0 -1
  349. package/lib/theme-extension/template/basic-app/theme-app/blocks/index.liquid +0 -16
  350. package/lib/theme-extension/template/basic-app/theme-app/locales/ar-SA.json +0 -1
  351. package/lib/theme-extension/template/basic-app/theme-app/locales/de-DE.json +0 -1
  352. package/lib/theme-extension/template/basic-app/theme-app/locales/en-US.json +0 -6
  353. package/lib/theme-extension/template/basic-app/theme-app/locales/es-ES.json +0 -1
  354. package/lib/theme-extension/template/basic-app/theme-app/locales/fr-FR.json +0 -1
  355. package/lib/theme-extension/template/basic-app/theme-app/locales/id-ID.json +0 -1
  356. package/lib/theme-extension/template/basic-app/theme-app/locales/it-IT.json +0 -1
  357. package/lib/theme-extension/template/basic-app/theme-app/locales/ja-JP.json +0 -1
  358. package/lib/theme-extension/template/basic-app/theme-app/locales/ko-KR.json +0 -1
  359. package/lib/theme-extension/template/basic-app/theme-app/locales/nl-NL.json +0 -1
  360. package/lib/theme-extension/template/basic-app/theme-app/locales/pl-PL.json +0 -1
  361. package/lib/theme-extension/template/basic-app/theme-app/locales/pt-PT.json +0 -1
  362. package/lib/theme-extension/template/basic-app/theme-app/locales/ru-RU.json +0 -1
  363. package/lib/theme-extension/template/basic-app/theme-app/locales/th-TH.json +0 -1
  364. package/lib/theme-extension/template/basic-app/theme-app/locales/zh-CN.json +0 -6
  365. package/lib/theme-extension/template/basic-app/theme-app/locales/zh-TW.json +0 -1
  366. package/lib/theme-extension/template/basic-app/theme-app/snippets/index.liquid +0 -8
  367. package/lib/theme-extension/template/embed-app/README.md +0 -125
  368. package/lib/theme-extension/template/embed-app/extension.config.json +0 -4
  369. package/lib/theme-extension/template/embed-app/package.json +0 -18
  370. package/lib/theme-extension/template/embed-app/theme-app/assets-manifest.json +0 -1
  371. package/lib/theme-extension/template/embed-app/theme-app/blocks/index.liquid +0 -18
  372. package/lib/theme-extension/template/embed-app/theme-app/locales/ar-SA.json +0 -1
  373. package/lib/theme-extension/template/embed-app/theme-app/locales/de-DE.json +0 -1
  374. package/lib/theme-extension/template/embed-app/theme-app/locales/en-US.json +0 -6
  375. package/lib/theme-extension/template/embed-app/theme-app/locales/es-ES.json +0 -1
  376. package/lib/theme-extension/template/embed-app/theme-app/locales/fr-FR.json +0 -1
  377. package/lib/theme-extension/template/embed-app/theme-app/locales/id-ID.json +0 -1
  378. package/lib/theme-extension/template/embed-app/theme-app/locales/it-IT.json +0 -1
  379. package/lib/theme-extension/template/embed-app/theme-app/locales/ja-JP.json +0 -1
  380. package/lib/theme-extension/template/embed-app/theme-app/locales/ko-KR.json +0 -1
  381. package/lib/theme-extension/template/embed-app/theme-app/locales/nl-NL.json +0 -1
  382. package/lib/theme-extension/template/embed-app/theme-app/locales/pl-PL.json +0 -1
  383. package/lib/theme-extension/template/embed-app/theme-app/locales/pt-PT.json +0 -1
  384. package/lib/theme-extension/template/embed-app/theme-app/locales/ru-RU.json +0 -1
  385. package/lib/theme-extension/template/embed-app/theme-app/locales/th-TH.json +0 -1
  386. package/lib/theme-extension/template/embed-app/theme-app/locales/zh-CN.json +0 -6
  387. package/lib/theme-extension/template/embed-app/theme-app/locales/zh-TW.json +0 -1
  388. package/lib/theme-extension/template/embed-app/theme-app/snippets/index.liquid +0 -8
  389. package/lib/theme-extension/template/embed-app/theme-app/snippets/index_css.liquid +0 -6
  390. package/lib/theme-extension/utils/config.js +0 -32
  391. package/lib/theme-extension/utils/index.js +0 -213
  392. package/lib/tracing.js +0 -50
  393. package/lib/utils/config.js +0 -12
  394. package/lib/utils/console.js +0 -33
  395. package/lib/utils/env.js +0 -17
  396. package/lib/utils/file.js +0 -48
  397. package/lib/utils/platform.js +0 -37
  398. package/lib/utils/utils.js +0 -165
  399. /package/{lib/checkout → scripts/jsbuild}/dev/client.js +0 -0
  400. /package/{lib/app/services/extension-build/plugins → scripts/jsbuild/plugin}/vite-plugin-transform-extension-html.js +0 -0
@@ -1,126 +0,0 @@
1
- {% assign price = product.price %}
2
- {% assign compareAtPrice = product.compare_at_price %}
3
- {% assign title = product.title %}
4
- {% assign id = product.id %}
5
- {% assign type = product.type %}
6
- {% assign isMock = product.isMock %}
7
- {% assign wrapperHeight = "100%" %}
8
-
9
- {% if settings.product_grid_image_size == 'natural' %}
10
- {% assign wrapperHeight = 100 | divided_by: images[product.image.src].aspect_ratio | append: '%' %}
11
- {% elsif settings.product_grid_image_size %}
12
- {% assign wrapperHeight = settings.product_grid_image_size %}
13
- {% endif %}
14
-
15
- {% if image_size %}
16
- {% assign wrapperHeight = image_size %}
17
- {% endif %}
18
-
19
- {% if image_size == "auto" %}
20
- {% assign wrapperHeight = product.image.height | image_padding_bottom : product.image.width, 'unlimit' %}
21
- {% endif %}
22
-
23
- {% comment %} 小图情况处理 {% endcomment %}
24
- {% assign img_size = 'width: 100%;' %}
25
- {% assign rate = product.image.height | image_padding_bottom : product.image.width, origin: 'unlimit' | abs %}
26
- {% assign wrapper_rate = wrapperHeight | abs %}
27
- {% if rate > wrapper_rate %}
28
- {% assign img_size = 'height: 100%;' %}
29
- {% endif %}
30
-
31
- {% comment %} 遍历子产品list,找到第一个可用的子产品 {% endcomment %}
32
- {% if product.variants and product.available %}
33
- {% for item in product.variants %}
34
- {% if item.available %}
35
- {% assign variantsId = item.id %}
36
- {% assign variants = item | json %}
37
- {% break %}
38
- {% endif %}
39
- {% endfor %}
40
- {% endif %}
41
-
42
- <div data-track="item" data-track-price="{{price}}" data-track-id="{{id}}"
43
- data-track-type="{{type|escape}}" data-track-name="{{title|escape}}" class="product-snippet serial-item">
44
- {% if beforeTplId %}
45
- {% include beforeTplId %}
46
- {% endif %}
47
- <a {% unless isMock %}href="{{product.url}}"{% endunless %} class="product-snippet__img-wrapper common__img-wrapper_lazy"
48
- style="padding-bottom: {{wrapperHeight}}; width: 100%; {% if isMock %}background: #f7f7f7;{% endif %}">
49
- {% include 'lazyimg',
50
- src: product.image.src,
51
- style: img_size,
52
- alt: product.image.alt | default: title
53
- %}
54
-
55
- <div class="d-none d-md-block">
56
- {% if product.available %}
57
- <div class="product-snippet__mask">
58
- {% if settings.quick_view_btn_text and settings.is_quick_view_btn_show %}
59
- <button type="button" class="btn btn-primary product-snippet__btn text-truncate"
60
- data-safe-href="prevent"
61
- {% unless isMock %} data-product-id="{{id}}" data-track="quick_shop" data-track-product-id="{{id}}" {% else %}data-product-mock="true"{% endunless %}
62
- data-product-url="{{ product.url }}"
63
- data-product-variants-id="{{ variantsId }}"
64
- data-product-variants='{{ variants }}'
65
- data-product='{"title":{{title | escape | json }},"type":{{type | json }},"id":{{id | json }},"url":{{product.url | json }},"image":{{ product.image | json }} }' >
66
- {{ settings.quick_view_btn_text }}
67
- </button>
68
- {% endif %}
69
- </div>
70
- {% else %}
71
- <div class="product-snippet__mask" style="opacity: 1;">
72
- <button type="button" disabled class="btn btn-primary product-snippet__btn text-truncate">{{ 'i18n.general.product.sold_out' | t }}</button>
73
- </div>
74
- {% endif %}
75
- </div>
76
-
77
- {% include 'product_label', product: product %}
78
-
79
- {% unless product.available %}
80
- <div class="d-md-none product-snippet__soldout">{{ 'i18n.general.product.sold_out' | t }}</div>
81
- {% endunless %}
82
- {% if contentTplId %}
83
- {% include contentTplId) %}
84
- {% endif %}
85
- </a>
86
- <a {% unless isMock %}href="{{product.url}}"{% endunless %} class="product-snippet__title-normal two_line_text_truncate dj_skin_product_list_title">{{title}}</a>
87
- <div class="product-info__vendor text-center dj_skin_product_list_title">{{ product.vendor }}</div>
88
- <div class="product-snippet__price-wrapper text-center">
89
- <span class="text-truncate dj_skin_product_price money">{{price | money_with_symbol}}</span>
90
- {% assign compareAtPrice = compareAtPrice | times: 1 %}
91
- {% assign price = price | times: 1 %}
92
- {% if compareAtPrice > price %}
93
- <del class="text-truncate dj_skin_product_compare_at_price money">
94
- {{compareAtPrice | money_with_symbol}}
95
- </del>
96
- {% endif %}
97
- </div>
98
- {% if settings.collection_color_swatches %}
99
- {% for option in product.options %}
100
- {% assign option_name = option.name | downcase %}
101
- {% if option_name contains 'color' or option_name contains 'colour' %}
102
- {% assign option_index = forloop.index0 %}
103
- {% assign values = '' %}
104
- <div class="grid-product__colors text-center mt-2">
105
- {% for variant in product.variants %}
106
- {% assign value = variant.options[option_index].value %}
107
- {% unless values contains value %}
108
- {% assign values = values | join: ',' %}
109
- {% assign values = values | append: ',' | append: value %}
110
- {% assign values = values | split: ',' %}
111
- {% assign color_swatch_fallback = value | split: ' ' | last | handle %}
112
- <a
113
- href="{{ variant.url }}"
114
- class="color-swatch"
115
- style="background-color: {{ color_swatch_fallback }};">
116
- </a>
117
- {% endunless %}
118
- {% endfor %}
119
- </div>
120
- {% endif %}
121
- {% endfor %}
122
- {% endif %}
123
- {% if afterTplId %}
124
- {% include afterTplId) %}
125
- {% endif %}
126
- </div>
@@ -1,152 +0,0 @@
1
- <script type="text/html" id="product_art_tpl">
2
- <% var price = product.price || 0; %>
3
- <% var compareAtPrice = product.compare_at_price || 0; %>
4
- <% var title = product.title || ''; %>
5
- <% var id = product.id || ''; %>
6
- <% var url = product.url || ''; %>
7
- <% var type = product.type || ''; %>
8
- <% var isMock = product.isMock || false; %>
9
- <% var wrapperHeight = "100%" %>
10
-
11
- <% if ('{{settings.product_grid_image_size}}' == 'natural') { %>
12
- <% wrapperHeight = $imports.image_padding_bottom(product.image.width, product.image.height); %>
13
- <% } else if ('{{settings.product_grid_image_size}}') { %>
14
- <% wrapperHeight = "{{settings.product_grid_image_size}}"; %>
15
- <% } %>
16
-
17
- <% if (image_size) { %>
18
- <% wrapperHeight = image_size; %>
19
- <% } %>
20
-
21
- <% if (image_size == "auto") { %>
22
- <% wrapperHeight = $imports.image_padding_bottom(product.image.width, product.image.height); %>
23
- <% } %>
24
-
25
- {% comment %} 小图情况处理 endcomment {% endcomment %}
26
- <% var img_size = 'width: 100%;' %>
27
- <% var rate = $imports.image_padding_bottom(product.image.width, product.image.height); %>
28
- <% var wrapper_rate = wrapperHeight; %>
29
- <% if ($imports.getNumber(rate) > $imports.getNumber(wrapper_rate)) { %>
30
- <% img_size = 'height: 100%;' %>
31
- <% } %>
32
-
33
- {% comment %}遍历子产品list,找到第一个可用的子产品 {% endcomment %}
34
- <% if (product.variants && product.available) { %>
35
- <% for(var i = 0; i < product.variants.length; i++){ %>
36
- <% if (product.variants[i].available) { %>
37
- <% var variantsId = product.variants[i].id; %>
38
- <% var variants = product.variants[i]; %>
39
- <% break; %>
40
- <% } %>
41
- <% } %>
42
- <% } %>
43
-
44
- <% if (product.published) { %>
45
- <div data-track="item" data-track-price="<%=price%>" data-track-id="<%=id%>"
46
- data-track-type="<%=type%>" data-track-name="<%=title%>" class="product-snippet serial-item">
47
- <% if($data.beforeTplId) { %>
48
- <% include ($data.beforeTplId, $data) %>
49
- <% } %>
50
- <a <% if (!isMock) { %> href="<%=product.url%>" <% } %> class="product-snippet__img-wrapper common__img-wrapper_lazy"
51
- style="padding-bottom: <%= wrapperHeight %>; width: 100%">
52
- <% include ('lazyimg_art', {
53
- image: {
54
- alt: product.image.alt || title,
55
- style: img_size,
56
- src: product.image.src,
57
- }
58
- }) %>
59
- <div class="d-none d-md-block">
60
- <% if (product.available) { %>
61
- <div class="product-snippet__mask">
62
- {% comment %} 1)此处需要用liquid语法,否则拿不到settings; 2) '<%=variants%>' 必须用单引号 {% endcomment %}
63
- {% if settings.quick_view_btn_text and settings.is_quick_view_btn_show %}
64
- <button type="button" class="btn btn-primary product-snippet__btn text-truncate"
65
- data-safe-href="prevent"
66
- <% if (isMock) { %> data-product-mock="true" <% } else { %> data-product-id="<%=id%>" data-track="quick_shop" data-track-product-id="<%=id%>" <% }%>
67
- data-product-url="<%=url%>"
68
- data-product-variants-id="<%=variantsId%>"
69
- data-product-variants='<%=variants%>'
70
- data-product='{"title":"<%=title%>","type":"<%=type%>","id":"<%=id%>","url":"<%=url%>","image":<%=product.image%>}'
71
- >
72
- {{ settings.quick_view_btn_text }}
73
- </button>
74
- {% endif %}
75
- </div>
76
- <% } else { %>
77
- <div class="product-snippet__mask" style="opacity: 1;">
78
- <button type="button" disabled class="btn btn-primary product-snippet__btn text-truncate" style="white-space: normal; font-size: 13px; line-height: 16px; text-indent: 0; padding: 0;">{{ 'i18n.general.product.sold_out' | t }}</button>
79
- </div>
80
- <% } %>
81
- </div>
82
- <%
83
- var on_sale = product.compare_at_price - product.price > 0 ? true : false;
84
- var save_label = on_sale && product.available && {{settings.product_save_amount | default: false}};
85
- var discount_label = on_sale && product.available && {{settings.is_discount_show | default: false }};
86
- %>
87
- <% if (save_label || discount_label) { %>
88
- <div class="product-info__label product-info__label-{{settings.label_style | default: 'triangle'}}">
89
- {% comment %} 折扣 {% endcomment %}
90
- <% if (discount_label) { %>
91
- <div class="product-info__discount-label product-info__header_tag">
92
- <%- "{{ 'i18n.product.product_detail.off' | t }}".replace(/\{\{\s*count\s*\}\}/, ((1-product.price/product.compare_at_price)*100).toFixed(0)) %>
93
- </div>
94
- <% } %>
95
- {% comment %} 优惠金额 {% endcomment %}
96
- <% if (save_label) { %>
97
- <div class="product-info__save-label">
98
- <% var saved_amount = $imports.finance_money_with_symbol((product.compare_at_price - product.price).toFixed(2)); %>
99
- <%- "{{ 'i18n.product.product_detail.save_html' | t }}".replace(/\{\{\s*saved_amount\s*\}\}/, saved_amount) %>
100
- </div>
101
- <% } %>
102
- </div>
103
- <% } %>
104
- <% if (!product.available) { %>
105
- <div class="d-md-none product-snippet__soldout">{{ 'i18n.general.product.sold_out' | t }}</div>
106
- <% } %>
107
- <% if(typeof $data.contentTplId == "string") { %>
108
- <% include ($data.contentTplId, $data) %>
109
- <% } else if(typeof $data.contentTplId == "function") { %>
110
- <%- $data.contentTplId($data) %>
111
- <% } %>
112
- </a>
113
- <a <% if (product.url) { %> href="<%=product.url%>" <% } %> class="product-snippet__title-normal two_line_text_truncate dj_skin_product_list_title"><%= title %></a>
114
- <div class="product-info__vendor text-center dj_skin_product_list_title"><%= product.vendor %></div>
115
- <div class="product-snippet__price-wrapper text-center">
116
- <span class="text-truncate dj_skin_product_price money" style="color: <%=price_color%>"><%= $imports.finance_money_with_symbol(price) %></span>
117
- <% if (compareAtPrice * 1 > price * 1) { %>
118
- <del class="text-truncate dj_skin_product_compare_at_price dj_skin_product_compare_at_price money">
119
- <%= $imports.finance_money_with_symbol(compareAtPrice) %>
120
- </del>
121
- <% } %>
122
- </div>
123
- {% if settings.collection_color_swatches %}
124
- <% for(var i = 0;i < (product.options && product.options.length); i++) { %>
125
- <% var option = product.options[i]; %>
126
- <% var option_name = option.name.toLowerCase(); %>
127
- <% if (option_name.indexOf('color') > -1 || option_name.indexOf('colour') > -1) { %>
128
- <% var option_index = i; %>
129
- <% var values = ''; %>
130
- <div class="grid-product__colors text-center mt-2">
131
- <% for(var j = 0;j < (product.variants && product.variants.length); j++) { %>
132
- <% var variant = product.variants[j]; %>
133
- <% var value = variant.options[option_index].value %>
134
- <% if (values.indexOf(value) == -1) { %>
135
- <% values = values + ',' + value; %>
136
- <a
137
- href="<%= variant.url %>"
138
- class="color-swatch"
139
- style="background-color: <%= value %>;">
140
- </a>
141
- <% } %>
142
- <% } %>
143
- </div>
144
- <% } %>
145
- <% } %>
146
- {% endif %}
147
- <% if($data.afterTplId) { %>
148
- <% include ($data.afterTplId, $data) %>
149
- <% } %>
150
- </div>
151
- <% } %>
152
- </script>
@@ -1,337 +0,0 @@
1
- <div class="product-info__content">
2
- {% for block in section.blocks %}
3
- {% if block.type contains 'shoplazza://apps' %}
4
- {% render block %}
5
- {% continue %}
6
- {% endif %}
7
- {% if block.type == 'vendor' and product.vendor %}
8
- <div class="dj_skin_product_list_title">{{ product.vendor }}</div>
9
- {% endif%}
10
- {% if block.type == 'title' and product.title %}
11
- <h1 class="product-info__header_title dj_skin_product_title {% if block.settings.title_style == 'more_hide' %} product-info__header_title-more-hide {% elsif block.settings.title_style == 'hide' %} product-info__header_title-hide {% endif %}">{{ product.title | escape }}</h1>
12
- {% endif%}
13
- {% if block.type == 'sub_title' and product.brief %}
14
- <p class="product-info__header_brief">{{ product.brief }}</p>
15
- {% endif %}
16
- {% if block.type == 'SKU' and selectedVariant != nill %}
17
- <p class="product-info__header-sku">{{ selectedVariant.sku }}</p>
18
- {% endif %}
19
- {% if block.type == 'price' %}
20
- <div class="product-info__header_price-wrapper">
21
- <div class="product-info__header_price-wrapper-left">
22
- {% assign current = selectedVariant | default: product %}
23
- <span class="product-info__header_price dj_skin_product_detail_price money">
24
- {% if selectedVariant == nill %}
25
- {% if priceMax > priceMin %}
26
- {{ priceMin | money_with_symbol}} - {{ priceMax | money_with_symbol}}
27
- {% else %}
28
- {{ priceMin | money_with_symbol}}
29
- {% endif %}
30
- {% else %}
31
- {{ selectedVariant.price | money_with_symbol }}
32
- {% endif %}
33
- </span>
34
-
35
- {% assign price_minus = current.compare_at_price | minus: current.price %}
36
- {% if price_minus > 0 %}
37
- <span class="product-info__header_compare-at-price dj_skin_product_compare_at_price money">
38
- {{current.compare_at_price | money_with_symbol}}
39
- </span>
40
- {% endif %}
41
- </div>
42
- <span class="product-info__header_sales">
43
- {{ 'i18n.product.product_detail.sold' | t: count: product.sales }}
44
- </span>
45
- </div>
46
- {% endif %}
47
- {% if block.type == 'variant' %}
48
- <div class="product-info__variants ">
49
- {% for opt in product.options %}
50
- {% assign optIdx = forloop.index | downcase | prepend: 'option' %}
51
- {% if selectedVariant != nill %}
52
- {% assign selectedOptValue = selectedVariant[optIdx] %}
53
- {% endif %}
54
- {% comment %} 色卡 {% endcomment %}
55
- {% if settings.product_color_swatches %}
56
- {% assign optname = opt.name | downcase %}
57
- {% assign is_color = false %}
58
- {% if optname contains 'color' or optname contains 'colour' %}
59
- {% assign is_color = true %}
60
- {% endif %}
61
- {% endif %}
62
-
63
- {% assign variantDisabledArray = '' %}
64
- {% for value in opt.values %}
65
- {% comment %} 计算按钮是否需要禁用 {% endcomment %}
66
- {% assign variantDisabled = 0 %}
67
- {% if selectedVariant != nil %}
68
- {% comment %}选中子款式 替换其中一个属性值 对应的子商品不存在,该属性值禁用{% endcomment %}
69
- {% assign variantDisabled = 1 %}
70
- {% assign option1Value = selectedVariant.option1 | default: '' %}
71
- {% if optIdx contains 'option1' %}
72
- {% assign option1Value = value | default: '' %}
73
- {% endif %}
74
- {% assign option2Value = selectedVariant.option2 | default: '' %}
75
- {% if optIdx contains 'option2' %}
76
- {% assign option2Value = value | default: '' %}
77
- {% endif %}
78
- {% assign option3Value = selectedVariant.option3 | default: '' %}
79
- {% if optIdx contains 'option3' %}
80
- {% assign option3Value = value | default: '' %}
81
- {% endif %}
82
- {% for variant in product.variants %}
83
- {% assign v1 = variant.option1 | default: '' %}
84
- {% assign v2 = variant.option2 | default: '' %}
85
- {% assign v3 = variant.option3 | default: '' %}
86
- {% if variant.available and option1Value == v1 and option2Value == v2 and option3Value == v3 %}
87
- {% assign variantDisabled = 0 %}
88
- {% endif %}
89
- {% endfor %}
90
- {% else %}
91
- {% comment %}没有选中子商品需要检查该属性值是否有对应的子商品,没有需要禁用{% endcomment %}
92
- {% assign variantExists = 0 %}
93
- {% if optIdx contains 'option1' and variantExists == 0 %}
94
- {% for variant in product.variants %}
95
- {% if value == variant.option1 and variant.available_quantity > 0 %}
96
- {% assign variantExists = 1 %}
97
- {% endif %}
98
- {% endfor %}
99
- {% endif %}
100
- {% if optIdx contains 'option2' and variantExists == 0 %}
101
- {% for variant in product.variants %}
102
- {% if value == variant.option2 and variant.available_quantity > 0 %}
103
- {% assign variantExists = 1 %}
104
- {% endif %}
105
- {% endfor %}
106
- {% endif %}
107
- {% if optIdx contains 'option3' and variantExists == 0 %}
108
- {% for variant in product.variants %}
109
- {% if value == variant.option3 and variant.available_quantity > 0 %}
110
- {% assign variantExists = 1 %}
111
- {% endif %}
112
- {% endfor %}
113
- {% endif %}
114
-
115
- {% if variantExists == 0 %}
116
- {% assign variantDisabled = 1 %}
117
- {% endif %}
118
- {% endif %}
119
- {% unless product.available or product.published %}
120
- {% assign variantDisabled = 1 %}
121
- {% endunless %}
122
- {% assign variantDisabledArray = variantDisabledArray | append: variantDisabled %}
123
- {% endfor %}
124
-
125
- {% if is_color or variant_type == 'button' %}
126
- <div class="product-info__variants_items">
127
- <div class="product-info__variants_title">{{ opt.name }}{% if is_color %}<span id="variant_color-label">{%if selectedOptValue%} - {{selectedOptValue}}{%endif%}</span>{% endif %}</div>
128
- <div class="product-info__variants_value-wrapper">
129
- {% for value in opt.values %}
130
- {% assign isDisabled = variantDisabledArray | slice: forloop.index0, 1 %}
131
- <span class="btn product-info__variants_value {% if is_color %}product-info__variants_value_color{% endif %}">
132
- <input type="radio" class="d-none product-info__variants_radio" name="{{ optIdx }}-{{product.id}}" id="{{ optIdx }}-{{ forloop.index0 }}-{{product.id}}" {% if isDisabled == 1 %} disabled {% elsif value == selectedOptValue %} checked {% endif %} value="{{ value | escape }}" />
133
- {% if is_color %}
134
- <label data-iscolor style="background-color: {{value}};" for="{{ optIdx }}-{{ forloop.index0 }}-{{product.id}}" data-variants-value="{{ value | escape }}" class="mb-0" data-options-order="{{ forloop.index0 }}" data-click="select"></label>
135
- {% else %}
136
- <label for="{{ optIdx }}-{{ forloop.index0 }}-{{product.id}}" data-variants-value="{{ value | escape }}" class="mb-0" data-options-order="{{ forloop.index0 }}" data-click="select">
137
- {{ value }}
138
- </label>
139
- {% endif %}
140
- </span>
141
- {% endfor %}
142
- </div>
143
- </div>
144
- {% else %}
145
- <div class="product-info__variants_items d-inline-block w-100">
146
- <div class="dj_skin_title_font product-info__variants_title">{{ opt.name }}</div>
147
- {% unless settings.is_select_default_variants or selectedVariantId %}
148
- {% assign showDefault = true %}
149
- {% endunless %}
150
- <select {% if showDefault %}class="tw-text-black tw-opacity-50"{% endif %}>
151
- {% if showDefault %}
152
- <option disabled selected>{{'i18n.product.product_detail.please_select' | t}}</option>
153
- {% endif %}
154
- {% for value in opt.values %}
155
- {% assign isDisabled = variantDisabledArray | slice: forloop.index0, 1 %}
156
- <option data-soldout="{{ 'i18n.product.product_detail.sold_out' | t }}" {% if isDisabled == 1 %}disabled{% endif %} name="{{ optIdx }}-{{product.id}}" id="{{ optIdx }}-{{ forloop.index0 }}-{{product.id}}" class="text-center d-inline-block product-info__variants_value" value="{{ value | escape }}" {% if value == selectedOptValue %} selected {% endif %}>
157
- {{ value }}{% if isDisabled == 1 %} ({{ 'i18n.product.product_detail.sold_out' | t }}){% endif %}
158
- </option>
159
- {% endfor %}
160
- </select>
161
- </div>
162
- {% endif %}
163
- {% endfor %}
164
- </div>
165
- {% endif %}
166
- {% if block.type == 'quantity' %}
167
- <div class="product-info__qty_container">
168
- <div class="qty-title product-info__qty_title">
169
- {{ 'i18n.product.product_detail.qty' | t }}
170
- {% assign is_stock_show = settings.is_stock_show | default: true %}
171
- {% if is_stock_show %}
172
- {% unless selectedVariant == nill %}
173
- <span class="product-info__qty_stock">
174
- {% if selectedVariant.inventory_quantity > 0 and product.inventory_tracking %}
175
- {{'i18n.product.product_detail.in_stock' | t: count:selectedVariant.inventory_quantity }}
176
- {% endif %}
177
- </span>
178
- {% endunless %}
179
- {% endif %}
180
- </div>
181
- <div class="product-info__qty {% if variant_type == 'dropdown' %}product-info__qty-dropdown{% endif %}">
182
- <button type="button" class="btn product-info__qty_btn product-info__qty_decr" data-click="decrease" disabled="">-</button>
183
- <input class="form-control product-info__qty_num" id="product_quantity_{{product.id}}" name="quantity" type="text" value="1">
184
- <button type="button" class="btn product-info__qty_btn product-info__qty_incr" data-click="increase">+</button>
185
- </div>
186
- </div>
187
- {% endif %}
188
- {% if block.type == 'checkout' %}
189
- <div class="product-info__btn product-info__btn_2">
190
- {% if product.published and product.available %}
191
- {% if block.settings.add_to_cart %}
192
- <button type="button" class="btn btn-secondary" data-click="addToCart" data-track="click" {% if settings.add_to_cart_process == "to_checkout" %}data-track-content="checkout" data-track-source="buy_now"{% else %}data-track-content="add_to_cart" data-track-source="add_to_cart"{% endif %}>
193
- {{ 'i18n.product.product_detail.add_to_cart' | t }}
194
- </button>
195
- {% endif %}
196
- {% if block.settings.dynamic_checkout %}
197
- <button type="button" class="btn btn-primary" data-click="submit" data-track="click" data-track-content="checkout" data-track-source="buy_now">{{ 'i18n.product.product_detail.buy_now' | t }}</button>
198
- {% endif %}
199
- {% else %}
200
- <button type="button" class="btn btn-primary" style="width: 100%;" disabled>{{ 'i18n.product.product_detail.sold_out' | t }}</button>
201
- {% endif %}
202
- </div>
203
- {% assign paypal_express_enabled = shop.payment_settings.paypal_express_enabled %}
204
- {% unless REQUEST_URI contains "view=ajax" %}
205
- {% if paypal_express_enabled %}
206
- <div class="placeholder-paypal-express-button-container"></div>
207
- {% endif %}
208
- {% endunless %}
209
- {% endif %}
210
- {% comment %} view=ajax不加载tab {% endcomment %}
211
- {% unless REQUEST_URI contains "view=ajax" %}
212
- {% if block.type == 'description_style' %}
213
- <div class="product-info__desc-tab">
214
- <div class="product-info__desc-wrap {% if block.settings.description_style == 'visible' %}is-open {% endif %}" >
215
- <label class="product-info__desc-tab-header" for="r-{{ section.id }}-desc">
216
- <span class="product-info__desc-text">
217
- {{ 'i18n.product.product_detail.product_description' | t }}
218
- </span>
219
- <i class="sep-font sep-font-angle-down-strong product-info__desc-icon"></i>
220
- </label>
221
- <input autocomplete="off" type="checkbox" name="r-{{ section.id }}-desc" class="product-info__desc-tab-cb" id="r-{{ section.id }}-desc" {% if block.settings.description_style == 'visible' %} checked {% endif %}/>
222
- <div class="product-info__desc-content mce__content" style="{% unless block.settings.description_style == 'visible' %} display: none; {% endunless %}">
223
- {{ product.description | lazysizes }}
224
- </div>
225
- </div>
226
- {% if block.settings.page1.id %}
227
- <div class="product-info__desc-wrap {% if block.settings.description_style == 'visible' %}is-open {% endif %}" >
228
- <label class="product-info__desc-tab-header" for="r-{{ section.id }}-page1">
229
- <span class="product-info__desc-text">
230
- {{ pages[block.settings.page1.id].title }}
231
- </span>
232
- <i class="sep-font sep-font-angle-down-strong product-info__desc-icon"></i>
233
- </label>
234
- <input autocomplete="off" type="checkbox" name="r-{{ section.id }}-page1" class="product-info__desc-tab-cb" id="r-{{ section.id }}-page1" {% if block.settings.description_style == 'visible' %} checked {% endif %}/>
235
- <div class="product-info__desc-content mce__content" style="{% unless block.settings.description_style == 'visible' %} display: none; {% endunless %}">
236
- {{ pages[block.settings.page1.id].content }}
237
- </div>
238
- </div>
239
- {% endif %}
240
- {% if block.settings.page2.id %}
241
- <div class="product-info__desc-wrap {% if block.settings.description_style == 'visible' %}is-open {% endif %}" >
242
- <label class="product-info__desc-tab-header" for="r-{{ section.id }}-page2">
243
- <span class="product-info__desc-text">
244
- {{ pages[block.settings.page2.id].title }}
245
- </span>
246
- <i class="sep-font sep-font-angle-down-strong product-info__desc-icon"></i>
247
- </label>
248
- <input autocomplete="off" type="checkbox" name="r-{{ section.id }}-page2" class="product-info__desc-tab-cb" id="r-{{ section.id }}-page2" {% if block.settings.description_style == 'visible' %} checked {% endif %}/>
249
- <div class="product-info__desc-content mce__content" style="{% unless block.settings.description_style == 'visible' %} display: none; {% endunless %}">
250
- {{ pages[block.settings.page2.id].content }}
251
- </div>
252
- </div>
253
- {% endif %}
254
- {% if block.settings.page3.id %}
255
- <div class="product-info__desc-wrap {% if block.settings.description_style == 'visible' %}is-open {% endif %}" >
256
- <label class="product-info__desc-tab-header" for="r-{{ section.id }}-page3">
257
- <span class="product-info__desc-text">
258
- {{ pages[block.settings.page3.id].title }}
259
- </span>
260
- <i class="sep-font sep-font-angle-down-strong product-info__desc-icon"></i>
261
- </label>
262
- <input autocomplete="off" type="checkbox" name="r-{{ section.id }}-page3" class="product-info__desc-tab-cb" id="r-{{ section.id }}-page3" {% if block.settings.description_style == 'visible' %} checked {% endif %}/>
263
- <div class="product-info__desc-content mce__content" style="{% unless block.settings.description_style == 'visible' %} display: none; {% endunless %}">
264
- {{ pages[block.settings.page3.id].content }}
265
- </div>
266
- </div>
267
- {% endif %}
268
- </div>
269
- {% endif %}
270
- {% comment %} 分享模块 {% endcomment %}
271
- {% unless REQUEST_URI contains "view=ajax" %}
272
- {% if block.type == 'sharing' %}
273
- <div class="product-info__social-sharing">
274
- {% assign share_title = product.title %}
275
- {% assign share_permalink = product.url %}
276
- {% assign share_image = product.image.src %}
277
- {% if block.settings.share_facebook %}
278
- <a target="_blank"
279
- href="//www.facebook.com/sharer.php?u={{ shop.url | append: share_permalink }}"
280
- class="share-facebook dj_skin_text">
281
- <i class="sep-font sep-font-facebook"></i>
282
- <span class="share-title" aria-hidden="true">Share</span>
283
- </a>
284
- {% endif %}
285
- {% if block.settings.share_twitter %}
286
- <a target="_blank"
287
- href="//twitter.com/share?text={{ share_title | url_param_escape }}&amp;url={{ shop.url | append: share_permalink }}"
288
- class="share-twitter dj_skin_text">
289
- <i class="sep-font sep-font-twitter"></i>
290
- <span class="share-title" aria-hidden="true">Tweet</span>
291
- </a>
292
- {% endif %}
293
- {% if block.settings.share_pinterest %}
294
- <a target="_blank"
295
- href="//pinterest.com/pin/create/button/?url={{ shop.url | append: share_permalink }}&amp;media={{ share_image | img_url: '1024x1024' }}&amp;description={{ share_title | url_param_escape }}"
296
- class="share-pinterest dj_skin_text">
297
- <i class="sep-font sep-font-pinterest"></i>
298
- <span class="share-title" aria-hidden="true">Pin it</span>
299
- </a>
300
- {% endif %}
301
- </div>
302
- {% endif %}
303
- {% endunless %}
304
- {% endunless %}
305
- {% endfor %}
306
- </div>
307
-
308
- <input type="hidden" name="product_id" value="{{ product.id }}" />
309
- <input type="hidden" name="variant_id" id="selected_variant_id_{{product.id}}" value="{% if selectedVariantId !='' and selectedVariant.available_quantity > 0 %}{{ selectedVariantId }}{% endif %}" />
310
-
311
- {% comment %} 加购信息补充区域 {% endcomment %}
312
- {% unless REQUEST_URI contains "view=ajax" %}
313
- <div class="product-info__additional">
314
- {% for block in section.blocks %}
315
- {% if block.type == 'checkout'%}
316
- {% if block.settings.additional_text %}
317
- <div class="rich-text">{{ block.settings.additional_text}}</div>
318
- {% endif %}
319
- {% if block.settings.additional_image_pc %}
320
- <div class="common__img-wrapper_lazy d-none d-md-block" style="padding-bottom: {{ 100 | divided_by: images[settings.additional_image_pc].aspect_ratio }}%;">
321
- <img class="lazyload w-100" data-src="{{ block.settings.additional_image_pc | img_url }}" src="{{shop.default_img}}"/>
322
- </div>
323
- {% endif %}
324
- {% if block.settings.additional_image_mobile %}
325
- <div class="common__img-wrapper_lazy d-md-none" style="padding-bottom: {{ 100 | divided_by: images[settings.additional_image_mobile].aspect_ratio }}%;">
326
- <img class="lazyload w-100" data-src="{{ block.settings.additional_image_mobile | img_url }}" src="{{shop.default_img}}"/>
327
- </div>
328
- {% endif %}
329
- {% endif %}
330
- {% endfor %}
331
- </div>
332
- {% endunless %}
333
- {% if REQUEST_URI contains "view=ajax" %}
334
- <div class="product-info__url">
335
- <a href="{{ product.url }}">{{ 'i18n.product.product_detail.view_product_detail' | t }}</a>
336
- </div>
337
- {% endif %}