public function representProduct($product) { if ($product->getWebtoprintTemplate()) { return false; } return parent::representProduct($product); }
public function representProduct($product) { if (parent::representProduct($product)) { $option = $product->getCustomOption('info_buyRequest'); $productBuyRequest = new Varien_Object($option ? unserialize($option->getValue()) : null); $currentBuyRequest = $this->getBuyRequest(); $productIsFree = isset($productBuyRequest['options']['ampromo_rule_id']) ? $productBuyRequest['options']['ampromo_rule_id'] : null; $currentIsFree = isset($currentBuyRequest['options']['ampromo_rule_id']) ? $currentBuyRequest['options']['ampromo_rule_id'] : null; return $productIsFree === $currentIsFree; } else { return false; } }