Version Notes
1. Order page modified with installment plans details in payment information section.
2. Customer can view there installment plans of a order from account panel for detail read the user guide
3. Enhance the payment association with order
4. Installment plan can be canceled on order cancellation
5. admin Interfaces are modified.
6. payment method only active at checkout per:
- min. checkout cart total
- allowed categories
- allowed customer groups
- excluded by product ids
Download this release
Release Info
Developer | Warrin |
Extension | Ced_LayBuy |
Version | 2.0.3 |
Comparing to | |
See all releases |
Code changes from version 2.0.2 to 2.0.3
app/code/local/Ced/LayBuy/Model/Standard.php
CHANGED
@@ -99,10 +99,12 @@ class Ced_LayBuy_Model_Standard extends Mage_Payment_Model_Method_Abstract
|
|
99 |
$paymentInfo = $this->getInfoInstance();
|
100 |
if ($paymentInfo instanceof Mage_Sales_Model_Order_Payment) {
|
101 |
$cartItems = $paymentInfo->getOrder()->getAllItems();
|
|
|
102 |
} else {
|
103 |
$cartItems = $paymentInfo->getQuote()->getAllItems();
|
|
|
104 |
}
|
105 |
-
$flagArr = $this->canUseForCategories($cartItems);
|
106 |
if (!$flagArr[0]) {
|
107 |
Mage::throwException(Mage::helper('laybuy')->__('Selected payment type is not allowed for '.$flagArr[1].' products.'));
|
108 |
}
|
@@ -114,7 +116,7 @@ class Ced_LayBuy_Model_Standard extends Mage_Payment_Model_Method_Abstract
|
|
114 |
*
|
115 |
* @return bool
|
116 |
*/
|
117 |
-
public function canUseForCategories($cartItems = array())
|
118 |
{
|
119 |
/*
|
120 |
for specific categories, the flag will set up as 1
|
@@ -122,10 +124,14 @@ class Ced_LayBuy_Model_Standard extends Mage_Payment_Model_Method_Abstract
|
|
122 |
$status = true;
|
123 |
$productName = '';
|
124 |
$configCategories = explode(',',Mage::getStoreConfig('laybuy/conditional_criteria/categories',$storeId ));
|
|
|
125 |
if($configCategories){
|
126 |
foreach($cartItems as $_product){
|
127 |
$_product = Mage::getModel('catalog/product')->load($_product->getProductId());
|
128 |
-
if(
|
|
|
|
|
|
|
129 |
$status = false;
|
130 |
$productName .= $_product->getName().',';
|
131 |
}
|
99 |
$paymentInfo = $this->getInfoInstance();
|
100 |
if ($paymentInfo instanceof Mage_Sales_Model_Order_Payment) {
|
101 |
$cartItems = $paymentInfo->getOrder()->getAllItems();
|
102 |
+
$storeId = $paymentInfo->getOrder()->getStoreId();
|
103 |
} else {
|
104 |
$cartItems = $paymentInfo->getQuote()->getAllItems();
|
105 |
+
$storeId = $paymentInfo->getQuote()->getStoreId();
|
106 |
}
|
107 |
+
$flagArr = $this->canUseForCategories($cartItems, $storeId);
|
108 |
if (!$flagArr[0]) {
|
109 |
Mage::throwException(Mage::helper('laybuy')->__('Selected payment type is not allowed for '.$flagArr[1].' products.'));
|
110 |
}
|
116 |
*
|
117 |
* @return bool
|
118 |
*/
|
119 |
+
public function canUseForCategories($cartItems = array(), $storeId=0)
|
120 |
{
|
121 |
/*
|
122 |
for specific categories, the flag will set up as 1
|
124 |
$status = true;
|
125 |
$productName = '';
|
126 |
$configCategories = explode(',',Mage::getStoreConfig('laybuy/conditional_criteria/categories',$storeId ));
|
127 |
+
$xproducts = explode(',',Mage::getStoreConfig('laybuy/conditional_criteria/xproducts',$storeId));
|
128 |
if($configCategories){
|
129 |
foreach($cartItems as $_product){
|
130 |
$_product = Mage::getModel('catalog/product')->load($_product->getProductId());
|
131 |
+
if($xproducts && in_array($_product->getId(),$xproducts)){
|
132 |
+
$status = false;
|
133 |
+
$productName .= $_product->getName().',';
|
134 |
+
}elseif(count(array_diff($_product->getCategoryIds(),$configCategories))>0){
|
135 |
$status = false;
|
136 |
$productName .= $_product->getName().',';
|
137 |
}
|
app/code/local/Ced/LayBuy/etc/system.xml
CHANGED
@@ -123,13 +123,25 @@
|
|
123 |
<show_in_store>1</show_in_store>
|
124 |
<shared>1</shared>
|
125 |
</conditional_criteria_category>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
126 |
<conditional_criteria_customergroup translate="label comment">
|
127 |
<label>Allowed Customer Groups</label>
|
128 |
<config_path>laybuy/conditional_criteria/customergroup</config_path>
|
129 |
<frontend_type>multiselect</frontend_type>
|
130 |
<source_model>laybuy/system_config_source_groups</source_model>
|
131 |
<comment>The checkout customer must be in these customer groups before this payment method becomes active.</comment>
|
132 |
-
<sort_order>
|
133 |
<show_in_default>1</show_in_default>
|
134 |
<show_in_website>1</show_in_website>
|
135 |
<show_in_store>1</show_in_store>
|
@@ -141,7 +153,7 @@
|
|
141 |
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
142 |
<upload_dir config="system/filesystem/media" scope_info="1">laybuy</upload_dir>
|
143 |
<base_url type="media" scope_info="1">laybuy</base_url>
|
144 |
-
<sort_order>
|
145 |
<show_in_default>1</show_in_default>
|
146 |
<show_in_website>1</show_in_website>
|
147 |
<show_in_store>1</show_in_store>
|
123 |
<show_in_store>1</show_in_store>
|
124 |
<shared>1</shared>
|
125 |
</conditional_criteria_category>
|
126 |
+
<conditional_criteria_exclude_products translate="label comment">
|
127 |
+
<label>Excluded Product Ids</label>
|
128 |
+
<config_path>laybuy/conditional_criteria/xproducts</config_path>
|
129 |
+
<frontend_type>textarea</frontend_type>
|
130 |
+
<can_be_empty>1</can_be_empty>
|
131 |
+
<comment>Add product ids separated by comma(,) for which method will not available.</comment>
|
132 |
+
<sort_order>67</sort_order>
|
133 |
+
<show_in_default>1</show_in_default>
|
134 |
+
<show_in_website>1</show_in_website>
|
135 |
+
<show_in_store>1</show_in_store>
|
136 |
+
<shared>1</shared>
|
137 |
+
</conditional_criteria_exclude_products>
|
138 |
<conditional_criteria_customergroup translate="label comment">
|
139 |
<label>Allowed Customer Groups</label>
|
140 |
<config_path>laybuy/conditional_criteria/customergroup</config_path>
|
141 |
<frontend_type>multiselect</frontend_type>
|
142 |
<source_model>laybuy/system_config_source_groups</source_model>
|
143 |
<comment>The checkout customer must be in these customer groups before this payment method becomes active.</comment>
|
144 |
+
<sort_order>68</sort_order>
|
145 |
<show_in_default>1</show_in_default>
|
146 |
<show_in_website>1</show_in_website>
|
147 |
<show_in_store>1</show_in_store>
|
153 |
<backend_model>adminhtml/system_config_backend_image</backend_model>
|
154 |
<upload_dir config="system/filesystem/media" scope_info="1">laybuy</upload_dir>
|
155 |
<base_url type="media" scope_info="1">laybuy</base_url>
|
156 |
+
<sort_order>69</sort_order>
|
157 |
<show_in_default>1</show_in_default>
|
158 |
<show_in_website>1</show_in_website>
|
159 |
<show_in_store>1</show_in_store>
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Ced_LayBuy</name>
|
4 |
-
<version>2.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
@@ -26,11 +26,12 @@ This effectively increases sales and radically improves cash flow where all the
|
|
26 |
6. payment method only active at checkout per:
|
27 |
- min. checkout cart total
|
28 |
- allowed categories
|
29 |
-
- allowed customer groups
|
|
|
30 |
<authors><author><name>Warrin</name><user>Warrin</user><email>warrin@lay-buys.com</email></author><author><name>Asheesh Singh</name><user>asheeshsingh</user><email>asheeshsingh@cedcoss.com</email></author></authors>
|
31 |
-
<date>2014-01-
|
32 |
-
<time>
|
33 |
-
<contents><target name="magelocal"><dir name="Ced"><dir name="LayBuy"><dir name="Block"><dir name="Adminhtml"><dir name="Report"><dir name="Details"><file name="Form.php" hash="80d28e9b0e19ccab233ea9f18041e364"/></dir><file name="Details.php" hash="f701acdd96fc4f02e8eb878a283449b1"/><dir name="Edit"><file name="Form.php" hash="a2611910f2363eec55531dbf552ed37c"/></dir><file name="Edit.php" hash="04d67bf341a8b7619a79605654b7713f"/><file name="Grid.php" hash="6038eda0c8c2bd17a8da71208011e8e0"/><dir name="Renderer"><file name="Email.php" hash="8e6c0938d80f629cd285303018945ea1"/><file name="Order.php" hash="d89e20aa07fd18a39a1cd881ec9f4995"/><file name="Record.php" hash="95eb9f836a50f3f80d254a7cdd8e1d6e"/></dir></dir><file name="Report.php" hash="9275aca45974105321eed5e06de54e88"/></dir><dir name="Customer"><dir name="Account"><file name="Details.php" hash="64434830be63218157c53a860ab7f48e"/><file name="Grid.php" hash="41d9e28477936ca27f5031e920ee7cfb"/></dir></dir><dir name="Form"><file name="Laybuy.php" hash="f48e5db65ff1b62730e642eada837ec7"/></dir><dir name="Info"><file name="Laybuy.php" hash="00dca1578594e6ec2d5f3ee9004d12fe"/></dir><dir name="Revise"><file name="Redirect.php" hash="6f63613d0fe5540a296804c14263a614"/></dir><dir name="Standard"><file name="Redirect.php" hash="306a88ff75d35c18157dc5dceb02c06f"/></dir></dir><dir name="Helper"><file name="Config.php" hash="f0e99e4baff0db77a27938c071dd26fa"/><file name="Data.php" hash="7aa0f518b49ed5cbb64db57f984494a9"/></dir><dir name="Model"><file name="Observer.php" hash="6a077f545a9f16f5702d783205da1935"/><file name="Report.php" hash="d910a81e6b242cba1d4b58c72929f25e"/><dir name="Resource"><dir name="Report"><file name="Collection.php" hash="5b9e116a63230865d17e13c5d26a95c3"/></dir><file name="Report.php" hash="52986dcbc47da5c268440f5c5283c46c"/><dir name="Revise"><file name="Collection.php" hash="50586282559c46d238cca78bcebbc7a9"/></dir><file name="Revise.php" hash="aeecb9f7bef38fe89769379829d570ea"/><file name="Setup.php" hash="4917b74ef754c4e3d5e0326b2f47af62"/></dir><file name="Revise.php" hash="225c67ee5ff3e9646785ee4342822c82"/><file name="Standard.php" hash="
|
34 |
<compatible/>
|
35 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
36 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Ced_LayBuy</name>
|
4 |
+
<version>2.0.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License (OSL)</license>
|
7 |
<channel>community</channel>
|
26 |
6. payment method only active at checkout per:
|
27 |
- min. checkout cart total
|
28 |
- allowed categories
|
29 |
+
- allowed customer groups
|
30 |
+
- excluded by product ids </notes>
|
31 |
<authors><author><name>Warrin</name><user>Warrin</user><email>warrin@lay-buys.com</email></author><author><name>Asheesh Singh</name><user>asheeshsingh</user><email>asheeshsingh@cedcoss.com</email></author></authors>
|
32 |
+
<date>2014-01-27</date>
|
33 |
+
<time>13:16:58</time>
|
34 |
+
<contents><target name="magelocal"><dir name="Ced"><dir name="LayBuy"><dir name="Block"><dir name="Adminhtml"><dir name="Report"><dir name="Details"><file name="Form.php" hash="80d28e9b0e19ccab233ea9f18041e364"/></dir><file name="Details.php" hash="f701acdd96fc4f02e8eb878a283449b1"/><dir name="Edit"><file name="Form.php" hash="a2611910f2363eec55531dbf552ed37c"/></dir><file name="Edit.php" hash="04d67bf341a8b7619a79605654b7713f"/><file name="Grid.php" hash="6038eda0c8c2bd17a8da71208011e8e0"/><dir name="Renderer"><file name="Email.php" hash="8e6c0938d80f629cd285303018945ea1"/><file name="Order.php" hash="d89e20aa07fd18a39a1cd881ec9f4995"/><file name="Record.php" hash="95eb9f836a50f3f80d254a7cdd8e1d6e"/></dir></dir><file name="Report.php" hash="9275aca45974105321eed5e06de54e88"/></dir><dir name="Customer"><dir name="Account"><file name="Details.php" hash="64434830be63218157c53a860ab7f48e"/><file name="Grid.php" hash="41d9e28477936ca27f5031e920ee7cfb"/></dir></dir><dir name="Form"><file name="Laybuy.php" hash="f48e5db65ff1b62730e642eada837ec7"/></dir><dir name="Info"><file name="Laybuy.php" hash="00dca1578594e6ec2d5f3ee9004d12fe"/></dir><dir name="Revise"><file name="Redirect.php" hash="6f63613d0fe5540a296804c14263a614"/></dir><dir name="Standard"><file name="Redirect.php" hash="306a88ff75d35c18157dc5dceb02c06f"/></dir></dir><dir name="Helper"><file name="Config.php" hash="f0e99e4baff0db77a27938c071dd26fa"/><file name="Data.php" hash="7aa0f518b49ed5cbb64db57f984494a9"/></dir><dir name="Model"><file name="Observer.php" hash="6a077f545a9f16f5702d783205da1935"/><file name="Report.php" hash="d910a81e6b242cba1d4b58c72929f25e"/><dir name="Resource"><dir name="Report"><file name="Collection.php" hash="5b9e116a63230865d17e13c5d26a95c3"/></dir><file name="Report.php" hash="52986dcbc47da5c268440f5c5283c46c"/><dir name="Revise"><file name="Collection.php" hash="50586282559c46d238cca78bcebbc7a9"/></dir><file name="Revise.php" hash="aeecb9f7bef38fe89769379829d570ea"/><file name="Setup.php" hash="4917b74ef754c4e3d5e0326b2f47af62"/></dir><file name="Revise.php" hash="225c67ee5ff3e9646785ee4342822c82"/><file name="Standard.php" hash="039a65018d7bc6e2e2ed5fa70e9f4a50"/><dir name="System"><dir name="Config"><dir name="Backend"><file name="Cron.php" hash="8d6e6dc1c3265307eed7a829031dd5f3"/></dir><dir name="Source"><file name="Categories - bkp.php" hash="3f2bdf2c43568883f536654edf85a3da"/><file name="Categories.php" hash="5bea8c2ea19a3dc311aa7b95c4f4d313"/><file name="FetchingSchedule.php" hash="4f3e5aec5a17991d1625d6f17c0f7d32"/><file name="Groups.php" hash="87a205676d93d59a26d1d7bb69266991"/></dir></dir></dir></dir><file name="README.txt" hash="7930d4ac1e8f9957bb2052983eab4340"/><dir name="controllers"><dir name="Adminhtml"><file name="ReportController.php" hash="97dd32cbdb7f34149624e3a154837438"/></dir><file name="ReportController.php" hash="0ae0fee6659f30a811f151c5007abaf8"/><file name="ReviseController.php" hash="e1abafbdeaa5cb13315a3e679487df06"/><file name="StandardController.php" hash="bbcb30a1ed084e31aed1f4c3fabb30e7"/></dir><dir name="etc"><file name="adminhtml.xml" hash="d6be666f723ef84014bdcc0501bf09fb"/><file name="config.xml" hash="382e0f5cea4ed4f0a60adecbb46025ab"/><file name="system.xml" hash="5e62f3481c435548585e292e64c6f3f4"/></dir><dir name="sql"><dir name="laybuy_setup"><file name="mysql4-install-0.1.0.php" hash="68e359cd24b6051d0c2a91daad899d71"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="bec5e37090cb5a6da6c8ba3652a8bd32"/><file name="mysql4-upgrade-0.2.0-0.3.0.php" hash="97aa7a2a8c91e46c896a6d04d9554aeb"/><file name="mysql4-upgrade-0.3.0-0.4.0.php" hash="9b147158166b94d52e0cfff369ce965c"/><file name="mysql4-upgrade-0.4.0-0.5.0.php" hash="7626925b0cac03d0918eb6b1d51e6d19"/><file name="mysql4-upgrade-0.5.0-0.6.0.php" hash="bc96daed76ca1f04b1eb422508bc3a4b"/><file name="mysql4-upgrade-0.6.0-0.7.0.php" hash="6aa013f47e3b78e4d78e2cba9b471cd4"/><file name="mysql4-upgrade-0.7.0-0.8.0.php" hash="c2ea0f16c8f1e0dc7412a6a0fda1c622"/><file name="mysql4-upgrade-0.8.0-0.9.0.php" hash="d98ba6bef5f4f46ca741d5db014686f1"/></dir></dir><file name="README.txt" hash="7930d4ac1e8f9957bb2052983eab4340"/></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="laybuy.xml" hash="06a129b1976e1bffe665b6857a7692f1"/></dir><dir name="template"><dir name="laybuy"><dir name="checkout"><dir name="onepage"><dir name="review"><file name="button.phtml" hash="df735c2e0c07a664717dc4cd3ea62c99"/></dir></dir></dir><dir name="customer"><dir name="account"><file name="details.phtml" hash="b2014625326522e477ffc2e5163bf9d9"/><file name="grid.phtml" hash="a4997c40900f4a927b9bfb564938e202"/></dir></dir><dir name="form"><file name="extra.phtml" hash="457bbd674b69b4866bf834cb67d79dcd"/><file name="laybuy.phtml" hash="250a2e47b647830dde0a1c511cc2d959"/><file name="laybuy.phtml.original" hash="39aacfc3f3f6ada9e20bbaefef843bab"/></dir><dir name="info"><file name="default.phtml" hash="a0b7e9996902ca0bcf0e424366e40c98"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="laybuy.xml" hash="daf3f1e61e17f4d16c64e34c0b6a0e7b"/></dir><dir name="template"><dir name="laybuy"><dir name="info"><file name="default.phtml" hash="0c8d53885be3931bb9af881a8b4f9906"/></dir><file name="notification.phtml" hash="37f0ece7fa9ee89f2d0bcbe3a836c019"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Ced_LayBuy.xml" hash="0299a80e1539c73b4edd1fb0df41c28d"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Ced_LayBuy.csv" hash="f79a1a6ca61c5e7a7463c380eb00896d"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="laybuy"><file name="tooltip.css" hash="ece078bf3d8bb27db4a616fdad505671"/></dir></dir><dir name="images"><dir name="laybuy"><file name="closeBtn.png" hash="b0be9d9ef1053c79b0ebdcef83b53f44"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="laybuy"><file name="check_jquery.js" hash="3f463b1398dd1d46ed3b25726dada9b9"/><file name="jquery.atooltip.js" hash="7ef69b27dfeaff3038e5a3fb1f1ed1ea"/><file name="jquery.min.js" hash="d2f9865f4b390d655e9a7d67aa34c477"/></dir></dir></target></contents>
|
35 |
<compatible/>
|
36 |
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
37 |
</package>
|