Exemplo n.º 1
0
 /**
  * Redefine Attribute scope
  *
  * @param Mage_Catalog_Model_Resource_Eav_Attribute $attribute
  * @return Mage_Catalog_Model_Product_Attribute_Backend_Price
  */
 public function setScope($attribute)
 {
     if (Mage::helper('catalog')->isPriceGlobal()) {
         $attribute->setIsGlobal(Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_GLOBAL);
     } else {
         $attribute->setIsGlobal(Mage_Catalog_Model_Resource_Eav_Attribute::SCOPE_WEBSITE);
     }
     return $this;
 }
Exemplo n.º 2
0
 /**
  * Set attribute scope
  * 
  * @param Mage_Catalog_Model_Resource_Eav_Attribute $attribute
  * @param int $scope
  * 
  * @return Innoexts_StorePricing_Helper_Catalog_Product_Price
  */
 public function setAttributeScope($attribute, $scope = null)
 {
     if (is_null($scope)) {
         $scope = $this->getScope();
     }
     $attribute->setIsGlobal($this->getAttributeScope($scope));
     return $this;
 }