Represents a custom product group.
There is no a special CMS action in LemonStand for loading custom groups from the database.
To load a custom group with a specific API code use the following code:
Returns a list of the group products.
The result of this function is an object of the Shop_Product class. To obtain a collection of
products call the find_all() method of the returned object:
You can pass an array of options to the method parameter. The currently supported option is the sorting.
By default the product list is sorted by product name. You can sort product them by another field.
Also, you can sort the product list by multiple fields:
The supported fields you can sort the products are:
name - sort the product list by name
price - sort the product list by the base price
sku - sort the product list by SKU
weight - sort the product list by weight
width - sort the product list by width
height - sort the product list by height
depth - sort the product list by depth
created_at - sort the product list by the product creation date
rand() - sort products randomly
manufacturer - sort products by the manufacturer name
expected_availability_date - sort products by the availability date
You can add desc suffix to the sort field name to enable the descending sorting. For example, to sort the product list
by price in descending order, you can use the following code: