Thank you for this @tristantbg.
I was able to use shopify.products.yml
to select the products from Shopify, which allows them to be sorted and show in the front end.
This is the file structure that I could use to make it work:
content/
├── shop/
│ ├── shopify.products.txt # Blueprint: 'shopify.products.yml' for listing the sorted Shopify products on the Shop page
│ ├── 8530067931978_product-title/
│ │ └── shopify.product.txt # Blueprint: 'shopify.product.yml' for an individual product
│ ├── 8530067931979_other-product/
│ └── shopify.product.txt # Blueprint: 'shopify.product.yml' for another product
site/
├── collections/
│ └── shopify.products.php # PHP file to define 'kirby.collection('shopify.products')'
├── blueprints/
│ └── pages/
│ ├── shopify.products.yml # Blueprint for listing and sorting Shopify products in the Shop
│ ├── shopify.product.yml # Blueprint for individual products
│ ├── etc
With this approach, there are two questions that came up.
- After selecting the Shopify product in
shopify.products.yml
, by default it adds the product to the last in the list. Is there a way to automatically add most recently selected product to be first in the list by default?
This is helpful since if the shop includes many products (e.g. more than 100), it’s difficult to drag the newest product to be shown first.
- When there are a lot of products (e.g. more than 100), the select dialog box is very slow to show the products that can be selected. Is there any way that can be deal with that?
Thanks for the help!