T
T
teen2017-05-25 17:10:48
1C-Bitrix
teen, 2017-05-25 17:10:48

How to filter orders by properties in Bitrix?

Good day.
There is a task to filter all orders of the store by one property, the value is "date" (in no way related to the date of placing the order or updating it),
i.e. I ajax'om should receive all orders which contain the given property with the date transferred by me.
What I've done:

$arFilter = Array("PROPERTY_VAL_BY_CODE_NEW_DATE_DEP" => "26.05.2017");
$db_sales =  CSaleOrder::GetList(array("DATE_INSERT" => "ASC"), $arFilter);
  while ($ar_sales = $db_sales->Fetch())
    {
       print_r($ar_sales);
    }

NEW_DATE_DEP - this is the CODE of the property
05/26/2017 - this is what I pass
Judging by the documentation, it should work. There is one similar question in Google , but in fact I did the same thing.
Maybe you need to specify something in the settings somewhere?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
teen, 2017-07-05
@MSkitalec

I answer my own question, these were the properties of the basket, I used GetList (CSaleBasket)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question