Product Variant


Describes a product variant.

additional_buy_buttons

Returns true if there are additional buy buttons.

attribute_based_inventory?

Returns true if inventory is based on attributes rather than on product itself.

bulk_rates

Returns the bulk rates if any.

bundle_contents

Returns the bundle contents. Each rows has the values of:

  • product
  • options:
    • image
    • name
    • value
  • quantity: quantity included

content_for_additional_buy_buttons

Returns the content for the additional buy buttons.

content_for_financing_offers

Returns the content for the financing offers.

created_at

Returns the creation date.

customer_has_purchased

Returns true if customer has purchased the product.

customizations

Returns product customizations.

deliverytime

Returns the delivery object ```json { “min”: { “days”: 7, “weeks”: 1, “years”: 0.019178082191780823 }, “max”: { “days”: 14, “weeks”: 2, “years”: 0.038356164383561646 } }

discontinued_product

Returns true if product won’t be restocked when it runs out of stock.

discount_information

Returns the discount if any.

featured_image

Returns the featured image of the product variant.

financing_offers

Returns the financing offers.

gtin

Returns the GTIN number.

has_customizations_with_price

Returns true if some of the customizations are increasing product price.

height

Returns the height

id

Returns the id.

image

Returns the image of the product variant. Alias for featured_image.

in_customers_wishlist?

Returns true if products is in customers wishlist.

in_preview

Returns true if product is in preview.

inventory_management

Returns the inventory management.

inventory_policy

Returns the inventory policy, continue or deny.

is_available

Returns true if product is available for purchase.

is_directly_buyable

Returns true if product can be bought without selecting any attributes.

is_new

Returns true if products in considered as new.

is_out_of_stock

Returns true if product is out of stock

length

Returns the length

measure_unit

Returns the measure unit name

net_price

Returns the net price

notifications_supported?

Returns true if product supports availability notifications.

option1

Returns the first option.

 {
   "option": "color",
   "value": "red"
 }

option2

Returns the second option.

 {
   "option": "size",
   "value": "large"
 }

option3

Returns the third option.

 {
   "option": "material",
   "value": "cotton"
 }

options

Returns all options.

 [
   {
     "option": "color",
     "value": "red"
   },
   {
     "option": "size",
     "value": "large"
   },
   {
     "option": "material",
     "value": "cotton"
   }
 ]

original_net_price

Returns the original net price without any discounts

original_price

Returns the original price without any discounts

previous_lower_price

Returns information about the previous lower price if such is recorded in the last 30 days.

previous_prices

Returns information about the previous prices if such records are found.

price

Returns the price

product_number

Returns the product number.

promotion

Returns the promotion if any.

quantities_in_other_inventories

Returns the stock quantity in other inventories. Returns an object with the following properties:

  • inventory: inventory
  • quantity: stock quantity
  • location: location of the inventory
  • alarm_level: alarm level
  • sku: stock keeping unit
  • is_low_on_stock: true if product is low on stock

This is only returns the inventories where the product has specifically set stock. If you need all inventories, use store.inventories.

rate

Returns the tax rate. This is same as product tax rate.

requires_shipping?

Returns true if product requires shipping.

selected

Returns true if this variant is selected in the product page.

sku

Returns the SKU

stock

Returns the stock quantity

stock_alarm

Returns true if product is low on stock.

stock_in_other_inventories

Returns true if product has stock set in other inventories.

subscribed_to_notifications?

Returns true if customer has subscribed to availability notifications.

tax

Returns the tax amount

title

Returns the title.

unit

Returns the product quantity unit

updated_at

Returns the last updated date.

url

Returns the url.

weight

Returns the weight

weight_unit

Returns the weight unit name

width

Returns the width