I have a site set up using Silvershop and the Discounts module and I wanted to create a 'sale category' page. The problem I am running into is that products can be given a 'Specific Price' and you can save them without having an end date entered. So a product can be on special from today indefinitely, which is fine, I want that flexibility. However I don't seem to be able to create a query to get these records where the end date is null.
$now = date('Y-m-d');
$do = SpecificPrice::get()->filter(array('StartDate:LessThanOrEqual' => $now))->filterAny(array("EndDate:GreaterThanOrEqual" => $now, "EndDate" => "NULL"));
This retrieves the products that have an end date specified, but not those that have a NULL value in the database. I have tried:
"EndDate" => "NULL"
"EndDate:is" => "NULL"
"EndDate" => ""
"EndDate" => " "
"EndDate" => NULL
"EndDate" => false
So how do I get these records in my query?
Thanks