বৃহস্পতিবার, ২৩ আগস্ট, ২০১২

Add Images On Magento CMS Page

To add homepage to homepage of your site or static block, you firstly go to cms > manage pages > Home.
Then, if you want to show image in folder skin/image or folder Media, general html rules apply:
+your_images

+your_images
And when you want to show image in file .phtml from folder skin/images, you can have website directory:

+your_images

I hope you find this post helpful

Change Product Price Precision in magento

Magento by default, rounds off all values to 2 decimal points both at backend and frontend. There are several business owners, who needs it to be flexible , so they can have multiple decimal points, whatsoever.
So, we started looking for a fix to this problem. And here is how we did it :
Goto /lib/zend/Currency.php :



 
'precision' => 0

And replace it with :

'precision' => 3

That should do it.
If still it doesnt, then you may do this.
In line 62 in /lib/zend/Currency.php you can change the precision for all prices in your shop.
/app/code/core/Mage/Core/Model/Store.php
appcodecoreMageAdminhtmlBlockCatalogProductEditTabOptionsoption.php
appcodecoreMageSalesModelOrder.php
Changes currency on frontend
appcodecoreMageDirectoryModelcurrency.php
jsvarienjs.js (changed precision to 3 decimal places)
Change in admin to display 3 decimal places price in product form :
appcodecoreMageAdminhtmlBlockCatalogProductHelperFormprice.php
View Orders in Admin
appcodecoreMageAdminhtmlBlockSalesItemsAbstract.php
wherever there was precision or sprintf i changed the values to “3” i.e 3 decimal places

I hope this post help you in your magento experience

8 Most Common Problem

8 most common problems new users have with Magento store

Magento really is a great system, but sometimes it takes a bit of guessing to find a simple feature, and these are the 8 most common problems I see many new Magento user have experienced.
I setup Categories but they are not showing in the frontend.
Categories must be placed inside the Default Category.
Click on Default Category or Root Catalog (name varies depends on how you name your store in the Manage Store, then click on “Add Subcategory”. And set YES for Is Active and Is Anchor. Follow similar steps for sub-subcategories by clicking on the category you have just created.
Theorically, if you create a new category outside the Default Category you can simply drag the new category you have just created to the Root Catalog, mysteriously this does not always work and I haven’t a clue why.
Sort by Name error
This error occurs if sort by “Name” is selected in the category listing: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'name' in 'order clause'
Solution: Change the Scope from Store View to Global in the Name Attribute, under the Attribute Properties.
I setup Categories but they are not showing in the frontend.
Solution: Refresh Caches in the System/ Cache Management
I have the site setup properly, but the Rating table in the Review page does not show up.
You need to select your website or store in the Rating Visibility at Catalog/ Reviews / Ratings/ Manage Ratings
I enable the “Terms and Conditions” in the Configuration > Checkout, but it’s not showing up in the OPC page.
You need to create a “Add New Condition” page and enable it at Sales/ Terms and Conditions.
Breadcrumb is not showing up in the CMS pages.
Set YES in the Configuration > General > Web > Show breadcrumbs for CMS pages
Admin kept throwing me out and ask me to re-log in
This is because Magento sets the Cookie Lifetime at 3600 seconds. You can change the setting at Configuration >web > Session Cookie Management > Cookie Lifetime
I don’t want my customer re-direct to Checkout page when a product has added to cart. Can I change it?
Yes. Simply change “Yes” to “No” for After adding a product redirect to shopping cart at Configuration > Checkout.
If you find this article useful, please share it, dig it or tweet it.

get store details Magento

Get store data.
Mage::app()->getStore();

Store Id
Mage::app()->getStore()->getStoreId();
 
Store code
Mage::app()->getStore()->getCode();
 
Website Id
Mage::app()->getStore()->getWebsiteId();
 
Store Name
Mage::app()->getStore()->getName();
 
Is Active
Mage::app()->getStore()->getIsActive();
 
Store Home Url.
Mage::app()->getStore()->getHomeUrl();