Search This Blog

Wednesday, 9 November 2011

How to add "date" type custom option for products and make it work?

 Many Magento users, like my company, have similar requirements to let customers choose date through pop-up calendar in the product view page. But Magento merely offer 2 groups of input type, “Text” and “Select”, in Catelog→Manage Products→Custom Options page by default. Is there any possibility for us to add the support for “Date” or “Date Time” input types?

http://www.magentocommerce.com/wiki/4_-_themes_and_template_customization/catalog/how_to_add

IE 9 Issues with Magento

The quick fix is to fool IE9 to “think” it’s acting as IE8 by adding a custom meta tag to the page header like so:
<meta http-equiv="X-UA-Compatible" content="IE=8" />
.htaccess approach
Add this to the end of your .htaccess file:

BrowserMatch MSIE best-standards-support
Header set X-UA-Compatible IE=8 env=best-standards-support

Latest update is the Prototype JS file is updated in latest version of Magento hope all the issues with IE9 will be fixed.

Thursday, 8 September 2011

Using Collections in Magento

A collection is a Model type containing other Models, it is basically used in Magento to handle product lists (ie. from a category or a bundle option), but not only.
TO DO: Explain how Magento Implements a collection - Use this to explain how Magento implements a collection by looking at code in a model, so that people can learn to write their own collections
This is a simple example of loading some product collection from a category and ordering them on their product name using Magento’s API.

http://www.magentocommerce.com/wiki/5_-_modules_and_development/catalog/using_collections_in_magento

Wednesday, 31 August 2011

addAttributeToFilter Conditionals In Magento

addAttributeToFilter is a function that can be called on a product collection in Magento. In short, it adds a condition to the WHERE part of the MySQL query used to extract a product collection from the database.

http://fishpig.co.uk/magento-tutorials/addattributetofilter-conditionals-in-magento

Monday, 8 August 2011

Creating a Store Locator with PHP, MySQL & Google Maps

This is intended for developers who are familiar with PHP/MySQL, and want to learn how to use Google Maps with a MySQL database to create a store locator-type app. After completing this tutorial, you will have a database of locations and a webpage that lets a user enter their address and see markers on a map for the locations nearest to them, within a chosen distance restriction. more



Monday, 1 August 2011

Method Varien_Object::__tostring() cannot take arguments

When I try open the magento fodler to install it, I get the following error:

Fatal error: Method Varien_Object::__tostring() cannot take arguments in C:\xampp\htdocs\magento\lib\Varien\Object.php on line 488


File: /lib/Varien/Object.php (Line 484)

Change from

public function ___toString(array $arrAttributes = array(), $valueSeparator=',')

To this

public function __invoke(array $arrAttributes = array(), $valueSeparator=',')

File /app/code/core/Mage/Core/Controller/Request/Http.php (Line 274)

Change from

$host = split(':', $_SERVER['HTTP_HOST']);

To this

$host = explode(':', $_SERVER['HTTP_HOST']);