Permalink
Browse files

Import Magento Release 1.3.2.3

  • Loading branch information...
LeeSaferite committed Aug 3, 2009
1 parent 0a542b3 commit 69c3ea0b2c406b728fdca102442faeda2c666c72
View
@@ -84,7 +84,7 @@
public static function getVersion()
{
- return '1.3.2.2';
+ return '1.3.2.3';
}
/**
@@ -36,12 +36,12 @@
<div class="box">
<p class="grand-total"><br /><b>Signing up with Checkout by Amazon</b></p>
<p>To configure Checkout by Amazon&trade; you will need to enter your Checkout by Amazon&trade; Merchant ID, Access Key ID, and Secret Access Key.</p>
-<p>If you do not already have a Checkout by Amazon&trade; account, click here to create one now. <a href="https://sellercentral.amazon.com/gp/on-board/workflow/Registration/login.html/902-0586098-4611057?passthrough%2Fsource=RPVARIENA2ZZYWSJ0WMID8&passthrough%2Fld=DOWNLOADABLE&passthrough%2Faccount=cba&passthrough%2FsuperSource=OAR&passthrough%2FmarketplaceID=AZ4B0ZS3LGLX" target="_blank">Sign-Up</a></p>
+<p>If you do not already have a Checkout by Amazon&trade; account, click here to create one now. <a href="https://sellercentral.amazon.com/gp/on-board/workflow/Registration/login.html/902-0586098-4611057?passthrough%2Fsource=AmazonCheckout&passthrough%2Fld=RPVARIENA2ZZYWSJ0WMID8&passthrough%2Faccount=cba&passthrough%2FsuperSource=OAR&passthrough%2FmarketplaceID=AZ4B0ZS3LGLX" target="_blank">Sign-Up</a></p>
<p>To locate your Merchant ID, sign in to your Seller Central Checkout by Amazon&trade; account and click <b>Settings > Checkout Pipeline Settings.</b></p>
<p>To locate your Access Key ID and Secret Access Key, sign in to your Seller Central Checkout by Amazon&trade; account and click <b>Integration > AWS Key.</b> Click the link to read the Amazon Web Services Customer Agreement, and then click the check box, if you are setting up a new Access Key ID.</p>
<p>To enable XML Order Reports click <b>Settings > Checkout Pipeline Settings</b>, and then clicking Edit under the Order Report Settings section. Select <u>Order Report Type</u> as XML to get XML Order Reports using SOAP APIs. Configure your downloads for <u>hourly.</u></p>
<p>For additional information on setting up your Checkout by Amazon account, <a href="https://payments.amazon.com/sdui/sdui/business?sn=cba/faq" target="_blank">Click Here - FAQ.</a></p>
-<p><br /><a href="https://sellercentral.amazon.com/gp/on-board/workflow/Registration/login.html/902-0586098-4611057?passthrough%2Fsource=RPVARIENA2ZZYWSJ0WMID8&passthrough%2Fld=DOWNLOADABLE&passthrough%2Faccount=cba&passthrough%2FsuperSource=OAR&passthrough%2FmarketplaceID=AZ4B0ZS3LGLX" target="_blank">Signup for Checkout by Amazon</a><br /><br /></p>
+<p><br /><a href="https://sellercentral.amazon.com/gp/on-board/workflow/Registration/login.html/902-0586098-4611057?passthrough%2Fsource=AmazonCheckout&passthrough%2Fld=RPVARIENA2ZZYWSJ0WMID8&passthrough%2Faccount=cba&passthrough%2FsuperSource=OAR&passthrough%2FmarketplaceID=AZ4B0ZS3LGLX" target="_blank">Signup for Checkout by Amazon</a><br /><br /></p>
</div>
</div>
]]></comment>
@@ -168,14 +168,18 @@ public function getProductStoreId()
}
/**
- * Enter description here...
+ * Load collection
*
- * @param boolean $printQuery
- * @param boolean $logQuery
+ * @param bool $printQuery
+ * @param bool $logQuery
* @return Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection
*/
public function load($printQuery = false, $logQuery = false)
{
+ if ($this->isLoaded()) {
+ return $this;
+ }
+
if ($this->_loadWithProductCount) {
$this->addAttributeToSelect('all_children');
$this->addAttributeToSelect('is_anchor');
@@ -192,8 +196,6 @@ public function load($printQuery = false, $logQuery = false)
/**
* Load categories product count
- *
- * @return Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection
*/
protected function _loadProductCount()
{
@@ -20,7 +20,7 @@
*
* @category Mage
* @package Mage_Payment
- * @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
+ * @copyright Copyright (c) 2009 Irubin Consulting Inc. DBA Varien (http://www.varien.com)
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
*/
@@ -30,12 +30,23 @@
*
* @category Mage
* @package Mage_Payment
- * @author Magento Core Team <core@magentocommerce.com>
+ * @author Magento Core Team <core@magentocommerce.com>
*/
class Mage_Payment_Model_Method_Free extends Mage_Payment_Model_Method_Abstract
{
+ /**
+ * Payment code name
+ *
+ * @var string
+ */
protected $_code = 'free';
+ /**
+ * Check method is available
+ *
+ * @param Mage_Sales_Model_Quote $quote
+ * @return bool
+ */
public function isAvailable($quote=null)
{
if (is_null($quote)) {
@@ -47,4 +58,4 @@ public function isAvailable($quote=null)
}
return false;
}
-}
+}
@@ -194,6 +194,7 @@ public function getStandardCheckoutFormFields()
'state' => $a->getRegionCode(),
'country' => $a->getCountry(),
'zip' => $a->getPostcode(),
+ 'bn' => 'Varien_Cart_WPS_US'
);
$logoUrl = Mage::getStoreConfig('paypal/wps/logo_url');
@@ -413,7 +414,7 @@ public function ipnPostSubmit()
$order->getPayment()->setTransactionId($this->getIpnFormData('txn_id'));
//need to convert from order into invoice
$invoice = $order->prepareInvoice();
- $invoice->register()->capture();
+ $invoice->register()->pay();
Mage::getModel('core/resource_transaction')
->addObject($invoice)
->addObject($invoice->getOrder())
@@ -147,7 +147,9 @@ public function place()
$this->setAmountAuthorized($this->getOrder()->getTotalDue());
$this->setBaseAmountAuthorized($this->getOrder()->getBaseTotalDue());
- $orderState = Mage_Sales_Model_Order::STATE_PROCESSING;
+ $orderState = $this->getOrder()->getIsVirtual()
+ ? Mage_Sales_Model_Order::STATE_COMPLETE
+ : Mage_Sales_Model_Order::STATE_PROCESSING;
break;
default:
break;
@@ -174,7 +176,7 @@ public function place()
$orderStatus = $methodInstance->getConfigData('order_status');
}
- if (!$orderStatus) {
+ if (!$orderStatus || $this->getOrder()->getIsVirtual()) {
$orderStatus = $this->getOrder()->getConfig()->getStateDefaultStatus($orderState);
}
}
@@ -68,8 +68,9 @@ public function getQuote()
/**
* Import data
*
- * @param array $data
- * @return Mage_Sales_Model_Quote_Payment
+ * @param array $data
+ * @throws Mage_Core_Exception
+ * @return Mage_Sales_Model_Quote_Payment
*/
public function importData(array $data)
{
@@ -85,6 +86,10 @@ public function importData(array $data)
$this->setMethod($data->getMethod());
$method = $this->getMethodInstance();
+ if (!$method->isAvailable($this->getQuote())) {
+ Mage::throwException(Mage::helper('sales')->__('Requested Payment Method is not available'));
+ }
+
$method->assignData($data);
/*
* validating the payment data
@@ -211,7 +211,7 @@ if (!navigator.appVersion.match('MSIE 6.')) {
header_copy = document.createElement('div');
header_copy.appendChild(header.cloneNode(true));
- document.body.appendChild(header_copy);
+ document.body.insertBefore(header_copy, document.body.lastChild)
$(header_copy).addClassName('content-header-floating');
if ($(header_copy).down('.content-buttons-placeholder')) {
$(header_copy).down('.content-buttons-placeholder').remove();
@@ -373,4 +373,4 @@ var Fieldset = {
loaderArea: false
});
}
-};
+};

0 comments on commit 69c3ea0

Please sign in to comment.