Showing posts with label Magento. Show all posts
Showing posts with label Magento. Show all posts

Wednesday, 21 May 2014

Magento | Show specific category on home page

Magento | Show specific category on home page

Many times we come with the difficulty that to set the category on the home page.
I will demonstrate you here how to set up the particular category display on the home page.
First you have to decide what category you want to show on the home page, Go to the magento admin panel and then go to Catalog -> Manage Category and then select the particular category when you select the particular category then you will find that the category id stated there.

Go to the cms -> pages by the menu bar and find for the identifier url "home"
Edit this and go to the content tab area.


{{block type="catalog/product_list" name="home.catalog.product.list" alias="products_homepage" category_id="4" template="catalog/product/list.phtml"}}

paste the above code to the area where you wish to show the categories product listing.
It will list all the catalog, search visibility scope product on the front end home page.

Magento | Resize product image

Magento | Resize product image.

Resizing of the images is the issue we are getting many times while we are optimizing and customizing the magento site. You can resize the media images by the following code.


 $src = Mage::helper('catalog/image')->init($_product, 'small_image')->resize(170, 120);


Just follow the above code to optimize and resize your images.
Where $_product: is the object of product
'small_image' :  show the size of image your required as output.
and inside the Resize() function you can insert the parameters where the first parameter is width and next one is the height of the image.
If image is not found in the product then it will show you the default placeholder image at that place.

Tuesday, 20 May 2014

Maento | Fatal error on /app/code/core/Mage/Core/Model/Resource/Resource.php on line 133 in Magento

Fatal error on /app/code/core/Mage/Core/Model/Resource/Resource.php on line 133 in Magento 

This error is coming in magento normally when you are creating any new extension or creating  updating / installing new extension then you must sure to see the config file of the magento where you can find that the version or some other sintax you were not properly written over there so I would suggest you to see there properly.

1) Point to consider
<modules>
    <company_customextension>
        <version>0.1.0</version>
    </company_customextension>
</modules>
look out the version is written properly or not.

2) Point to Consider
Be sure that the file permission of all the files on your server is properly configured. means they all are readable. If they have permission issue then this problem arises many times.

3) Points to Consider
You can go through the naming convention of the magento extension if there some of the modules have the naming convention of the upper case and lower case issue then this issue arises.

4) Points to consider
Set write permission to app/etc folder.