Skip to content

Commit

Permalink
MAGETWO-59047: [Github#6762] Start/End Dates added to Sale rule autom…
Browse files Browse the repository at this point in the history
…atically #6762
  • Loading branch information
Olga Nakonechna committed Oct 3, 2016
1 parent 152309b commit bfff75e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,13 @@ public function execute()
['request' => $this->getRequest()]
);
$data = $this->getRequest()->getPostValue();

$filterValues = ['from_date' => $this->_dateFilter];
if ($this->getRequest()->getParam('to_date')) {
$filterValues['to_date'] = $this->_dateFilter;
}
$inputFilter = new \Zend_Filter_Input(
['from_date' => $this->_dateFilter, 'to_date' => $this->_dateFilter],
$filterValues,
[],
$data
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ class AssertCartPriceRuleForm extends AbstractConstraint
protected $skippedFields = [
'conditions_serialized',
'actions_serialized',
'from_date',
'to_date',
'rule_id'
];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,10 +114,10 @@
<field name="uses_per_coupon" xsi:type="string">13</field>
<field name="uses_per_customer" xsi:type="string">63</field>
<field name="from_date" xsi:type="array">
<item name="pattern" xsi:type="string">3/25/2014</item>
<item name="pattern" xsi:type="string">03/25/2014</item>
</field>
<field name="to_date" xsi:type="array">
<item name="pattern" xsi:type="string">6/29/2024</item>
<item name="pattern" xsi:type="string">-</item>
</field>
<field name="sort_order" xsi:type="string">1</field>
<field name="is_rss" xsi:type="string">Yes</field>
Expand Down

0 comments on commit bfff75e

Please sign in to comment.