The week on StackExchange #23 / 2016

Shortly before the 5th MageStackDay, here are some questions and answers on magento.stackexchange.com from last week that might interest you:

Magento 2

  • Without answer yet, and probably there is no solution as of Magento 2.0: Localized frontend value for getCustomAttribute() (select or multiselect attributes) – but as I commented: I’m going to continue to ask these questions when I’m hitting walls, and if it’s just to highlight, where the API is incomplete, especially when it’s about the catalog
  • Marius asked a good question on Unit testing source models. Besides my answer on this concrete case, the elaboration by Vinai on “Should I test X?” or “How should I test X?” is a valuable advice for everybody.

Magento 1

The week on StackExchange #22 / 2016

I’m back with fresh Magento content (and hit 1000 answers on magento.stackexchange.com with this unspectacular FGITW answer)

Magento 2

Magento 1

Meta Discussion

For those interested, there’s an ongoing discussion on “off topic / on topic” and how to handle closing questions on Magento.SE:

The week weeks on StackExchange #16-21 / 2016

No, I did not give up this series, but there was Developers Paradise (read my review!), then vacation, and I stepped back a bit.

Now there is enough material that it’s time for a new post:

Magento 2

Magento 1

Framework Agnostic Extensions/Plugins – Iterating Iterators

The last part (for now) of my blog series on integer-net.com about framework independent code is out: Iterating Iterators.
PHP IteratorIterator

Previous Parts

  1. Introduction: Shared Code For Magento 1 and Magento 2 Extensions
  2. Accessing Configuration Data
  3. Using Dependency Injection
  4. Building Bridges
  5. Preparing Data For Output
  6. Using Advanced Autoloading
  7. Leveraging PSR Interfaces

The week on StackExchange #15 / 2016

Here’s the next update with hopefully interesting questions ans answers on StackExchange!

Magento 2

Open Questions

Magento 1

Software Design

This week something from programmers.stackexchange.com:

Framework Agnostic Extensions/Plugins – PSR Interfaces

Part 6 of my blog series on integer-net.com about framework independent code is out: Leveraging PSR Interfaces.

Previous Parts

  1. Introduction: Shared Code For Magento 1 and Magento 2 Extensions
  2. Accessing Configuration Data
  3. Using Dependency Injection
  4. Building Bridges
  5. Preparing Data For Output
  6. Using Advanced Autoloading

Magento Extension: Estimated Delivery

SGH Estimated Delivery
Today I present you a little commercial Magento 1.x extension I have been working on with my team at SGH:

SGH_EstimatedDelivery ($79.00)

It calculates estimated delivery date and shows the customer how much time is left to get the order on this date. This information can be shown on the shopping cart and on product pages:


Estimated Delivery in Magento Cart
Continue reading “Magento Extension: Estimated Delivery”

The week on StackExchange #14 / 2016

Here’s the next update, again only with new, hopefully interesting answers on Magento StackExchange.

Magento 2

Magento 1

Filtering Magento Collections: addFilter() vs. addFieldToFilter()

There was an interesting question on StackExchange recently that did not get much attention:

Magento collection has two methods for filtering:

  1. Varien_Data_Collection_Db::addFieldToFilter
  2. Varien_Data_Collection::addFilter

Seems that both methods add where condition to Zend_Db_Select. And what advantages does addFilter bring? When should I use it instead of addFieldToFilter ?

I had to dig a bit into addFilter myself because I was only familiar with addFieldToFilter and here is what I found:

Link to the question: addFilter vs addFieldToFilter

Continue reading “Filtering Magento Collections: addFilter() vs. addFieldToFilter()”

The week on StackExchange #12 / 2016

Here’s the next update, this time only with new, hopefully interesting answers on Magento StackExchange.

Magento 2

Magento 1