Magento 1


Using Redis cache backend and session storage in Magento

Using Redis cache backend and session storage in Magento

Combined with the power of Zend Framework, Magento currently supports many cache backends with file system, APC and Memcached being the most widely used. Every supported cache backend brings it’s own set of upsides and downsides, but since there’s a lot to choose from, one could easily assume that as far as cache backends are concerned, Magento is very well covered. To some degree this might be true, but when you seriously up the number of requests, none of the cache backends scale well. Besides poor scaling, some of the cache backend implementations also suffer from serious limitations like not having support for grouping of related cache entries, a.k.a. tagging. With this in mind, and in order to provide support for stable and scalable cache backend, latest versions of Magento are turning to Redis key-value store. In this article I’ll do my best to describe process of implementing Redis as cache and session backend with recent versions of Magento Community and Enterprise Edition.

Read more

Adding links to the Top menu in Magento

Menu

One of the things that may sound easy to set are the top menu items, or the main menu items if you prefer. But we’re talking about Magento here and it isn’t as easy as it sounds. A specific way of creating menu items out of categories makes this fairly easy task a nightmare. Fortunately for us, Magento has a secret up its sleeve.

Read more

Programmatically add a custom block in Magento Admin

Programmatically add a custom block in Magento Admin

Howdy! Recently I was in doubt about how to add custom Magento Block for my client’s requirements. One approach was to deal with it through .xml file, but when I was thinking about it I asked myself: “ Why add another .xml and load it?” And at this point, I decided to go with programmatic method.

Read more

Install and Start Apache Solr in 5 minutes

Install and Start Apache Solr in 5 minutes

Search has become a default way for users to find products on websites. Despite main navigation and other site navigation tools, more and more customers are using on – site search to find what they want. Speaking about default Magento search I don’t have much to say, I can only give you advice to use some custom solution to get the most of it for your UX.

Read more

Magento functional testing with casper.js

Magento functional testing with casper.js

Testing can be boring and time consuming task. So why don’t we use some tools and make our lives easier? In Magento there are numerous “boring” tasks that need to be done after the first install and then again when you test a new functionality. For example, create a test account, add product to cart, go trough checkout process, add product to wishlist, compare etc.

Read more

Tracking Magento “add product to cart” action for analytic software purpose

Tracking Magento “add product to cart” action for analytic software purpose

Recently I have been working on a Magento extension for a 3rd party customer analytics and targeting web service, think Google Analytics alternative. One of the eCommerce tracking features that needed to be implemented was the “add product to cart” action. Since these kind of tracking services use JavaScript to trigger their tracking code, it’s up to us to see where and when will be embed certain tracking JavaScript in Magento. What’s interesting about “add product to cart” action is that it’s not your usual web page on which you land and are then in possibility to execute certain JavaScript.

Read more

Magento – Install, install upgrade, data and data upgrade scripts

Magento – Install, install upgrade, data and data upgrade scripts

If you are in the business of creating your own custom extension (module) for magento, then chances are that at some point you will need your extension to be able to persist data to database, this is where the installation scripts come in place. Later on, when you upgrade your extension and decide to add few new tables to database or few new columns to database table that was initially created by the original installation extension you will need to look for upgrade script. Finally, if you want to set some initial default values in the database tables of your extension you will need to look for data scripts.

Read more

PHP shell scripts for Magento

PHP shell scripts for Magento

There are times when it’s necessary to access Magento system from outside Magento. A way to do this is using PHP shell script that bootstraps Magento. An average PHP developer would just go to Magento root directory to create Magento bootstrap file with it’s own code at the bottom. As you’ve probably guessed, there are two ways to bootstrap Magento, regular way and Magento way. In this article I’ll provide an overview of Magento way of creating PHP shell scripts.

Read more

How to add custom product relations in Magento

How to add custom product relations in Magento

Currently there are three types of product relations in Magento: Up-sells, Related Products, and Cross-sell Products. Recently while discussing client’s requirements, we’ve come to conclusion it would serve our purpose best to link products in the same way Magento does, and then use our own relations independently of Magento’s built in product relations. In this article I’ll show you how to add custom product relations as addition to existing Magento product relations.

Read more

Overriding Magento blocks, models, helpers and controllers

Overriding Magento blocks, models, helpers and controllers

There is no project that uses framework as is. Every now and then there is a need to change something, to add something new or to override something already written. Due to many reasons it’s a bad habit and bad programming if core files are modified and it’s not recommended at all. Therefore Magento brought in an excellent way how to override/overwrite those files.

Read more

Product Stock Alerts (not) working

Product Stock Alerts (not) working

