ZMObject
└─ZMProduct
public class ZMProduct
extends ZMObject
| Field Summary | |
|---|---|
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| mixed | |
| Fields inherited from org.zenmagick.core.ZMObject | |
|---|---|
| properties_ | |
| Constructor Summary | |
|---|---|
ZMProduct(int id, string name, string description) Create new product. |
|
| Method Summary | |
|---|---|
| array | Get additional product images. |
| array | getAttributes(int languageId) Get the product attributes. |
| float | Get the average rating. |
| string | Get the date the product was added. |
| string | Get the available date. |
| ZMCategory | Get the default category. |
| string | Get the product default image. |
| string | Get the description. |
| int | Get the discount type. |
| int | Get the discount type from. |
| int | getId() Get the product id. |
| image | getImage() Get the product image. |
| ZMImageInfo | Get the product image info. |
| ZMManufacturer | Get the manufacturer. |
| int | Get the manufacturer id. |
| int | Get the master category id. |
| int | Get the max quantity per order. |
| ZMMetaTagDetails | getMetaTagDetails(int languageId) Get meta tag details if available. |
| int | Get the min quantity per order. |
| string | getModel() Get the model. |
| string | getName() Get the product name. |
| ZMOffers | Get the product offers. |
| float | getPrice() Get the calculated product price. |
| float | Get the product price sorter. |
| array | getProductAssociationsForType(int type, array args, boolean all) Get product associations for the given type and parameter. |
| float | Get the product price. |
| int | Get the quantity box status. |
| float | Get the quantity units. |
| int | Get the quantity. |
| int | Get the number of reviews for this product. |
| int | Get the srt order. |
| float | Get the product special price. |
| boolean | Get the product status. |
| int | Get the tax class id. |
| ZMTaxRate | Get the tax rate. |
| mixed | getTypeSetting(string field) Get the product type config values for this product. |
| string | getUrl() Get the product url. |
| float | Get the product weight. |
| boolean | Check if this product has attributes or not. |
| boolean | Checks if reviews exist for this product. |
| boolean | Checks if the product is always free shipping |
| boolean | Checks if the price is affected by attribute prices. |
| boolean | isCall() Checks if the user needs to call for this product. |
| boolean | isFree() Checks if the product is free. |
| boolean | Check if the product is priced by attributes. |
| boolean | Checks if the product quantity is calculated across product variations or not. |
| boolean | Checks if the product is sold out. |
| boolean | Checks if the product is virtual. |
| void | setAlwaysFreeShipping(boolean b) Configure if the product is always free shipping |
| void | setCall(boolean value) Sets the flag to indicate that the user needs to call for this product. |
| void | setDefaultImage(string image) Set the product default image. |
| void | setDescription(string description) Set the description. |
| void | setDiscountType(int type) Set the discount type. |
| void | setDiscountTypeFrom(mixed typeFrom, int The) Set the discount type from. |
| void | setFree(boolean value) Set the product is free flag. |
| void | setId(int id) Set the product id. |
| void | setImage(string image) Set the product image. |
| void | setManufacturerId(int manufacturerId) Set the manufacturer id. |
| void | setMasterCategoryId(int categoryId) Set the master category id. |
| void | setModel(string model) Set the model. |
| void | setName(string name) Set the product name. |
| void | setPricedByAttributes(boolean value) Set the priced by attributes flag. |
| void | setProductPrice(float productPrice) Set the product price. |
| void | setQtyOrderUnits(float value) Set the quantity units. |
| void | setQuantity(int quantity) Set the quantity. |
| void | setSortOrder(int sortOrder) Set the sort order. |
| void | setSpecialPrice(float specialPrice) Set the product special price. |
| void | setStatus(boolean status) Set the product status. |
| void | setTaxClassId(int taxClassId) Set the tax class id. |
| void | setUrl(string url) Set the product url. |
| void | setVirtual(boolean value) Set the product is virtual flag. |
| void | setWeight(float weight) Set the product weight. |
| Methods inherited from org.zenmagick.core.ZMObject | |
|---|---|
| attachMethod, get, getAttachedMethods, getPropertyNames, set, singleton | |
public mixed $attributes_
public mixed $dateAdded_
public mixed $dateAvailable_
public mixed $description_
public mixed $discountTypeFrom_
public mixed $discountType_
public mixed $image_
public mixed $isAlwaysFreeShipping_
public mixed $isCall_
public mixed $isFree_
public mixed $isQtyMixed_
public mixed $isVirtual_
public mixed $manufacturerId_
public mixed $masterCategoryId_
public mixed $model_
public mixed $name_
public mixed $offers_
public mixed $priceSorter_
public mixed $pricedByAttributes_
public mixed $productPrice_
public mixed $qtyBoxStatus_
public mixed $qtyOrderMax_
public mixed $qtyOrderMin_
public mixed $qtyOrderUnits_
public mixed $quantity_
public mixed $sortOrder_
public mixed $specialPrice_
public mixed $status_
public mixed $taxClassId_
public mixed $url_
public mixed $weight_
public ZMProduct(int id, string name, string description)
Create new product.
public array getAdditionalImages()
Get additional product images.
ZMImageInfo instances.public array getAttributes(int languageId)
Get the product attributes.
null for session language.public float getAverageRating()
Get the average rating.
Convenience method for ZMReviews::instance()->getAverageRatingForProductId($product->getId()).
public string getDateAdded()
Get the date the product was added.
public string getDateAvailable()
Get the available date.
public ZMCategory getDefaultCategory()
Get the default category.
This will return either the master category or the first mapped category for this product.
public string getDefaultImage()
Get the product default image.
public string getDescription()
Get the description.
public int getDiscountType()
Get the discount type.
Legal values:
public int getDiscountTypeFrom()
Get the discount type from.
Legal values:
public int getId()
Get the product id.
public image getImage()
Get the product image.
public ZMImageInfo getImageInfo()
Get the product image info.
public ZMManufacturer getManufacturer()
Get the manufacturer.
public int getManufacturerId()
Get the manufacturer id.
public int getMasterCategoryId()
Get the master category id.
public int getMaxOrderQty()
Get the max quantity per order.
public ZMMetaTagDetails getMetaTagDetails(int languageId)
Get meta tag details if available.
null.public int getMinOrderQty()
Get the min quantity per order.
public string getModel()
Get the model.
public string getName()
Get the product name.
public ZMOffers getOffers()
Get the product offers.
public float getPrice()
Get the calculated product price.
This is the same as getOffers->getCalculatedPrice(). This also means this
method will always include TAX.
public float getPriceSorter()
Get the product price sorter.
public array getProductAssociationsForType(int type, array args, boolean all)
Get product associations for the given type and parameter.
null for none.false.ZMProductAssociation instances.public float getProductPrice()
Get the product price.
public int getQtyBoxStatus()
Get the quantity box status.
public float getQtyOrderUnits()
Get the quantity units.
public int getQuantity()
Get the quantity.
public int getReviewCount()
Get the number of reviews for this product.
public int getSortOrder()
Get the srt order.
public float getSpecialPrice()
Get the product special price.
public boolean getStatus()
Get the product status.
public int getTaxClassId()
Get the tax class id.
public ZMTaxRate getTaxRate()
Get the tax rate.
public mixed getTypeSetting(string field)
Get the product type config values for this product.
This corresponds to the 'Catalog' -> 'Product Type' settings in the admin interface.
public string getUrl()
Get the product url.
public float getWeight()
Get the product weight.
public boolean hasAttributes()
Check if this product has attributes or not.
true if there are attributes (values) available, false if not.public boolean hasReviews()
Checks if reviews exist for this product.
true if reviews exist, false if not.public boolean isAlwaysFreeShipping()
Checks if the product is always free shipping
true if the product is free shipping, false if not.public boolean isAttributePrice()
Checks if the price is affected by attribute prices.
true if the price is affected by attributes, false if not.public boolean isCall()
Checks if the user needs to call for this product.
true if the user must call, false if not.public boolean isFree()
Checks if the product is free.
true if the product is free, false if not.public boolean isPricedByAttributes()
Check if the product is priced by attributes.
true if priced by attributes.public boolean isQtyMixed()
Checks if the product quantity is calculated across product variations or not.
true if the quantity is calculated across variations, false if not.public boolean isSoldOut()
Checks if the product is sold out.
true if the product is sold out, false if not.public boolean isVirtual()
Checks if the product is virtual.
true if the product is virtual, false if not.public void setAlwaysFreeShipping(boolean b)
Configure if the product is always free shipping
true if the product is free shipping, false if not.public void setCall(boolean value)
Sets the flag to indicate that the user needs to call for this product.
true if the user must call, false if not.public void setDefaultImage(string image)
Set the product default image.
public void setDescription(string description)
Set the description.
public void setDiscountType(int type)
Set the discount type.
public void setDiscountTypeFrom(mixed typeFrom, int The)
Set the discount type from.
public void setFree(boolean value)
Set the product is free flag.
true if the product is free, false if not.public void setId(int id)
Set the product id.
public void setImage(string image)
Set the product image.
public void setManufacturerId(int manufacturerId)
Set the manufacturer id.
public void setMasterCategoryId(int categoryId)
Set the master category id.
public void setModel(string model)
Set the model.
public void setName(string name)
Set the product name.
public void setPricedByAttributes(boolean value)
Set the priced by attributes flag.
public void setProductPrice(float productPrice)
Set the product price.
public void setQtyOrderUnits(float value)
Set the quantity units.
public void setQuantity(int quantity)
Set the quantity.
public void setSortOrder(int sortOrder)
Set the sort order.
public void setSpecialPrice(float specialPrice)
Set the product special price.
public void setStatus(boolean status)
Set the product status.
public void setTaxClassId(int taxClassId)
Set the tax class id.
public void setUrl(string url)
Set the product url.
public void setVirtual(boolean value)
Set the product is virtual flag.
true if the product is virtual, false if not.public void setWeight(float weight)
Set the product weight.
A product.