Forum

Thread tagged as: Question, Discussion, Shop

Building out shop

Hi there

I am implementing the shop app on my web site, I am familiar with the blog app so my current approach for to create a products page, cart page for which the relevant slug can be passed to.

Looking at the sample templates / examples - everything is passed to folders: For example .../shop/products/product_slug Whereas the code I am building will process from here: .../shop/products/products.html?s=product_slug

This will mean I will need to update all the templates.

I feel like there something fundamental I am missing or is this just what you need to do?

[apologises if this is a stupid question to you perch Jedi's].

Paul Amass

Paul Amass 0 points

  • 2 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

I don't follow this part:

This will mean I will need to update all the templates.

Do you mean you've built your templates and now need to change the URLs?

So the default templates that come with the app, for example: ./perch/addons/apps/perch_shop/templates/shop/products/list.html

Am I correct in thinking ...

<a href="/shop/products/<perch:shop id="slug" type="slug" />/">

I'd would need to edit this and the other templates to

<a href="/shop/products/products.html?s=<perch:shop id="slug" type="slug" />/">

or is there something obvious I am missing that would mean I wouldn't need to do that?

Paul,

How many products are you expecting in this shop?