Recently one of our clients had contacted us and said that ProductAlert functionality doesn’t work any more. After I investigated the situation I saw that last email regarding to Stock Alerts was sent several months ago. In the meantime we’ve upgraded the site to Magento EE and at first I thought that maybe during the upgrade something went wrong. Other thought was that maybe client has modified Transactional Email Template… After reviewing log files I couldn’t find anything related to those emails. System did send other emails though.

During the investigation I saw on forums that other developers have similar issue that weren’t resolved yet. After tracing and looking what might have gone wrong we’ve found… 

Read more

Magento Maximum Allowed Order Amount

Magento Maximum Allowed Order Amount

Recently I have been working on a project that had its own set of small fraud prevention features. One such feature was maximum allowed order amount. While it may sound strange at first; why would someone want to limit the maximum amount of order?! Given the nature of the product that shop was selling (cannot disclose that information) that feature request seemed pretty reasonable.

Read more

Recap of Magento Imagine 2013 – The Art of Commerce

Recap of Magento Imagine 2013 – The Art of Commerce

3rd annual Magento Imagine eCommerce conference took place in early April and saw over 1500 Magento merchants, solution and industry partners and individual developers from the total of 44 countries meet for the biggest single Magento event ever. We were there as well, so check out our impressions and some interesting notes we made.

Read more

One of the first Magento Certified Front End Developers in the World

One of the first Magento Certified Front End Developers in the World

We received a news few days ago that Vanja Devcic and Hrvoje Jurisic achieved the passing score and therefore have achieved the status of Magento Certified Front End Developers. It was a great news for us since they are one of the first in the world.

We were invited late January to participate in a certification beta testing session for Magento Front End Developers. We couldn’t just take the voucher to some testing centre as we normally do. Instead, we needed to go to a place called Fast Lane Institute for Knowledge Transfer GmbH – Munich.

Read more

Magento Adminhtml Javascript Popup Dialog

Magento Adminhtml Javascript Popup Dialog

Recently,I needed to add functionality to open javascript Popup dialog inside Magento Adminhtml area to perform some operations and then to handle onClose action to fill the form that called popup.
After some researching on most easier way to do that, I finally found the solution that suited my needs.

Read more

Consuming Magento REST service using Zend_OAuth_Consumer

Consuming Magento REST service using Zend_OAuth_Consumer

Ok folks. Until today, trying to cover this area completely, I wrote two articles about Magento oAuth and REST services:

This Magento REST and oAuth functionality and ways on which it could be used are so wide that I think that even in this three articles will not cover everything that I wanna share with you, so stay tuned for next articles about this topic in near future 🙂

Read more

How to configure Magento REST and oAuth settings

How to configure Magento REST and oAuth settings © winchild@sxc.hu

(This article is for Magento 1.7.0 and greater . Older Magento versions does not have implemented these features.)

In my last article, I wrote about the REST and oAuth to explain the terms that are used in Magento admin area for Magento REST configuration.
This article will show the steps necessary in order to be able to consume REST services provided by Magento:

Read more

Introduction to Magento REST and oAuth

Introduction to Magento REST and oAuth © CLUC@sxc.hu

For those that don’t know, Magento added REST server functionality since version 1.7.0 < .
Before that, Magento had SOAP and XML-RPC server implementations which are also implemented in newest Magento versions.
I have to admit that even I had a lot of experience with Magento SOAP web services, it took a little bit time even for experienced developer like me, to figure out how Magento REST is implemented and how to take advantage of it. The biggest reason for that is the lack of official documentation.

Read more

Ultimate Magento Robots.txt File Examples

Ultimate Magento Robots.txt File Examples

Extremely common question when it comes to eCommerce – and for that matter Magento SEO – is how a robots.txt file should look and what should be in it. For the purpose of this article, I decided to take all of our knowledge and experience, some sample robots.txt files from our clients sites and some examples from other industry leading Magento studios to try and figure out an ultimate Magento robots.txt file.

Read more

How to put Magento in maintenance mode with IP filters (the easy way)?

How to put Magento in maintenance mode with IP filters © eqphotolog@sxc.hu

This is probably the most useful quick tip I can think of that I use all the time. Putting Magento in maintenance mode is an essential part of every site launch and it is used in lots of other situations. Although there are many different ways to do this I found that using a few simple lines of code in the root htaccess file is, by far, the easiest solution I could think of. On top of that, this solution enables you to put all the files needed for the maintenance page (html, images, etc.) into one folder. One more advantage of this method is that if you forget to add your IP address to the filter (whitelist) you can do that at any time through FTP so you will not be locked out of your own site 😉

Read more