public function render(Varien_Object $row) { $website = $row->getWebsiteId(); $massName = Mage::getModel('core/website')->getCollection()->toOptionHash(); $mass = explode(",", $website); foreach ($mass as $k => $v) { if (array_key_exists($v, $massName)) { $newmass[] = $massName[$v]; } } $website = implode(", ", array_unique($newmass)); return $website; }
public function render(Varien_Object $row) { return '<a title="' . Mage::helper('core')->__('Edit Website') . '" href="' . $this->getUrl('*/*/editWebsite', array('website_id' => $row->getWebsiteId())) . '">' . $row->getData($this->getColumn()->getIndex()) . '</a>'; }
/** * Add customer to array * * @param Varien_Object|Mage_Customer_Model_Customer $customer * @return Mage_ImportExport_Model_Resource_Customer_Storage */ public function addCustomer(Varien_Object $customer) { $email = strtolower(trim($customer->getEmail())); if (!isset($this->_customerIds[$email])) { $this->_customerIds[$email] = array(); } $this->_customerIds[$email][$customer->getWebsiteId()] = $customer->getId(); return $this; }
public function render(Varien_Object $row) { $collection = Mage::registry('website_collection'); return $collection->getItemById($row->getWebsiteId())->getName(); }
/** * Rate text getter * * @param Varien_Object $row * @return string|null */ public function getRateText($row) { $websiteId = $row->getWebsiteId(); return Enterprise_Reward_Model_Reward_Rate::getRateText($row->getDirection(), $row->getPoints(), $row->getCurrencyAmount(), 0 == $websiteId ? null : Mage::app()->getWebsite($websiteId)->getBaseCurrencyCode()); }
/** * Return CashOnDelivery Surcharge Value * * @param Varien_Object * * @return float */ public function getCashOnDeliverySurcharge(Varien_Object $request) { $adapter = $this->_getReadAdapter(); $bind = array(':website_id' => (int) $request->getWebsiteId(), ':country_id' => $request->getDestCountryId(), ':region_id' => $request->getDestRegionId(), ':postcode' => $request->getDestPostcode(), ':weight' => (double) $request->getPackageWeight(), ':price' => (double) $request->getData('zitec_table_price'), ':method' => $request->getMethod()); $select = $adapter->select()->from($this->getMainTable(), array('cashondelivery_surcharge', 'cod_min_surcharge'))->where('website_id=:website_id')->order(array('dest_country_id DESC', 'dest_region_id DESC', 'dest_zip DESC', 'method DESC', 'price_vs_dest DESC', 'weight DESC')); // render destination condition $orWhere = '(' . implode(') OR (', array("dest_country_id = :country_id AND dest_region_id = :region_id AND dest_zip = :postcode", "dest_country_id = :country_id AND dest_region_id = :region_id AND dest_zip = ''", "dest_country_id = :country_id AND dest_region_id = 0 AND dest_zip = ''", "dest_country_id = :country_id AND dest_region_id = 0 AND dest_zip = :postcode", "dest_country_id = '0' AND dest_region_id = 0 AND dest_zip = ''")) . ')'; $select->where($orWhere); $select->where('((weight <= :weight and price_vs_dest = 0) or (weight <= :price and price_vs_dest = 1))'); $select->where('method = :method'); $rate = $adapter->fetchRow($select, $bind); if (empty($rate) && $this->isRateDefinedForMethod($request)) { $rate = null; } return $rate; }
public function render(Varien_Object $row) { return '<a title="' . Mage::helper('amperm')->__('Login the `%s` Website', $row->getName()) . '" href="' . $this->getUrl('adminhtml/ampermlogin/login', array('website_id' => $row->getWebsiteId(), 'customer_id' => $this->getRequest()->getParam('customer_id'), 'perm_key' => $this->getRequest()->getParam('perm_key'))) . '">' . $row->getData($this->getColumn()->getIndex()) . '</a>'; }
public function render(Varien_Object $row) { return '<a title="' . Mage::helper('core')->__('Edit Website') . '" href="' . $this->getUrl('*/inchoo_LoginAsCustomer/login', array('website_id' => $row->getWebsiteId(), 'customer_id' => $this->getRequest()->getParam('customer_id'))) . '">' . $this->escapeHtml($row->getData($this->getColumn()->getIndex())) . '</a>'; }