One moment, we're cooking some code examples

Header image
Webshop cheatsheet

Catalog functions

Handy list of functions:

A configuration file (php) has been added to the /config location of your application.

Product functions

All the functions regarding the product page can be found here. In this chapter we will explain how to get the current product details, such as:

  • Product descriptions
  • Product images
  • Product features
  • Related products
  • @TODO
  • Get current product details
  • Add to cart
  • Related products

Get current product details

On the product page want to show some information regarding the product. With this function you can get all the related product details:

All the product details can be fetched, formatted and displayed on the product page.

Add the product to the cart

You can add products to the cart using the add to cart button. There are a couple of parameters you can configure:

data-product-id

The ID of the product you want to add, can be outputted from the $aProductDetails.

data-amount

The amount of said product you want to add. You can leave this at one, or create an input with the amount of the product you want to add.

data-sa-title

This is the title that the user wil see in the alert when they add the product to the cart

data-sa-description

This is the description that the user wil see in the alert when they add the product to the cart

data-sa-button-confirm

This is the text inside the confirm button that the user will see in the alert when they add the product to the cart

Example add to cart button:

Related products

Cart functions

Handy list of functions:

A configuration file (php) has been added to the /config location of your application.