0

I have two types of products:

  1. A product that is on sale all the time and uses the special price field with no scheduled dates.

  2. A product that is scheduled to go on sale once or twice a year using special price field and scheduled to and from dates in the future.

I have a coupon that MUST not be applicable on products whose special price field is active, whether by virtue of today's date falling within the to and from date fields, or by simply having its special price field filled in.

I can easily solve for product 1 - add a condition excluding anything with a special price greater than .01.

BUT that doesn't solve for product 2 - I do not want to exclude product 2 when the dates of the special price on product 2 have not been reached yet or have expired.

I do not want a manual solution (i.e. manually add products to a sale category when on sale, remove when not on sale).

I'm thinking of creating a cron job to make changes on the fly in a semi-auto fashion, but that seems desperate. Is there nothing I can do here to automate this based on special price dates?

dstep
  • 135
  • 3
  • 15

2 Answers2

0

You can do that using the Magento Admin.

First in admin go to Catalog -> Attributes -> Manage Attribute -> Look for "special_from_date" and "special_to_date".

Click on it, look for the option "Use for promotion conditions" set "Yes"

Now your special_from and special_to date will show up on your cart promotion rules section.

Guerra
  • 2,792
  • 1
  • 22
  • 32
  • I have this set to yes on both and I currently see them in cart promotion rules. The problem is that I cannot set a condition like this - special from date is before TODAY (a variable based on today's date). I can only set special from date is before mm/dd/yyy (static date). – dstep Dec 23 '14 at 00:19
0

I'm dealing with exactly the same need.

For now, I'm developing a cron job: it run every day at midnight andupdates the rule end_date with today(). It's hacky, but so far looks promising and it's way easier and more manteinable than messing with mage internals.

Edit: also see here https://magento.stackexchange.com/questions/210006/catalog-price-rules-with-date-as-conditions-cannot-possibly-work-due-to-strtotim