Skip to main content
Version: 0.1.x

Product pages

Product pages normally extend the BaseProductPage class, which provides some useful additional functionality that's commonly needed on product pages. It also loads in information about the product page context - i.e. what product this is, the collection context (if any), etc.

typescript
import {BaseProductPage} from 'salvo-ts';
class ProductPage extends BaseProductPage {
}
typescript
import {BaseProductPage} from 'salvo-ts';
class ProductPage extends BaseProductPage {
}

The following is some of the functionality provided by the BaseProductPage class:

typescript
class BaseProductPage {
// The current product
product: Product;
// The collection context handle (if browsing on a /collections/:handle/products/... URL)
collectionHandle: string|null;
}
typescript
class BaseProductPage {
// The current product
product: Product;
// The collection context handle (if browsing on a /collections/:handle/products/... URL)
collectionHandle: string|null;
}