wagnerwagner / merx

Merx is a plugin to create online shops with Kirby.
https://merx.wagnerwagner.de
102 stars 10 forks source link

$productList empty #24

Closed alexpi closed 3 years ago

alexpi commented 3 years ago

Hello,

I have the following content structure:

content/
  products/
    1_598879/
      product.el.txt
      product.en.txt

product.el.txt:

Title: 598879
----
Price: 10.00
----
Tax: 24
...

If I log $productList, it is empty. Am I missing some requirement for pages to be listed as products?

tobiasfabian commented 3 years ago

Hey @alexpi,

Merx does not provide a tool to show all products. You can use $site->index()->template('product') to list all products of your shop.

ProductList is the base of Cart. To learn how to use $productList I recommend the Wishlist Cookbook.