Products

You wish to customize your products either on frontend or backend. Here is some help.


Programmatically create upsell, cross sell and related products in Magento

Programmatically create upsell, cross sell and related products in Magento

This article will explain how to add upsell, cross sell and related products programmatically to Magento. One of practical examples would be data migration from some other ecommerce system to Magento. You can read a nice article on how to add upsell, cross sell and related products from administration here. It explains what all these product relations mean and where are they used on the site.

Read more

Shell script for converting configurable to grouped products

Shell script for converting configurable to grouped products

A couple of weeks ago my colleague Attila Fabrik and I had a really complex but interesting task. We had to develop a shell script that converts configurable products to grouped products. Our Magento catalog was special. It contained mostly configurable products and it seemed that using configurable products was a good idea 4 years ago when the shop was set up but the current business conditions were pushing us to look for other, more flexible options.

Read more

Sort products by sold quantity in Magento

Sort products by sold quantity in Magento

Magento by default comes with a few basic product sorting options such as sorting by product position, name or price. In this article you’ll learn how to sort products by how many times they have been sold.

Read more

Get rewritten product url in a different store

Get rewritten product url in a different store

It was pointed out to me in one of the preceding articles that getting a product’s URL in a different store can get pretty complicated if the URL you want to get is rewritten. I decided to come up with a solution to that problem, as it could be useful in the future.

I came up with a method that returns a rewritten part (i.e. after rewrite) of a product’s URL. You’ll need to add base URL of a store to this return value to get a full URL (as shown on languages.phtml example).

Read more

Display product’s rating beyond the review page

Display product’s rating beyond the review page

Reviews are another one of numerous excellent features in Magento. Usage of reviews can increase visitors’ trust in your brand, which, in return boosts your sales by a significant amount.

Sometimes there is a need for showing star ratings outside the products’ review page. That’s what I’ll be addressing with this article.

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

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

Prepared filter for Magento admin grids

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)

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

How to create a new product type in Magento

How to create a new product type in Magento

Magento comes packed with several product types: simple, grouped, configurable, virtual, bundle, downloadable. Sometimes clients request can reach beyond any of these built in product types functionality. In such cases, usual way of handling things is throwing some new attributes and hooking into some events from which you can handle and “re-route” certain logic.

Read more

Programatically add bundle product to cart in Magento

Programatically add bundle product to cart in Magento

Sometimes, clients requirements exceed the defaults built into the Magento. Recently we came across a task that among other things required manipulation of bundle products in Magento. In order to help my coworker Tomas I wrote this little code snippet that programatically adds bundle product to cart.

Read more

Magento: How to import additional images for products

Magento: How to import additional images for products

We did a migration from CRE LOADED (osCommerce clone) to Magento and we had to import all products with additional images. Every products had from 4 to 6 images which was a problem because Magento doesn’t have built-in ability to upload multiple images for products.

Read more

Updating options of configurable product that is already in the cart

Updating options of configurable product that is already in the cart

Let’s say we have configurable Magento product in shopping cart and we want to update its
options without deleting product from cart and adding it again.

That’s quite easy to achieve with following steps, however I can’t write complete tutorial here so
you should be a little more familiar with Magento in order to make it work.

Read more

File upload in Magento

File upload in Magento

Whan of the most enticipated and needed things in Magento is File upload Custom Option. As discussed last year at Magento Forum, it is not completed nor tested.

Now, Magento already have frontend and admin part of file upload option implemented in themes. Since backend part is still missing, understand that this still doesn’t work, however, if you’re interested how it looks, read on ..

Read more

Simple product with custom options in grouped product in Magento

Simple product with custom options in grouped product in Magento

Does the title sound complicated? Grouped Products display several products on one page.  For example – if you’re selling chef’s knives and you have the same knife in four sizes, you can make a grouped product to display all four sizes.  Customers can select the size(s) they want and add to cart from this page.  Another example would be a themed bedroom set – you can create a grouped product and sell the sheets, comforter, and pillow cases all from the same page.

Read more