Skip to main content

Posts

Showing posts with the label Magento1

Magento 1: get all categories with product count

 <?php $cat_id = Mage::getModel('catalog/layer')->getCurrentCategory()->getId(); ?>                     <?php $category = Mage::getModel('catalog/category')->load($cat_id); ?>                     <?php //echo $category->getName(); ?>                                         <?php $_helper = Mage::helper('catalog/category') ?>                     <?php $_categories = $_helper->getStoreCategories() ?>                     <?php if (count($_categories) > 0): ?>      ...

Magento 1.9: Login / Registration form not working

I know that you already inserted the formkey, but I had the same problem and I discovered that I was using the formkey in the wrong way. 1 - Make sure that you use this code to insert the formkey: <? php echo $this -> getBlockHtml ( 'formkey' ); ?>   2 - The code should be right after the line: <form action=" <? php echo $this -> getPostActionUrl () ?> " method="post" id="login-form"> 3 - Make the change in the right files: app / design / frontend / base / default / template / customer / form / login . phtml app / design / frontend / base / default / template / customer / form / register . phtml   or, if you are using a custom theme: app / design / frontend / COMPANY / THEME / template / customer / form / login . phtml app / design / frontend / COMPANY / THEME / template / customer / form / register . phtml   Good luck :)