Object objCatalogProduct

From Snapp CMS Developer Documentation

Jump to: navigation, search

Product Catalog Product Item Object

Contents

Associated Objects

objProductImage

objProductSpecification

Construction Configuration Options

Config Options Description
fields : array or int (required)

Fields for Product or ID of Product Paramaters

  • code : string (optional)
  • description : string (optional)
  • freight_weight : float (optional)
  • freight_cubic : int (optional)
  • id : int (optional)
  • image : string (optional)
  • restock : int (optional)
  • rrp : float (optional)
  • stock : int (optional)
  • summary : string (optional)
  • supplier : string (optional)
  • supplierID : int (optional)
  • title : string (optional)
options : array (optional)

Related Product Information Paramaters

  • related : array (optional)
  • specifications : array (optional)
  • policies : array (optional)
  • images : array (optional)
  • categories : array (optional)

Avaliable Variables

name Description
id : int Product ID
code : string Product Code
rrpPrice : float Current RRP Price
specialPrice : float
summary : string Product Summary Copy
description : string Full Product Description
image : string Hero Product Image
images : array Array of Related Product Images
inStock : int How many are currently in stock
reStock : int ReStock Level
freight : float Specific Freight Amount
freight_weight : float Dead Weight for Freight Calculation
freight_cubic : string Cubic Dimensions of Product for Freight Calculation
pricePolicies : array List of all pricing policies related to this product
specifications : array List of product specifications
relatedProducts : array List of Related Product Categories and Products
categories : array List of Categories this product is linked to
promo : string Promocode currently liked to this product

Available Functions

rawSpecial(qty,currency)

Return the raw Numerical Special Price without Formating

Params

  • qty : int (optional) Default: 1
  • currency : string (optional) Default: AUD
special(qty,currency)

Returns current special price, if no pricing policies, returns rrp

Params

  • qty : int (optional) Default: 1
  • currency : string (optional) Default: AUD
price(currency)

Returns the current RRP

Params

  • currency : string (optional) Default: AUD
rawPrice(currency)

Return the current RRP unformated

Params

  • currency : string (optional) Default: AUD
instock()
Returns true or false if the current item is in stock
onSpecial(currency)

Returns true or false if the current item in on special

Params

  • currency : string (optional) Default: AUD
onSpecial(currency)

Returns true or false if the current item in on special

Params

  • currency : string (optional) Default: AUD
loadPolicies(code)

Loads Associated Product Pricing Rules

Params

  • code : string (optional)
applyPromo(code)

Apply a promo code to the current product

Params

  • code : string (optional)
loadRelatedProducts()
Load a list of related products for the current product
loadSpecifications()
Loads a lost of product specifications for the current product
loadCategories()
Load a list of Categories this product is linked to
getSpecificationsAsKeyValue()
Returns a list of specifications in key value pairs
Personal tools
Core Components
Standalone Installs