Wednesday, March 18, 2015

Magento 2 playground: Rendering Page View

Hi. To be honest, I just started to investigate Magento 2 and it's structure these days.
As starting point, I decided to follow this great article by Ash Smith about "Creating Simple Magento 2 Controller Module".

And everything was just fine until the moment I needed to render view from my newly created controller like in above post.

In fact, everything still worked fine, just one thing was not right:
Read more
, , ,

Tuesday, February 3, 2015

Magento REST API- filtering results

Like in SOAP web services, Magento also offers some kind of filtering results as part of REST web services.

We have sevaral possibilities available as described on official website.

Let's show sample REST request made to Magento (without filters):
 (Skipping part how we get oAuth token and saved it in session, because it is out of scope of this article ...)
Read more
, , ,

Saturday, January 31, 2015

Custom order holded status in Magento

Ever needed to add one more hold status in Magento?

For example:

Let's say that we have some order processing logic integrated with third party shipping provider. We make API call and it fails.

If we put order on regular onHold status, it will mix up with orders that are put onHold by site administrator and we will not be able to filter them later if we want to re-try processing etc.

I suppose that most convenient way would be to use "holded" state and create additional status, for example: "order_processing_error".
Read more
, ,

Tuesday, January 6, 2015

Magento collection caching

When we talk about Magento, we should try to optimize site loading speed as much as possible.

Sometimes block caching is not enough and we should also use collection caching to achieve best results.

Here is simple way to use cached collection in Magento.
Read more
, ,