cancel
Showing results for 
Search instead for 
Did you mean: 

Use special price without a date

Use special price without a date

I'm facing an issue with my company's site, all our products show two price: actual price and suggested price for costumers.

I've checked their attributes and i can see that "actual price" is special price and "suggested price for costumers" is price.

After we moved to a new server i had to replace some images that where missing, and i realized that it wasn't possible to save the product without making the current date appearing in the "special price from date" field.

The problem is that when this happens the "sale" icon appears on the product, and it shouldn't.

Looking at the old products i can see that price and special price are there, and the "special price from date" is empty, so i think that's the problem.

Any idea? 

 

7 REPLIES 7

Re: Use special price without a date

Would you be able to double check in Catalog > Manage Attributes that the Special Price From attribute hasn't had the setting changes to "Values Required: Yes". 

 

Screen Shot 2018-01-10 at 15.11.05.png

----
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!

Re: Use special price without a date

I've already thought that, but i can confirm you that "special_from_date" is set as "Values Required: No"

Re: Use special price without a date

Does the field in admin show an asterisk?

When you say that the product won't save without a date in that field. What error does it give when that field is empty?

Given that these fields have been renamed, it's possible that there's custom code that's been added around these fields too that's preventing it from being saved so I would have a look into the codebase to see if there's anything relating to special price. 

----
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!

Re: Use special price without a date

  • No, there's no asterisk.
  • It gives no error, when i save the product with that field empty it automatically puts the current date in that place.
  • I thought that too, but i have no idea where to look for the right code, are you able to help me?

Re: Use special price without a date

It seems Magento 2 puts the current date in the special price from field on save, so maybe it's a newer feature of Magento.

 

If so, (and either way), it's probably easier just to edit the theme to decide more intelligently when a sale badge should be shown. Is there another way you can write the logic to decide that that isn't affected by the special_from_date field? Otherwise, you're going to need to dive into the code that's automatically adding it in admin (which could be Magento code) and customise it which is more tricky. 

----
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!

Re: Use special price without a date

Sorry for the delayed answer.

I'm not using Magento 2, but an old Magento 1.7.

I've looked in my theme a way to decide where to put the sale badge, but i've only found a button wich completely turn it on or off.

I'm worried that the only way is to dive into the code, but i don't know even where to start from.

The thing that bother me is that all the products work fine, is only when i try to modify them that the "special date from" field is activated. 

Re: Use special price without a date

Yes, it's only activated in admin because it seems to be a slight change in Magento's approach and only runs when editing a product in admin. Either roads to a solution, stop the date being automatically added when in admin, or being more intelligent about when to show the sale page is going to require diving into the code I'm afraid. 

----
If you've found one of my answers useful, please give "Kudos" or "Accept as Solution" as appropriate. Thanks!