Skip to content

Commit 331e44f

Browse files
committed
MAGETWO-52577: [GitHub] Set Product as New from Date and Design Active From is set when setting Special Price #4387
1 parent 7dd0162 commit 331e44f

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

app/code/Magento/Catalog/Observer/SetSpecialPriceStartDateObserver.php renamed to app/code/Magento/Catalog/Observer/SetSpecialPriceStartDate.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77

88
use Magento\Framework\Event\ObserverInterface;
99

10-
class SetSpecialPriceStartDateObserver implements ObserverInterface
10+
/**
11+
* Set value for Special Price start date
12+
*/
13+
class SetSpecialPriceStartDate implements ObserverInterface
1114
{
1215
/**
1316
* @var \Magento\Framework\Stdlib\DateTime\TimezoneInterface
@@ -24,7 +27,7 @@ public function __construct(\Magento\Framework\Stdlib\DateTime\TimezoneInterface
2427
}
2528

2629
/**
27-
* Setting Special Price start date
30+
* Set the current date to Special Price From attribute if it empty
2831
*
2932
* @param \Magento\Framework\Event\Observer $observer
3033
* @return $this

app/code/Magento/Catalog/etc/events.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,6 @@
5252
<observer name="legacy_categorytree_load_after" instance="Magento\Framework\EntityManager\Observer\AfterEntityLoad" />
5353
</event>
5454
<event name="catalog_product_save_before">
55-
<observer name="set_special_price_start_date" instance="Magento\Catalog\Observer\SetSpecialPriceStartDateObserver" />
55+
<observer name="set_special_price_start_date" instance="Magento\Catalog\Observer\SetSpecialPriceStartDate" />
5656
</event>
5757
</config>

0 commit comments

Comments
 (0)