Useful Magento functions
Get the current store language code
$locale = Mage::app()->getLocale()->getLocaleCode();
Get user id of the current logged in user
Set the value ‘myValue’ to the session variable myVariable
If you are working with Magento for the first time you probably found yourself asking this question: Why are my products not showing up on homepage/category page?
So I made a list of reasons or things you should consider:
1. The most simple reason – your product’s status is disabled – set status to Enabled (General tab from your product details page)
2. Visibility - your product is not set as visible in the category page set Visibility to Category or Category, Search
3. Inventory problems
- your product is not on stock go to Inventory tab from your product details page and check if Stock Availability is set On Stock
- quantity – check if Qty from Inventory tab is greater then 0
4. Disable your cache or if it is you want it enabled refresh it from System > Cache Management
5. Reindex data from System > Index Management – Reindex Data
For some reason the Magento checkout sets the “Ship to different address” as the default option even though far more people actually want items delivered to their billing address. This quick tutorial explains how to change this default.
The first stage in making this change is to override the default Magento class that handles the checkout. You do his by simply copying the class file from the core folder into the local code folder.
All you then need to do is edit your new version of the file and change the function that sets the default. Change the code below…