Forum

Thread tagged as: Shop

Product Detail Page

Hi Guys,

In Perch Shop when listing out multiple products the list.html template uses a link:

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

I'm guessing this is setup for Perch Runway? As in vanilla Perch it just displays example.com/shop/products/productidproductname/ which doesn't exist on the server. In vanilla Perch I've used:

<a href="/shop/products/index.php?product=<perch:shop id="slug" type="slug" />"> Product Detail </a>

Which works in a similar fashion to the blog app I'm used to, then I've used:

perch_shop_product(perch_get('product'));

on my index.php page within the product folder, which works and lists the detail view of my product... Is this a correct way of doing it? Only it doesn't seem to be included in the documentation for Perch Shop anywhere? Hence I ended up a bit stuck at first with my product detail links leading to nowhere!

David Clarke

David Clarke 0 points

  • 5 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, that's correct. Shop is really designed for use with Runway, so the defaults are focused on Runway.