Пример #1
0
 public function testRenderAddress()
 {
     $block = new Mage_Paypal_Block_Express_Review();
     $addressData = (include __DIR__ . '/../../../Sales/_files/address_data.php');
     $address = new Mage_Sales_Model_Quote_Address($addressData);
     $address->setAddressType('billing');
     $this->assertContains('Los Angeles', $block->renderAddress($address));
 }
Пример #2
0
 /**
  * Overwrite parent method to adding properly carrier name
  * when it starts with assigned $carrierCode ("easyshippingrules")
  *
  * @param string $carrierCode
  *
  * @return string
  */
 public function getCarrierName($carrierCode)
 {
     $carrierName = Mage::helper('easyshippingrules')->getCarrierName($carrierCode);
     if ($carrierName) {
         return $carrierName;
     }
     return parent::getCarrierName($carrierCode);
 }
Пример #3
0
 /**
  * Retrieve payment method and assign additional template values
  *
  * @return Mage_Paypal_Block_Express_Review
  */
 protected function _beforeToHtml()
 {
     parent::_beforeToHtml();
     $this->setPlaceOrderUrl($this->getUrl("*/*/placeOrder"));
     $this->setEditUrl();
     $this->setSuccessUrl($this->getUrl("checkout/onepage/success"));
     $this->setUseAjax(true);
     return $this;
 }
Пример #4
0
 /**
  * Retrieve payment method and assign additional template values
  *
  * @return Mage_Paypal_Block_Express_Review
  */
 protected function _beforeToHtml()
 {
     return parent::_beforeToHtml();
 }