Fixed: AW_Sarp2 (Subscription + Recurring Payments Module) conflict with IWD_Opc (Checkout Suite)

paypal-sarp2-error
If you’re using Aheadworks Subscriptions and Recurring payments with IWD One Page Checkout (Now IWD Checkout Suite), chances are, it won’t work without modifying IWD OPC’s module files. You won’t get redirected to PayPal, because you’ll get a message that says “PayPal does not support processing orders with zero amount. To complete your purchase, proceed to the standard checkout process.”

In order to use AW’s Subscriptions and Recurring Payments module, you need to activate PayPal Express checkout, then modify two files inside your OPC folder.

Open app/code/community/IWD/Opc/Block/Paypal/Shortcut.php and replace
class IWD_Opc_Block_Paypal_Shortcut extends Mage_Paypal_Block_Express_Shortcut{

with:
if (Mage::helper('core')->isModuleOutputEnabled('AW_Sarp2')) {
class IWD_Opc_Block_Paypal_ShortcutCommon extends AW_Sarp2_Block_Paypal_Express_Shortcut {}
}
else {
class IWD_Opc_Block_Paypal_ShortcutCommon extends Mage_Paypal_Block_Express_Shortcut {}
}

class IWD_Opc_Block_Paypal_Shortcut extends IWD_Opc_Block_Paypal_ShortcutCommon{

Then open app/code/community/IWD/Opc/Model/Paypal/Express.php and replace
class IWD_Opc_Model_Paypal_Express extends Mage_Paypal_Model_Express{

with:
if (Mage::helper('core')->isModuleOutputEnabled('AW_Sarp2')) {
class IWD_Opc_Model_Paypal_ExpressCommon extends AW_Sarp2_Model_Engine_Paypal_Payment_Express {}
}
else {
class IWD_Opc_Model_Paypal_ExpressCommon extends Mage_Paypal_Model_Express {}
}

class IWD_Opc_Model_Paypal_Express extends IWD_Opc_Model_Paypal_ExpressCommon{

Then that’s it. Your Recurring subscriptions module from Aheadworks will work without problems.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.