2/14/2012

SET DEFAULT STORE VIEW FOR CATEGORY AND PRODUCT LIST IN ADMIN MAGENTO


adminhtml/default/default/template/store/switcher.phtml
CHANGE  THE FOLLOWING LINE OF  CODE
<option value="<?php echo $store->getId() ?>"<?php if($this->getStoreId() == $store->getId()): ?> selected="selected"<?php endif; ?>>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $store->getName() ?></option>


TO



<option value="<?php echo $store->getId() ?>"<?php if($this->getStoreId() == $store->getId()): ?> selected="selected"<?php elseif($store->getId()==4):echo "selected='selected'"; endif; ?>>&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $store->getName() ?></option>

PROTOTYPE /JQUERY CONFLICT IN MAGENTO.

  To rectify the error just open the jquery’s js file ,scroll down to bottom and write
  jQuery.noConflict();
 at the end of file.

REMOVE WARNING : event.layerX and event.layerY are broken and deprecated in WebKit. They will be removed from the engine in the near future.


Use the following code:
jQuery(function(){
    // remove layerX and layerY
    var all = jQuery.event.props,
        len = all.length,
        res = [];
    while (len--) {
      var el = all[len];
      if (el != 'layerX' && el != 'layerY') res.push(el);
    }
    jQuery.event.props = res;
}());

Using toplinks in footer or in any phtml file

 <?=$this->getLayout()->getBlock('top.links')->toHtml()?>

Removing cart from magento home page

CHANGE LANGUAGE DROPDOWN INTO LINKS MAGENTO

GOTO: /app/design/frontend/*/template/page/switch   
There You will find languages.phtml


Replace the code with:


<?php if(count($this->getStores())>1): ?>
<div class="form-language cls-lang">
  <ul class='cls-ul-lang'>
<?php foreach ($this->getStores() as $_lang): ?>
        <?php $_selected = ($_lang->getId() == $this->getCurrentStoreId()) ? ' selected="selected"' : '' ?>
       <li>
  <a href="<?php echo $_lang->getCurrentUrl() ?>"><img src="<?php echo $this->getSkinUrl('images/flags/' . $this->htmlEscape($_lang->getCode()) . '.jpg') ?>" alt="<?php echo $this->htmlEscape($_lang->getName()) ?>"/></a>
  </li>
    <?php endforeach; ?>
    </ul>
</div>
<?php endif; ?>




Now in the frontend you will see links instead of dropdown.
upload images for the links in the path by inspecting those links.


create flags folder under
/skin/frontend/base/default/images/
and upload images there




12/12/2011

GET MINIMUM ORDER AMOUNT MAGENTO

To get minimum order amount set in backend use the following line:

$isMinAmtActive= Mage::getStoreConfig('sales/minimum_order/active', Mage::app()->getStore()->getId());