Tagged: collection

magento-get-order-collection-by-payment-logo 2

Magento – get order collection by payment

If you are working on a Magento module to compute order data, you may have the task to get order collection by payment. This is sometimes needed to separate orders done by pre payment...

magento 2 compound primary keys 0

Magento 2 compound primary keys

I recently tried to use compound primary keys in Magento 2. I got different problems with this and ended up with a solution, that is not optimal. In case of Magento, the only possible...

magento 2 get customer collection 0

Magento 2 – get customer collection

In this tutorial I show you how to get customer collection. If you want to programmatically change or get customers, this will be the obvious way to get customer objects. With a collection you...

magento 2 debug collection filter 1

Magento 2 – debug collection filter

Sometimes it is quite complicated to debug collection filters. You may have the correct code, but it doesn’t return data. Hours later you find out, that there are no data available for this filter....

magento 1 set order of collection 0

Magento 1 – set order of collection

In this tutorial I show you how to set order of collection. It is sometimes quite frustrating to set order, because there are two possible methods. Depending on your collection and column you want...

magento 2 export categories 3

Magento 2 – export categories

Magento 2 has no export categories option in backend. It is strange, that no one has implemented this, but as developer we can do it by our own. I show you a simple script...

magento 1 collection iteration optimization 0

Magento 1 – collection iteration optimization

In this tutorial I show you how to optimize collection iteration. If you use large collections, you may have discovered performance problems. Especially for low cost hosting systems, there may be drawbacks if you...

magento 2 delete all products 0

Magento 2 delete all products

In this tutorial I show you how to delete all products under Magento 2. In my previous article I showed how to get products by id. I also introduced you to factory pattern and...