Search This Blog

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']);