Magento Themes and Magento Extensions

Magento – Add Custom Category Attributes

Share
Posted on April 23rd, 2013 | Posted by admin

Magento – Add Custom Category Attributes

A client wanted to add a description to each of his product categories, such that the first built-in description would be above the product listing, and the second description would be below the product listing.  Rather than have them create static blocks for every category, it was obvious that I’d have to create a new category attribute.

Fortunately, I stumbled upon one possible solution.  The method doesn’t involve creating a full-blown module, rather, just a few database modifications using phpMyAdmin.

Summarized, the process comes down to:

  1. Create a new row in the eav_attribute table, one that mimics a category’s meta-description attribute with everything being the same except for a unique identifier and a label.
  2. Create a new row in the eav_entity_attribute table, to provide a sort order for your newly created attribute, following in the format footsteps of the existing rows.

ADD INCREASE AND DECREASE QUANTITY BUTTONS TO ITEMS IN MAGENTO CART

Share
Posted on April 22nd, 2013 | Posted by admin

When a customer views their cart, each product that they have added will be listed. By default, Magento provides info for each product, e.g. name, image, quantity, price. Customers can change the quantity in the text box and submit the “Update Shopping Cart” button. That is a lot of effort for the user, we want to make this process as smooth as possible.

We can make it easier by adding +1 and -1 links to change the quantity of each item. We will do this with some very simple JavaScript which takes the current value and adjusts it. Once this has been done, we submit the form through JavaScript to reduce customer effort.

In my implementation I have used images for the links, but obviously you could use text, e.g (↑ ↓). The following two code snippets should surround the input quantity box on the shopping cart/basket page:

Using Mage Run tool to speed up development

Share
Posted on April 20th, 2013 | Posted by admin

When starting Magento development , first thing you find out that in order to see the changes you have to clear the cache. There is also an option to disable the cache completely, but performance wise – it’s not a very smart move. As your experience on the system grows you are getting to know which exact cache to clear to see the changes, be it config, layout, FPC cache or any other. Nevertheless, these operations are pretty cumbersome as admin session times out from time to time. You may also know that enabling template hints is not a quick operation either.

Let me introduce a great tool which will simplify your life as a Magento developer and make it enjoyable:Mage Run, which is being developed by Christian Münch. Installation of the tool is fairly easy. This tool has loads of useful commands and when you get used to it you will not believe you’ve been doing all the actions from your Magento backend. There is a list of all available commands (which can be also displayed from tool itself by using command n98-magerun.phar list), but here we want to describe a few favourite combos from our own work flow.

Shopatron & Magento integration

Share
Posted on April 19th, 2013 | Posted by admin

At the moment I’m in in the middle of integrating a Magento installation with the Shopatron fulfilment and ordering system. Shopatron – so far I’ve decided that it sounds either like;

  • Megatron’s high maintenance Transformer mistress (who he wines and dines whilst poor old Mumatron is at home minding the Kidatrons).
  • Magento vs Shopatron – that was Wrestlemania 7, right?
  • Some kind of unscary android baddie from a cheap eighties Sci-Fi show, that maybe looks a bit like Metal Mickey or the aliens from the Smash adverts.

Anyway, it’s quite an interesting concept – basically it’s a system which allows manufacturers to start selling online without cannibalising the sales in their distribution chain, pissing off off the retailer clients who they are wholesaling to.

Magento front-end development best practices

Share
Posted on April 18th, 2013 | Posted by admin

So here are 10 best practices for Magento front-end development.

1. First understand Magento frontend structure and follow conventions because magento is little strict about conventions, so you should know; how Magento is comprised of modules, know how layout XML creates page layouts and know how html blocks get loaded as defined by the page layouts. It is good to learn Magento structure first and then start learning how the .phtml files work. Dip diving into the html/php code immediately is possible but harder and more painful and prone to errors. If you have lesser time to finish any task then you may end up with frustration. Magento back bone is very strong (is a well-architected program), following the conventions used by the ecommerce framework is necessary for the best-maintainable deployment.

Page 2 of 6«12345»...Last »