2023年3月16日 星期四

Adding infinite scrolling to Shopify - Collection Pages - Dawn Theme

Following the instruction:


- You should duplication theme before applying changes.

- Online Shop - Theme - Edit Code

- You could use search function to look for specific files:


Step 1: Download Source File

https://minionmade.github.io/scrollify/download.zip 

 

Step 2:  (Line 5)

Then add this script tag in main-collection-product-grid.liquid near the other asset_url tags:

main-collection-product-grid.liquid

{{% 'ajaxinate.min.js' | asset_url | script_tag  %}}
 
 
 Step 3: (Near Line 195)
 Add this script right before the schema starts in main-collection-product-grid.liquid to create a new ajaxinate instance.
 main-collection-product-grid.liquid 
<script>
const endlessCollection = new Ajaxinate({
container: '#product-grid',
pagination: '.infinite_next',
});
</script>
 
 
 Step 4 : (Near Line 62)
Add class = "infinite_next" inside <li> tag 
pagination.liquid 
 
 
 
 

Step: 5 (Near Line 1)

face.ts

const endlessCollection = new Ajaxinate({
container: '#product-grid',
pagination: '.infinite_next',
});
 
 
 
 
Bonus Step:  To make "loading" to "..."
ajaxinate.min.js
 
 

FireTV 安裝額外 APK

開啟 Developer Option Setting - My Fire TV - About 按七次「ok」 Delveloper Option - Allow Unknown Source 使用 https://aftv.news/ 製作縮短網址 會產生以編號代替網址 安裝...