Tagged: collection

magento 2 customize price displayment 0

Magento 2 get product collection

In this tutorial I show you how to get product collection for your Magento 2 shop. A product collection gets you all needed product information and can be filtered by all product attributes. Magento...

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 1

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 allowed memory size of exhausted error 0

Magento allowed memory size of exhausted error

As Magento developer you may face with allowed memory size of exhausted error quite often. Magento is a system that may need a lot of memory. Sometimes you will need some hundred mega- or...

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 6

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...