Magento themes and extensions

How to make Magento elements show/hide on other elements’ value

Share
Posted on January 18th, 2013 | Posted by admin
How to make Magento elements show/hide on other elements’ value
Today I noticed, when working on an admin form, that a class exists for automatically hiding elements when the value of fields change.

Useful Magento functions

Share
Posted on January 17th, 2013 | Posted by admin

Useful Magento functions

Get the current store language code

$locale = Mage::app()->getLocale()->getLocaleCode();

Get user id of the current logged in user

Mage::getSingleton('customer/session')->getCustomer()->getEntityId();

Set the value ‘myValue’ to the session variable myVariable

Magento Solutions Products not showing up

Share
Posted on January 15th, 2013 | Posted by admin

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

can’t login to magento admin panel on local server

Share
Posted on January 14th, 2013 | Posted by admin
can’t login to magento admin panel on local server
Solution.
Locate Below address
C:\xampp\htdocs\myhome\app\code\core\Mage\Core\Model\Session\Abstract\varien.php
Open varien.php Comment 3 lines shown in below

// session cookie params
$cookieParams = array(
‘lifetime’ => $cookie->getLifetime(),
‘path’     => $cookie->getPath(),
‘domain’   => $cookie->getConfigDomain(),
‘secure’   => $cookie->isSecure(),
‘httponly’ => $cookie->getHttponly()
);

Set “ship to this Address” the default in your Magento checkout

Share
Posted on January 13th, 2013 | Posted by admin

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.

1 cp app/code/core/Mage/Checkout/Block/Onepage/Billing.php app/code/core/Mage/Checkout/Onepage

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…