Back to Catalog Support

kieran11210
kieran11210

Hi Tiipiik,

Firstly I wanted to say great job on the Catalog system, its pretty easy to setup and add products.

However I'm a complete nooby to OctoberCMS and I'm still trying to figure out how to add the catalog I've created. From this I have 2 questions

1) Do you have any examples / Example code?

2) Do I need to configure URL's anywhere for referencing to work?

Thanks for your help, Kieran

Tiipiik
Tiipiik

Hi Kieran,

Thanks for the compliment :)

Can you tell me what example you need ? You can find usefull informations on the dedicated website, but if you need something more just ask.

You only have to place Catalog components in your layouts and you would be able to display your categories and products. If you ask me precise questions I will try to answer accurately, and even add it to the documentation as it has to be more complete.

Feel free to take a look at the OctoberCMS documentation as it is growing and is more and more accurate.

kieran11210
kieran11210

Hi Tiipiik,

Yes true I've looked at your examples though I'm probably missing something. I guess what I need is an example of the code working rather than just markup side to pull products and show them on a page in october. Maybe at an OnStart method?

I currently have copied and pasted your example and manipulated it to include the product name e.g. productname.property though it does not seem to be pulling anything back. Does the product class need to be declared in the backend code section first or does it pull the data automatically? I know though this is probably something I am or am not doing! Apologies for the initial vague question.

Tiipiik
Tiipiik

Hi Kieran,

Normally you don't have to use the onStart method. The only thing you have to do is create some products, place the ProductList component in a layout, then place the corresponding code in your layout, and that's all ! What you may have forget is to place this code in your layout :

{% component 'product_list' %}

If you want to display your products anywhere, just use the produt_list component and select "Use category filter", so you don't need the dynamic :slug parameter of the category.

If you don't see the products in your page, please verify that you have "published" the product.

Do your OctoberCMS install is online or local ? If it's online I can configure a test page for you, so you will see how this works.

1-4 of 4