|
I’m looking at the Checkout Success page and the PayPal Standard instructions that come before it.
1) A FREE (or Zero subtotal) purchase goes direct to the Checkout Success page.
code > core > Mage > Downloadable > Block > Success.php
Success.php: Here, a script asks if a session exists and, if so, looks for downloadables in the last order. IF this is true, it will GET the list of Downloadable Products, as shown here:
class Mage_Downloadable_Block_Checkout_Success extends Mage_Checkout_Block_Onepage_Success
{
/**
* Return true if order(s) has one or more downloadable products
*
* @return bool
*/
public function getOrderHasDownloadable()
{
$hasDownloadableFlag = Mage::getSingleton(’checkout/session’)
->getHasDownloadableProducts(true);
if (!$this->isOrderVisible()) {
return false;
}
/**
* Return url to list of ordered downloadable products of customer
*
* @return string
*/
public function getDownloadableProductsUrl()
{
return $this->getUrl(’downloadable/customer/products’, array(’_secure’ => true));
}
}
_____________
2) This list does NOT appear on the Checkout Success page for PayPal purchases.
code > core > Mage > Paypal > controllers > StandardController.php
StandardController.php: Is it possible the problem is tied to the PayPal session variable instructions or the POST instruction before redirecting to the Checkout Success page? Here are snippets from StandardController.php:
class Mage_Paypal_StandardController extends Mage_Core_Controller_Front_Action
/**
* When a customer chooses Paypal on Checkout/Payment page
*
*/
public function redirectAction()
{
$session = Mage::getSingleton(’checkout/session’);
$session->setPaypalStandardQuoteId($session->getQuoteId());
$this->getResponse()->setBody($this->getLayout()->createBlock(’paypal/standard_redirect’)->toHtml());
$session->unsQuoteId();
}
-----
* when paypal returns
* The order information at this point is in POST
* variables. However, you don’t want to “process” the order until you
* get validation from the IPN.
*/
public function successAction()
{
$session = Mage::getSingleton(’checkout/session’);
$session->setQuoteId($session->getPaypalStandardQuoteId(true));
/**
* set the quote as inactive after back from paypal
*/
Mage::getSingleton(’checkout/session’)->getQuote()->setIsActive(false)->save();
//Mage::getSingleton(’checkout/session’)->unsQuoteId();
$this->_redirect(’checkout/onepage/success’, array(’_secure’=>true));
}
/**
* when paypal returns via ipn
* cannot have any output here
* validate IPN data
* if data is valid need to update the database that the user has
*/
public function ipnAction()
{
if (!$this->getRequest()->isPost()) {
$this->_redirect(’’);
return;
}
_______
Thanks in advance
-websitebob
|