Version Notes
Adding Validator model override
Download this release
Release Info
Developer | Kingshuk deb |
Extension | multidiscount |
Version | 0.1.3 |
Comparing to | |
See all releases |
Code changes from version 0.1.2 to 0.1.3
app/design/adminhtml/default/default/template/promo/options.phtml
CHANGED
@@ -33,7 +33,14 @@
|
|
33 |
*/
|
34 |
?>
|
35 |
</tbody></table>
|
36 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
<div class="hor-scroll">
|
38 |
<table class="dynamic-grid" cellspacing="0" cellpadding="0">
|
39 |
<tr id="options-table">
|
@@ -90,11 +97,24 @@ var templateText =
|
|
90 |
'<\/td>'+
|
91 |
'<\/tr>';
|
92 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
var attributeOption = {
|
94 |
table : $('options-table'),
|
95 |
templateSyntax : /(^|.|\r|\n)({{(\w+)}})/,
|
96 |
templateText : templateText,
|
97 |
-
itemCount :
|
98 |
totalItems : 0,
|
99 |
isReadOnly: <?php echo (int)$this->getReadOnly(); ?>,
|
100 |
add : function(data) {
|
@@ -103,11 +123,6 @@ var attributeOption = {
|
|
103 |
if(!data.id){
|
104 |
data = {};
|
105 |
data.id = 'option_'+this.itemCount;
|
106 |
-
var x = document.getElementsByName("option[value]["+data.id+"][from]").length;
|
107 |
-
if(x){
|
108 |
-
this.itemCount++;
|
109 |
-
data.id = 'option_'+this.itemCount;
|
110 |
-
}
|
111 |
isNewOption = true;
|
112 |
}
|
113 |
if (!data.intype)
|
33 |
*/
|
34 |
?>
|
35 |
</tbody></table>
|
36 |
+
<?php $_optionsData = $this->getOptionsData();
|
37 |
+
if($this->getCurrentOption()=='cart_percent'){
|
38 |
+
$display = 'block';
|
39 |
+
}else{
|
40 |
+
$display = 'none';
|
41 |
+
}
|
42 |
+
?>
|
43 |
+
<div class="entity-edit" id="matage-options-panel" style="display:<?php echo $display; ?>">
|
44 |
<div class="hor-scroll">
|
45 |
<table class="dynamic-grid" cellspacing="0" cellpadding="0">
|
46 |
<tr id="options-table">
|
97 |
'<\/td>'+
|
98 |
'<\/tr>';
|
99 |
|
100 |
+
var nameArr = [];
|
101 |
+
$$('.dynamic-grid tr.option-row td input').each(
|
102 |
+
function (index) {
|
103 |
+
var res = index.getAttribute("name").match(/delete/i);
|
104 |
+
if(res){
|
105 |
+
str = index.getAttribute("name").replace("option[delete][option_", "");
|
106 |
+
str = str.replace("]", "");
|
107 |
+
nameArr.push(parseInt(str));
|
108 |
+
}
|
109 |
+
}
|
110 |
+
);
|
111 |
+
maxNumber = Math.max.apply(Math, nameArr);
|
112 |
+
|
113 |
var attributeOption = {
|
114 |
table : $('options-table'),
|
115 |
templateSyntax : /(^|.|\r|\n)({{(\w+)}})/,
|
116 |
templateText : templateText,
|
117 |
+
itemCount : maxNumber+1,
|
118 |
totalItems : 0,
|
119 |
isReadOnly: <?php echo (int)$this->getReadOnly(); ?>,
|
120 |
add : function(data) {
|
123 |
if(!data.id){
|
124 |
data = {};
|
125 |
data.id = 'option_'+this.itemCount;
|
|
|
|
|
|
|
|
|
|
|
126 |
isNewOption = true;
|
127 |
}
|
128 |
if (!data.intype)
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Multidiscount_Couponcode</name>
|
4 |
-
<version>0.1.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -19,9 +19,9 @@ and so on.
|
|
19 |
You just need to create a single coupon code and need to add from what amount to what amount how much discount you want to provide.</description>
|
20 |
<notes>Adding Validator model override</notes>
|
21 |
<authors><author><name>Kingshuk deb</name><user>kingshukdeb</user><email>kingshukdeb88@gmail.com</email></author></authors>
|
22 |
-
<date>2016-06-
|
23 |
-
<time>06:
|
24 |
-
<contents><target name="magelocal"><dir name="Multidiscount"><dir name="Couponcode"><dir name="Block"><dir name="Adminhtml"><dir name="Promo"><dir name="Quote"><dir name="Edit"><file name="Options.php" hash="b251dd1751fb49adaa0143fe63b357e4"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="16e670874b16e6ea0f0a318fbae54c05"/></dir><dir name="Model"><file name="Observer.php" hash="cc58c72bed15cd57dedf24e0e64cf22d"/><file name="Percentconst.php" hash="c566016651e421e291039314231e1eb1"/><dir name="SalesRule"><file name="Validator.php" hash="96deaaaff346601ab0c1406331312228"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Promo"><file name="QuoteController.php" hash="630cf0a5e3daa42a1f1b32edb6378197"/></dir></dir></dir><dir name="etc"><file name="config.xml" hash="1932d41ed30fcaf19010e0b350d1691e"/></dir><dir name="sql"><dir name="couponcode_setup"><file name="mysql4-install-0.1.0.php" hash="dcaebeba905eb8719f5e218fd91e8794"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Multidiscount_Couponcode.xml" hash="c30e1bd8c3f55c2710f2aa2f360c98f0"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="promo"><file name="options.phtml" hash="
|
25 |
<compatible/>
|
26 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
27 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Multidiscount_Couponcode</name>
|
4 |
+
<version>0.1.3</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
19 |
You just need to create a single coupon code and need to add from what amount to what amount how much discount you want to provide.</description>
|
20 |
<notes>Adding Validator model override</notes>
|
21 |
<authors><author><name>Kingshuk deb</name><user>kingshukdeb</user><email>kingshukdeb88@gmail.com</email></author></authors>
|
22 |
+
<date>2016-06-18</date>
|
23 |
+
<time>06:45:33</time>
|
24 |
+
<contents><target name="magelocal"><dir name="Multidiscount"><dir name="Couponcode"><dir name="Block"><dir name="Adminhtml"><dir name="Promo"><dir name="Quote"><dir name="Edit"><file name="Options.php" hash="b251dd1751fb49adaa0143fe63b357e4"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="16e670874b16e6ea0f0a318fbae54c05"/></dir><dir name="Model"><file name="Observer.php" hash="cc58c72bed15cd57dedf24e0e64cf22d"/><file name="Percentconst.php" hash="c566016651e421e291039314231e1eb1"/><dir name="SalesRule"><file name="Validator.php" hash="96deaaaff346601ab0c1406331312228"/></dir></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Promo"><file name="QuoteController.php" hash="630cf0a5e3daa42a1f1b32edb6378197"/></dir></dir></dir><dir name="etc"><file name="config.xml" hash="1932d41ed30fcaf19010e0b350d1691e"/></dir><dir name="sql"><dir name="couponcode_setup"><file name="mysql4-install-0.1.0.php" hash="dcaebeba905eb8719f5e218fd91e8794"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Multidiscount_Couponcode.xml" hash="c30e1bd8c3f55c2710f2aa2f360c98f0"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="promo"><file name="options.phtml" hash="e4c1e842aebb019393c87e77ffe6e800"/></dir></dir></dir></dir></dir></target></contents>
|
25 |
<compatible/>
|
26 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
27 |
</package>
|