Class Mage_Catalog_Helper_Product

Description

Catalog category helper

Located in /Catalog/Helper/Product.php (line 32)

Mage_Core_Helper_Abstract
   |
   --Mage_Core_Helper_Url
      |
      --Mage_Catalog_Helper_Product
Class Constant Summary
XML_PATH_PRODUCT_URL_SUFFIX = 'catalog/seo/product_url_suffix'
XML_PATH_PRODUCT_URL_USE_CATEGORY = 'catalog/seo/product_use_categories'
XML_PATH_USE_PRODUCT_CANONICAL_TAG = 'catalog/seo/product_canonical_tag'
Variable Summary
Method Summary
Varien_Object addParamsToBuyRequest (Varien_Object|array $buyRequest, Varien_Object|array $params)
boolean canShow (Mage_Catalog_Model_Product|int $product, [ $where = 'catalog'])
bool canUseCanonicalTag ([$store $store = null])
string|null getAttributeBackendModelByInputType (string $inputType)
array getAttributeInputTypes ([string $inputType = null])
string|null getAttributeSourceModelByInputType (string $inputType)
void getEmailToFriendUrl ( $product)
string getImageUrl ( $product)
string getProductUrl (mixed $product)
string getProductUrlSuffix ([int $storeId = null])
unknown getSmallImageUrl ( $product)
void getStatuses ()
unknown getThumbnailUrl ( $product)
false|Mage_Catalog_Model_Product initProduct (int $productId, Mage_Core_Controller_Front_Action $controller, [Varien_Object $params = null])
Variables
mixed $_priceBlock (line 47)
  • access: protected
array $_productUrlSuffix = array() (line 43)

Cache for product rewrite suffix

  • access: protected
mixed $_statuses (line 45)
  • access: protected

Inherited Variables

Inherited from Mage_Core_Helper_Abstract

Mage_Core_Helper_Abstract::$_layout
Mage_Core_Helper_Abstract::$_moduleName
Mage_Core_Helper_Abstract::$_request
Methods
addParamsToBuyRequest (line 361)

Process $buyRequest and sets its options before saving configuration to some product item.

This method is used to attach additional parameters to processed buyRequest.

$params holds parameters of what operation must be performed:

  • 'current_config', Varien_Object or array - current buyRequest that configures product in this item, used to restore currently attached files
  • 'files_prefix': string[a-z0-9_] - prefix that was added at frontend to names of file inputs, so they won't intersect with other submitted options

  • access: public
Varien_Object addParamsToBuyRequest (Varien_Object|array $buyRequest, Varien_Object|array $params)
  • Varien_Object|array $buyRequest
  • Varien_Object|array $params
canShow (line 159)

Check if a product can be shown

  • access: public
boolean canShow (Mage_Catalog_Model_Product|int $product, [ $where = 'catalog'])
canUseCanonicalTag (line 198)

Check if <link rel="canonical"> can be used for product

  • access: public
bool canUseCanonicalTag ([$store $store = null])
  • $store $store
getAttributeBackendModelByInputType (line 239)

Return default attribute backend model by input type

  • access: public
string|null getAttributeBackendModelByInputType (string $inputType)
  • string $inputType
getAttributeInputTypes (line 211)

Return information array of product attribute input types Only a small number of settings returned, so we won't break anything in current dataflow As soon as development process goes on we need to add there all possible settings

  • access: public
array getAttributeInputTypes ([string $inputType = null])
  • string $inputType
getAttributeSourceModelByInputType (line 254)

Return default attribute source model by input type

  • access: public
string|null getAttributeSourceModelByInputType (string $inputType)
  • string $inputType
getEmailToFriendUrl (line 132)
  • access: public
void getEmailToFriendUrl ( $product)
  • $product
getFinalPrice (line 83)

Retrieve product final price

  • access: public
float getFinalPrice (Mage_Catalog_Model_Product $product)
getImageUrl (line 93)

Retrieve base image url

  • access: public
string getImageUrl ( $product)
  • $product
getPrice (line 72)

Retrieve product price

  • access: public
float getPrice (Mage_Catalog_Model_Product $product)
getProductUrl (line 55)

Retrieve product view page url

  • access: public
string getProductUrl (mixed $product)
  • mixed $product
getProductUrlSuffix (line 180)

Retrieve product rewrite sufix for store

  • access: public
string getProductUrlSuffix ([int $storeId = null])
  • int $storeId
getSmallImageUrl (line 110)

Retrieve small image url

  • access: public
unknown getSmallImageUrl ( $product)
  • $product
getStatuses (line 144)
  • access: public
void getStatuses ()
getThumbnailUrl (line 127)

Retrieve thumbnail image url

  • access: public
unknown getThumbnailUrl ( $product)
  • $product
initProduct (line 275)

Inits product to be used for product controller actions and layouts $params can have following data: 'category_id' - id of category to check and append to product as current.

If empty (except FALSE) - will be guessed (e.g. from last visited) to load as current.

  • access: public
false|Mage_Catalog_Model_Product initProduct (int $productId, Mage_Core_Controller_Front_Action $controller, [Varien_Object $params = null])
prepareProductOptions (line 338)

Prepares product options by buyRequest: retrieves values and assigns them as default.

Also parses and adds product management related values - e.g. qty

  • access: public
Mage_Catalog_Helper_Product prepareProductOptions (Mage_Catalog_Model_Product $product, Varien_Object $buyRequest)

Inherited Methods

Inherited From Mage_Core_Helper_Url

Mage_Core_Helper_Url::getCurrentBase64Url()
Mage_Core_Helper_Url::getCurrentUrl()
Mage_Core_Helper_Url::getEncodedUrl()
Mage_Core_Helper_Url::getHomeUrl()
Mage_Core_Helper_Url::_prepareString()

Inherited From Mage_Core_Helper_Abstract

Mage_Core_Helper_Abstract::escapeHtml()
Mage_Core_Helper_Abstract::escapeUrl()
Mage_Core_Helper_Abstract::getLayout()
Mage_Core_Helper_Abstract::htmlEscape()
Mage_Core_Helper_Abstract::isModuleEnabled()
Mage_Core_Helper_Abstract::isModuleOutputEnabled()
Mage_Core_Helper_Abstract::jsQuoteEscape()
Mage_Core_Helper_Abstract::setLayout()
Mage_Core_Helper_Abstract::stripTags()
Mage_Core_Helper_Abstract::translateArray()
Mage_Core_Helper_Abstract::urlDecode()
Mage_Core_Helper_Abstract::urlEncode()
Mage_Core_Helper_Abstract::urlEscape()
Mage_Core_Helper_Abstract::_cleanCache()
Mage_Core_Helper_Abstract::_getModuleName()
Mage_Core_Helper_Abstract::_getRequest()
Mage_Core_Helper_Abstract::_getUrl()
Mage_Core_Helper_Abstract::_loadCache()
Mage_Core_Helper_Abstract::_removeCache()
Mage_Core_Helper_Abstract::_saveCache()
Mage_Core_Helper_Abstract::__()
Class Constants
XML_PATH_PRODUCT_URL_SUFFIX = 'catalog/seo/product_url_suffix' (line 34)
XML_PATH_PRODUCT_URL_USE_CATEGORY = 'catalog/seo/product_use_categories' (line 35)
XML_PATH_USE_PRODUCT_CANONICAL_TAG = 'catalog/seo/product_canonical_tag' (line 36)

Documentation generated on Fri, 11 Feb 2011 17:10:21 +0200 by phpDocumentor 1.4.3