Quite often when working with collections in Magento need to filter collection by product attributes, here comes addAttributeToFilter method. This method works on EAV collections in Magento. For example it could be product collection, customer collections and category collections. The main aim of this method is to set WHERE condition in SQL query. Lest look at example listed below.
Magento 1.9.x. attribute filter conditionals
Feb 10, 2017 9:26:00 AM
0 comments
Equal comparison in email template
Oct 21, 2016 7:50:00 PM
0 comments
Everyone knows that Magento supports comparison in email templates, but if you need to use an equal comparison to check if some variable f.e. (in order template) “shipping method” is equal to “some_cool_shipping_method” then Magento doesn’t support this construction. And what we can do we this?