public function isVirtual($product = null) { $hasShipping = ITwebexperts_Payperrentals_Helper_Data::getAttributeCodeForId($this->getProduct($product)->getId(), 'payperrentals_has_shipping'); $isReservation = ITwebexperts_Payperrentals_Helper_Data::getAttributeCodeForId($this->getProduct($product)->getId(), 'is_reservation'); if ($isReservation != ITwebexperts_Payperrentals_Model_Product_Isreservation::STATUS_DISABLED && $isReservation != ITwebexperts_Payperrentals_Model_Product_Isreservation::STATUS_NOTSET) { return Mage::helper('payperrentals/config')->removeShipping() || $hasShipping == ITwebexperts_Payperrentals_Model_Product_Hasshipping::STATUS_DISABLED; } else { return parent::isVirtual($product); } }
public function testHasWeightFalse() { $this->assertFalse($this->_model->hasWeight(), 'This product has weight, but it should not'); }
public function processBuyRequest($product, $buyRequest) { $toReturn = parent::processBuyRequest($product, $buyRequest); if ($buyRequest->getData('aw_sarp_subscription_start')) { $toReturn['aw_sarp_subscription_start'] = $buyRequest->getData('aw_sarp_subscription_start'); } if ($buyRequest->getData('aw_sarp_subscription_type')) { $toReturn['aw_sarp_subscription_type'] = $buyRequest->getData('aw_sarp_subscription_type'); } return $toReturn; }
/** * Save type related data * * @param Mage_Catalog_Model_Product $product * @return Mage_Catalog_Model_Product_Type_Grouped */ public function save($product = null) { parent::save($product); $this->getProduct($product)->getLinkInstance()->saveGroupedLinks($this->getProduct($product)); return $this; }