strony www, sklepy internetowe, oprogramowanie

Archiwum kategorii ‘Magento’

Magento API – filtry

Czwartek, styczeń 5th, 2012

Ponieważ mamy ostatnio okazję popracować z MagentoAPI postanowiliśmy również zamieścić kilka przydatnych informacji na ten temat.

Zaczynamy od podania dostępnych filtrów, które można wykorzystać filtrując dane z API:

from returns rows that are after this value (datetime only)
to returns rows that are before this value (datetime only)
eq returns rows equal to this value
neq returns rows not equal to this value
like returns rows that match this value (with % as a wildcard)
nlike returns rows that do not match this value (with % as a wildcard)
in returns rows where the value is in this array (pass an array in)
nin returns rows where the value is not in this array (pass an array in)
is unsure
null returns rows that are null
notnull returns rows that are not null
moreq returns rows that are greater or equal to this value
gt returns rows greater than this value
lt returns rows less than this value
gteq returns rows greater than or equal to this value
lteq returns rows less than or equal to this value
finset Less than or equal to

Jako że na stronie dokumentacji API nie ma podanych tych informacji z całą pewnością sami również będziemy tutaj często zaglądać.

Przykład wykorzystania:

$server->call($sessionID, 'customer.list', array(array('email' => array('like' => 'jim%'))));