Product
extends ResourceModel
in package
Uses
HasCustomUrl
Tags
Table of Contents
- INVENTORY_TRACKING_NONE = 'none'
- INVENTORY_TRACKING_PRODUCT = 'product'
- INVENTORY_TRACKING_VARIANT = 'variant'
- PRODUCT_TYPE_DIGITAL = 'digital'
- PRODUCT_TYPE_PHYSICAL = 'physical'
- $availability : string
- $availability_description : string
- $base_variant_id : int|null
- $bin_picking_number : string
- $brand_id : int
- $brand_name : string|null
- $categories : array<string|int, mixed>
- $condition : string
- $cost_price : float
- $custom_fields : array<string|int, CustomField>|null
- $custom_url : CustomUrl|null
- $date_created : string
- $date_modified : string
- $depth : float
- $description : string
- $fixed_cost_shipping_price : float
- $gift_wrapping_options_list : array<string|int, mixed>
- $gift_wrapping_options_type : string
- $gtin : string
- $height : float
- $id : int
- $images : array<string|int, ProductImage>|null
- Note that images are only returned if specifically requested with the `include` param.
- $inventory_level : int
- $inventory_tracking : string
- $inventory_warning_level : int
- $is_condition_shown : bool
- $is_featured : bool
- $is_free_shipping : bool
- $is_preorder_only : bool
- $is_price_hidden : bool
- $is_visible : bool
- $layout_file : string
- $meta_description : string
- $meta_keywords : array<string|int, mixed>
- $modifiers : array<string|int, ProductModifier>|null
- $mpn : string
- $name : string
- $open_graph_description : string
- $open_graph_title : string
- $open_graph_type : string
- $open_graph_use_image : bool
- $open_graph_use_meta_description : bool
- $open_graph_use_product_name : bool
- $order_quantity_maximum : int
- $order_quantity_minimum : int
- $page_title : string
- $preorder_message : string
- $preorder_release_date : string|null
- $price : float
- $price_hidden_label : string
- $related_products : array<string|int, mixed>
- $retail_price : float
- $reviews_rating_sum : int
- $sale_price : float
- $search_keywords : string
- $sku : string
- $sort_order : int
- $total_sold : int
- $type : string
- $upc : string
- $view_count : int
- $warranty : string
- $weight : float
- $width : float
- __construct() : mixed
- addImage() : Product
- jsonSerialize() : array<string|int, mixed>
- setCustomUrl() : void
- Set the URL for a category, brand, or product.
Constants
INVENTORY_TRACKING_NONE
public
mixed
INVENTORY_TRACKING_NONE
= 'none'
Tags
INVENTORY_TRACKING_PRODUCT
public
mixed
INVENTORY_TRACKING_PRODUCT
= 'product'
Tags
INVENTORY_TRACKING_VARIANT
public
mixed
INVENTORY_TRACKING_VARIANT
= 'variant'
Tags
PRODUCT_TYPE_DIGITAL
public
mixed
PRODUCT_TYPE_DIGITAL
= 'digital'
Tags
PRODUCT_TYPE_PHYSICAL
public
mixed
PRODUCT_TYPE_PHYSICAL
= 'physical'
Tags
Properties
$availability
public
string
$availability
Tags
$availability_description
public
string
$availability_description
Tags
$base_variant_id
public
int|null
$base_variant_id
Tags
$bin_picking_number
public
string
$bin_picking_number
Tags
$brand_id
public
int
$brand_id
Tags
$brand_name
public
string|null
$brand_name
If brand_name is used, the brand will be created if it doesn't already exist. However, brand_name will never be part of a product response, only the brand_id will.
Tags
$categories
public
array<string|int, mixed>
$categories
Tags
$condition
public
string
$condition
Tags
$cost_price
public
float
$cost_price
Tags
$custom_fields
public
array<string|int, CustomField>|null
$custom_fields
Tags
$custom_url
public
CustomUrl|null
$custom_url
Tags
$date_created
public
string
$date_created
Tags
$date_modified
public
string
$date_modified
Tags
$depth
public
float
$depth
Tags
$description
public
string
$description
Tags
$fixed_cost_shipping_price
public
float
$fixed_cost_shipping_price
Tags
$gift_wrapping_options_list
public
array<string|int, mixed>
$gift_wrapping_options_list
Tags
$gift_wrapping_options_type
public
string
$gift_wrapping_options_type
Tags
$gtin
public
string
$gtin
Tags
$height
public
float
$height
Tags
$id
public
int
$id
Tags
$images
Note that images are only returned if specifically requested with the `include` param.
public
array<string|int, ProductImage>|null
$images
Tags
$inventory_level
public
int
$inventory_level
Tags
$inventory_tracking
public
string
$inventory_tracking
Tags
$inventory_warning_level
public
int
$inventory_warning_level
Tags
$is_condition_shown
public
bool
$is_condition_shown
Tags
$is_featured
public
bool
$is_featured
Tags
$is_free_shipping
public
bool
$is_free_shipping
Tags
$is_preorder_only
public
bool
$is_preorder_only
Tags
$is_price_hidden
public
bool
$is_price_hidden
Tags
$is_visible
public
bool
$is_visible
Tags
$layout_file
public
string
$layout_file
Tags
$meta_description
public
string
$meta_description
Tags
$meta_keywords
public
array<string|int, mixed>
$meta_keywords
Tags
$modifiers
public
array<string|int, ProductModifier>|null
$modifiers
Tags
$mpn
public
string
$mpn
Tags
$name
public
string
$name
Tags
$open_graph_description
public
string
$open_graph_description
Tags
$open_graph_title
public
string
$open_graph_title
Tags
$open_graph_type
public
string
$open_graph_type
Tags
$open_graph_use_image
public
bool
$open_graph_use_image
Tags
$open_graph_use_meta_description
public
bool
$open_graph_use_meta_description
Tags
$open_graph_use_product_name
public
bool
$open_graph_use_product_name
Tags
$order_quantity_maximum
public
int
$order_quantity_maximum
Tags
$order_quantity_minimum
public
int
$order_quantity_minimum
Tags
$page_title
public
string
$page_title
Tags
$preorder_message
public
string
$preorder_message
Tags
$preorder_release_date
public
string|null
$preorder_release_date
Tags
$price
public
float
$price
Tags
$price_hidden_label
public
string
$price_hidden_label
Tags
$related_products
public
array<string|int, mixed>
$related_products
Tags
$retail_price
public
float
$retail_price
Tags
$reviews_rating_sum
public
int
$reviews_rating_sum
Tags
$sale_price
public
float
$sale_price
Tags
$search_keywords
public
string
$search_keywords
Tags
$sku
public
string
$sku
Tags
$sort_order
public
int
$sort_order
Tags
$total_sold
public
int
$total_sold
Tags
$type
public
string
$type
Tags
$upc
public
string
$upc
Tags
$view_count
public
int
$view_count
Tags
$warranty
public
string
$warranty
Tags
$weight
public
float
$weight
Tags
$width
public
float
$width
Tags
Methods
__construct()
public
__construct([stdClass|null $optionObject = null ]) : mixed
Parameters
- $optionObject : stdClass|null = null
Tags
Return values
mixed —addImage()
public
addImage(string $imageUrl[, string $description = "" ][, bool $isThumbnail = false ]) : Product
Parameters
- $imageUrl : string
- $description : string = ""
- $isThumbnail : bool = false
Tags
Return values
Product —jsonSerialize()
public
jsonSerialize() : array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —setCustomUrl()
Set the URL for a category, brand, or product.
public
setCustomUrl(string $url) : void
Just a shortcut to setting {url, is_customized: true}
Parameters
- $url : string