File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
app/code/Magento/Catalog/Model/Product/Attribute/Backend Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -159,8 +159,22 @@ protected function validatePrice(array $priceRow)
159
159
*/
160
160
protected function modifyPriceData ($ object , $ data )
161
161
{
162
+ /** @var \Magento\Catalog\Model\Product $object */
162
163
$ data = parent ::modifyPriceData ($ object , $ data );
163
164
$ price = $ object ->getPrice ();
165
+
166
+ $ specialPrice = $ object ->getSpecialPrice ();
167
+ $ specialPriceFromDate = $ object ->getSpecialFromDate ();
168
+ $ specialPriceToDate = $ object ->getSpecialToDate ();
169
+ $ today = time ();
170
+
171
+ if ($ specialPrice && ($ object ->getPrice () > $ object ->getFinalPrice ())) {
172
+ if ($ today >= strtotime ($ specialPriceFromDate ) && $ today <= strtotime ($ specialPriceToDate ) ||
173
+ $ today >= strtotime ($ specialPriceFromDate ) && $ specialPriceToDate === null ) {
174
+ $ price = $ specialPrice ;
175
+ }
176
+ }
177
+
164
178
foreach ($ data as $ key => $ tierPrice ) {
165
179
$ percentageValue = $ this ->getPercentage ($ tierPrice );
166
180
if ($ percentageValue ) {
You can’t perform that action at this time.
0 commit comments