Products

Prepared filter for Magento admin grids

Maybe you can ask yourself why do I need prepared data for filters in my collections – in Magento admin grids. Well, I can perhaps create new grid and action for some custom functionality and show such grid and then additionally do (filter by) whatever I need.

But notice that if you create such collection with some addFieldToFilter() method you always use specified filter for that collection.
If you are interested how to use only one collection for showing different results for that collection (prepared filter), keep reading.

Read more

Adding product image lightbox effect using jQuery plugin (a better way)

This is not a copy-paste kind of tutorial. It is made for beginners so please try to understand what is going on before you start copying the code. If you are an experienced developer you can skip to the end and inspect the final code.

Nowadays every client wants some kind of lightbox effect for product images on the product page. Although there are a lot of ways to do it, I often stumble upon Magento stores that have a buggy and sometimes useless implementation of this feature. In my opinion, it should be simple, fast, easy to use and above all intuitive.

Read more

Listing out Previous/Next products in Magento (Inchoo_Prevnext extension)

There are several Previous/Next extensions out there for Magento by now. Honestly I do not know how any of them works as I never used any :). I decided to code my own since I wanted to tackle the challenge of coding the previous/next that works alongside the layered navigation filter and sort order in the product listing grid.

Read more

Display HTML code (block) of product options in Magento

This simple helper will help you to display html code of your product options. It works with simple, virtual and configurable products. I believe you can use the same approach for other product types as well.

Getting HTML code for options of configurable products its little different from simple and virtual (well they are more or less same).

Update: for all types in configurable product.

Read more

Simple Helper class for Previous/Next Products in Magento

One of the common requirements in Magento is to have prev/next product on Product Information page. Development logic there is simple, fetch current product id and take the one before and after that one and now you have previous and next products 🙂 Remember that this will work per category only, since you will get list of products in current category.

Read more

View product in frontend from Magento admin

When you are editing some product in Magento admin and want to check it out in frontend of your Magento project, how do you find this particular product? Do you search for it, navigate to it using product url key or just browse to it? Well, however you do it, I’m going to give you the easiest way to get to your desired product in the frontend – view product link.

Read more

How to translate product names in Magento through .csv files

Let’s add to cart one item from our Magento community edition. If you have MCE with sample data you can visit something like this: http://loc.magento.com/sony-vaio-vgn-txn27n-b-11-1-notebook-pc.html?___store=german&___from_store=default
Add item to your cart and you’ll see success message “Sony VAIO VGN-TXN27N/B 11.1″ Notebook PC was added to your shopping cart.”. Now if we add in our .csv file for de_DE translations something like this:

"%s was added to your shopping cart.","%s wurde zum Warenkorb hinzugefügt."
"Sony VAIO VGN-TXN27N/B 11.1" Notebook PC","Sony Deutsch VAIO VGN-TXN27N/B"

If you have already setup all required things for “German” translations, then try again buy same product and you will not be able to see our translated “success message”. It’s not only because of “"” in product name.

Read more