Add “View” Product Page Link in Backend at Catalog => Manage Products List

The current version of Magento is not editor-friendly in many regards and one of them is that the products list at Catalog => Manage Products doesn’t have any “View” link at the end of each product row for the catalog editor (human) to easily click on to open up the frontend product page to see what the users are actually seeing.

Rather, it has only the “Edit” link to open up the editor to edit the product. If one has to view a frontend product page from the backend, he or she’d have to copy the SKU and then search it in frontend to arrive at the product page which is very unhandy and annoying. Sometimes the results don’t even turn out any entries at all.

WordPress and lots of other famous CMS have this feature and I’m totally at a loss why Magento doesn’t have this ready for the convenience of the backend editors.

So how to add a “View” product link beside the “Edit” link for each product record?

At the end of article, you will have something similar to this:

Add view product links to the end of each product row in Magento

That is, “View” product links on each product row that you can click to open up the frontend product page. Screenshot taken from my wedding dresses store.

To do this, find this file:

/app/code/core/Mage/Adminhtml/Block/Catalog/Product/Grid.php

And copy it to:

/app/code/local/Mage/Adminhtml/Block/Catalog/Product/Grid.php

Open and edit the copied file /app/code/local/Mage/Adminhtml/Block/Catalog/Product/Grid.php, find a block like this:

$this->addColumn('action',
            array(
                'header'    => Mage::helper('catalog')->__('Action'),
                'width'     => '50px',
                'type'      => 'action',
                'getter'     => 'getId',
                'actions'   => array(
                    array(
                        'caption' => Mage::helper('catalog')->__('Edit'),
                        'url'     => array(
                            'base'=>'*/*/edit',
                            'params'=>array('store'=>$this->getRequest()->getParam('store'))
                        ),
                        'field'   => 'id'
                    )
                ),
                'filter'    => false,
                'sortable'  => false,
                'index'     => 'stores',
        ));

Which is the code for the “action” column of the products list. In the same manner, add an extra column named “view” by adding the code below immediately after “action“:

$this->addColumn('view',
            array(
                'header'    => Mage::helper('catalog')->__('View'),
                'width'     => '40px',
                'type'      => 'action',
                'getter'     => 'getId',
                'actions'   => array(
                    array(
                        'caption' => Mage::helper('catalog')->__('View'),
                        'url'     => array(
                            'base'=>'catalog/product/view',
                            'params'=>array('store'=>$this->getRequest()->getParam('store'))
                        ),
                        'field'   => 'id'
                    )
                ),
                'filter'    => false,
                'sortable'  => false,
                'index'     => 'stores',
        ));

That’s it. Now refresh your Manage Products page and you should see a “View” link at the end of each product row. Clicking them would lead you to the frontend page of that particular product. I’m not sure how to force it to open in new window or new tab but I guess you can always do this yourself by holding Ctrl key in Firefox and Chrome.

Bolded part is the key difference of the “view” block from the “action” block.

Change Default “Add to Cart” Quantity from 0 to 1 in Magento

You may have noticed that the default “Quantity” or “Qty” to “Add to Cart” on product pages is 0 or zero. While the visitor can simply click “Add to Cart” to add 1 item of the product into the shopping cart, it would still create confusion. Some customers might think they had to manually update the quantity from 0 to 1 for the “Add to Cart” button to work (which is totally unnecessary) and be slightly annoyed because they *had to* do so. This is definitely not what we intended.

So how to change the default quantity on product pages to 1?

Many of the online answers involve editing one of the template files. It is not so any more with the newest versions of Magento. Tested on 1.6.1 and 1.6.2, you can simply change the default quantity by the following path in administrator panel:

System > Configuration > Inventory > Product Stock OptionsMinimum Qty Allowed in Shopping Cart > Click “Add Minimum Qty” > Select “ALL GROUPS” and enter “1” in “Minimum Qty” > Click “Save Config“.

change magento default quantity

That’s it. You may probably need to refresh cache. And you would now see 1 as the default quantity on all your product pages. This is the update-proof solution.

Make Magento Products Always In-Stock and Never Out-of-stock

Most of the online merchants don’t manage inventory themselves and when the order comes in, they simply tap the factory or wholesaler to relay the products to the customers. Businesses in this manner, don’t quite need inventory management.

And they need to make all products in Magento to be permanently in-stock forever and NEVER out-of-stock. This way, they don’t have to: 1) select the In-stock status and enter a positive in-stock quantity every time creating the product, 2) nor modify the themes to not display Out-of-stock messages.

All right, here’s how to do it.

Log in the administrator control panel of Magento. Go to System -> Configuration -> Inventory -> Product Stock Options -> Select “Manage Stock” to “No“.

Simple, eh?

(ver 1.6.1.0)