ProductJsonData
in package

This is the ProductJsonData class.

The purpose of this class is to facilitate to Twig the generation of the products's json output.

Tags
see
ProductJsonData::output()

Table of Contents

__construct() Constructor method.  : mixed
output() This method returns an array with the entire data of the product.  : array<string|int, mixed>

Methods

__construct()

Constructor method.

public __construct([Product $product = null ]) : mixed
Parameters
$product : Product = null
Return values
mixed

output()

This method returns an array with the entire data of the product.

public output() : array<string|int, mixed>

Keys of the returned array:

  • id
  • sku
  • name
  • brandName
  • availabilityId
  • options
  • definition -> Array containing these keys:
    • price
    • basePrice
    • retailPrice
    • productBasePrice
    • productRetailPrice
    • alternativePrice
    • alternativeBasePrice
    • alternativeRetailPrice
    • productAlternativeBasePrice
    • productAlternativeRetailPrice
    • featured
    • offer
    • stockManagement
    • backorder
    • minOrderQuantity
    • maxOrderQuantity
    • multipleOrderQuantity
    • multipleActsOver
    • groupQuantityByOptions
    • onRequest
    • onRequestDays
  • combinations
  • stocks
  • priceByQuantity
  • restrictionsMain
  • stockPrevisions
  • backorderPrevisions
  • stockLocks
  • mainCategory
  • mainCategoryName
Return values
array<string|int, mixed>

Search results