Tuesday 5 May 2015

Yii - Features of the advanced template

  1. Pre-defined schema for the user table
  2. User login and registration forms
  3. Forgot password functionality
  4. Separate frontend and backend domains
  5. Automatic code generation for models, controllers, and views
  6. Built-in integration with Twitter Bootstrap and mobile first design
  7. Robust widgets and helpers for data presentation

Monday 6 April 2015

How to remove decimal values from price?

 For this, you need to edit code/core/Mage/Directory/Model/Currency.php

    Open  code/core/Mage/Directory/Model/Currency.php
 
   Find the following :-

 public function format($price, $options=array(), $includeContainer = true, $addBrackets = false)
    {
        return $this->formatPrecision($price, 2, $options, $includeContainer, $addBrackets);
    }


on line no 194 change this code to:-

 public function format($price, $options=array(), $includeContainer = true, $addBrackets = false)
    {
        return $this->formatPrecision($price, 0, $options, $includeContainer, $addBrackets);
    }

0 - Denotes the precision point for price..

But wait, you are still not done. The most important thing is still left.
- Clear the Cache.
- Go to System –> Cache Management
- Refreh Cache.
- If you have not enabled the Cache OR if it didn’t work even after refreshing the cache, then
- delete the cache folder present inside var (var/cache)





Friday 6 March 2015

Set Default Quantity to 1 in Magento

By default, the quantity box on the product page is always blank and that is not very user friendly. It would be great if the box would be set to "1" by default .

Now this can be done without any programming – only through configuration changes in the backend as follows:

    Go to Admin Panel -> System -> Configuration -> Inventory-> Product Stock Options from the Menu
    Click on Add Minimum Qty button (next to Minimum Qty Allowed in Shopping Cart option)
    Choose Customer Group: ALL GROUPS as you want this to be applied to all users
    Enter 1 for Minimum Qty
    Save Config

Display banners for category page

Step 1: Create static block.
Login to the magento admin panel and click on “CMS > Static blocks” and create new static block.
Just remember the name of static block here ;).

Step 2: Assign static block to the category.
Once the step 1 is complete go to the “Catalog > Manage Categories”. Select/ Click the category from left menu. It will reload the right hand panel data. Select “Display Settings” tab from right hand panel.
Now change
I) “Display Mode” drop down value “product only” to “static block and prodcut”.
II) Now select the cms block from drop down list of “CMS Block” field and click on save category button.

Now go to front-end and select the category page for whom you have just set the cms block. It will show you banner at the top of product list.