Magento Themes and Magento Extensions

Magento – Change getProductDefaultQty from 0 to 1

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

In magento product pages at add to cart input field, it shows either 0 or blank. But QA team wanted it to show 1 as default.

1 <input type="text" name="qty" id="qty" maxlength="12" value="<?php echo $this->getProductDefaultQty() * 1 ?>" title="<?php echo $this->__('Qty') ?>"class="input-text qty" />

So this is how it was resolved.

Magento admin > System > Catalog > Inventory > Product Stock Options

Find “Minimum Qty Allowed in Shipping Cart‘ and click ‘Add Minimum Qty‘ and add a minimum quantity you want to show as default to the appropriate customer group(s) and then save it. It was ’1′ in my case and assigned to ‘All Groups‘ Customer Group.

change magento istallation directory or address tutorial

Share
Posted on May 13th, 2013 | Posted by admin

If you have installed magento in a wrong directory or You’ve had magento installed on a temporry directory or een you want to change your directory or if you want to change mageno installation domain to alternative one you can follow the following instructions:
let say your current installation URL is:

domain.com/shop

and you want to alter it to

domain.com

if you have cpanel and the standard directory position is

/home/username/public_html/

and you current magento installation directory must be in here

Change the Length of Order Number in Magento

Share
Posted on December 6th, 2012 | Posted by admin

Normally magento generates 9 digits order number by default. If you need to reduce it, use following method.   Go to your magento database and make changes in  ‘eav_entity_type’ and ‘eav_entity_store’  tables.

As an example if you want to use 3 digits number and starting number is 110, then you have to put 2 as  ‘increment_pad_length’.

Please run following two queries:

  1. UPDATE `eav_entity_type` SET `increment_pad_length` = 2 WHERE `entity_type_code` = ‘order’ LIMIT 1;
  2. UPDATE `eav_entity_store` SET `increment_last_id` = ’109′ WHERE `entity_store_id` = 1 LIMIT 1;