Wednesday, 12 September 2012

How to change the newsletter validation message in magento?

your root folder\js\prototype\validation.js

follow the above file path and find the message on line no. 507. change it according to your requirement.

Sunday, 9 September 2012

Match URL in Magento

if (strpos(Mage::helper('core/url')->getCurrentUrl(),'home') != false )
  {
 
  echo "Yes";
 
 } else {

 echo "No";

  } ?>

Friday, 7 September 2012

How do I show the quantity of a cart in my header?

<? if(Mage::getSingleton('checkout/session')->getQuote()->getItemsSummaryQty() > 0) { ?>
<?=__(Mage::getSingleton('checkout/session')->getQuote()->getItemsSummaryQty())?>
<? } else { ?>
0
<? } ?>


2nd way
********************************************

<?php if(Mage::getSingleton('checkout/session')->getQuote()->getItemsSummaryQty() > 0) { ?>

<?php  echo  'Items ('. __(Mage::getSingleton('checkout/session')->getQuote()->getItemsSummaryQty()) .')'?>

<?php } else { ?>
 Item  (0)
<?php } ?>
 

Thursday, 6 September 2012

Hpw to Define Lenth of Product Name in Magento

 <?php if(strlen($pname) > 28) {echo substr($pname,0,25);}else {echo $pname;}?>

Wednesday, 5 September 2012

Change Magento Password from Admin Panel.

System > My Account
If you would like to change your default password and user name, the security of your password has been compromised, or you would just like a new password, it can all be accomplished very simply with Magento Go.

To Change Your Password and Username:

  1. In the Admin Panel, select System > My Account.
  2. Add a new password in the New Password field. Confirm your password by entering again in Password Confirmation field. image You can also change the other fields that are available for you.

How To Customize in Email Format Filed in magnto

Open:->\app\code\core\Mage\Customer\etc\Config.xml
and You can Change your Email format.......

Tuesday, 4 September 2012

How To Remove Please Select From Custom Option Drop Down In Magento


Open: \app\code\core\Mage\Catalog\Block\Product\View\Options\Type\Select.php Alter the following lines:
            if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DROP_DOWN) {
            $select->setName('options['.$_option->getid().']')
                ->addOption('', $this->__('-- Please Select --'));
        }

To:
            if ($_option->getType() == Mage_Catalog_Model_Product_Option::OPTION_TYPE_DROP_DOWN) {
            $select->setName('options['.$_option->getid().']');
          //      ->addOption('', $this->__('-- Please Select --'))
        }
 
Summary of changes: I commented out the ->addOption line with two 
forward slashes AND - and this is important - I moved the semi-colon 
from the end of that line to the end of the previous line.  Reversing 
this change allows you to undo the changes you made.