Archive for the 'magento' Category

Magento 1.4 and TBT Enhanced Grid 1.2

If you have just upgraded to Magento 1.4.0.1 and installed the latest TBT enhanced grid version 1.2 and you are encountering an error regarding the PDO::quote expecting a String instead of an object, here is the solution:

1) Open up app\code\community\TBT\Enhancedgrid\Block\Catalog\Product\Grid.php

2) Goto line 171 and find
private function loadColumnOptions($attr_code) {
$attr = Mage::getModel(’eav/entity_attribute’)->loadByCode(’catalog_product’, $attr_code);
if(sizeof($attr->getData()) > 0) {
if($attr->getFrontendInput() == ’select’) {
$values = Mage::getResourceModel(’eav/entity_attribute_option_collection’)
->setAttributeFilter($attr->getId())
->setStoreFilter($this->_getStore()->getId(), false)

the bold code is what you need to add because the store filter takes the store ID instead of the store object. What happens on the backend is Magento basically takes the value and makes it part of an SQL statement so an object doesn’t really make sense.

Hope this helps anyone stuck with this issue.

How to show error description in Magento 1.4

Simply go to your magento installation folder, locate the errors folder and you will find local.xml.sample, simply duplicate the file and rename it local.xml