Skip to main content
added 100 characters in body
Source Link

InTesting the query product by your code in version 1.7.* i got the following error seem to bein MySql Workbench "Error Code: 1052. Column 'price_type' in where clause is ambiguous"

Try

 $_product = Mage::getModel('catalog/product')->load(1);
 $collection = Mage::getModel('catalog/product_option')
               ->getProductOptionCollection($_product)
               ->addFieldToFilter('default_option_price.price_type', array('eq' => 'percent'));

Try debugging using

echo $collection->getSelect();

See

v1.7

/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Collection.php

v1.4

/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Option/Collection.php

In version 1.7.* the error seem to be "Error Code: 1052. Column 'price_type' in where clause is ambiguous"

Try

 $_product = Mage::getModel('catalog/product')->load(1);
 $collection = Mage::getModel('catalog/product_option')
               ->getProductOptionCollection($_product)
               ->addFieldToFilter('default_option_price.price_type', array('eq' => 'percent'));

Try debugging using

echo $collection->getSelect();

See

v1.7

/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Collection.php

v1.4

/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Option/Collection.php

Testing the query product by your code in version 1.7.* i got the following error in MySql Workbench "Error Code: 1052. Column 'price_type' in where clause is ambiguous"

Try

 $_product = Mage::getModel('catalog/product')->load(1);
 $collection = Mage::getModel('catalog/product_option')
               ->getProductOptionCollection($_product)
               ->addFieldToFilter('default_option_price.price_type', array('eq' => 'percent'));

Try debugging using

echo $collection->getSelect();

See

v1.7

/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Collection.php

v1.4

/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Option/Collection.php

added 100 characters in body
Source Link

In version 1.7.* the error seem to be "Error Code: 1052. Column 'price_type' in where clause is ambiguous"

Try

 $_product = Mage::getModel('catalog/product')->load(1);
 $collection = Mage::getModel('catalog/product_option')
               ->getProductOptionCollection($_product)
               ->addFieldToFilter('default_option_price.price_type', array('eq' => 'percent'));

Try debugging using

echo $collection->getSelect();

See

v1.7

/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Collection.php

v1.4

/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Option/Collection.php

In version 1.7.* the error seem to be "Error Code: 1052. Column 'price_type' in where clause is ambiguous"

Try

 $_product = Mage::getModel('catalog/product')->load(1);
 $collection = Mage::getModel('catalog/product_option')
               ->getProductOptionCollection($_product)
               ->addFieldToFilter('default_option_price.price_type', array('eq' => 'percent'));

Try debugging using

echo $collection->getSelect();

See

/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Collection.php

In version 1.7.* the error seem to be "Error Code: 1052. Column 'price_type' in where clause is ambiguous"

Try

 $_product = Mage::getModel('catalog/product')->load(1);
 $collection = Mage::getModel('catalog/product_option')
               ->getProductOptionCollection($_product)
               ->addFieldToFilter('default_option_price.price_type', array('eq' => 'percent'));

Try debugging using

echo $collection->getSelect();

See

v1.7

/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Collection.php

v1.4

/app/code/core/Mage/Catalog/Model/Resource/Eav/Mysql4/Product/Option/Collection.php

added 85 characters in body
Source Link

YourIn version 1.7.* the error seem to be "Error Code: 1052. Column 'price_type' in where clause is ambiguous"

Try

 $_product = Mage::getModel('catalog/product')->load(1);
 $collection = Mage::getModel('catalog/product_option')
               ->getProductOptionCollection($_product)
               ->addFieldToFilter('default_option_price.price_type', array('eq' => 'percent'));

Try debugging using

echo $collection->getSelect();

See

/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Collection.php

Your error seem to be "Error Code: 1052. Column 'price_type' in where clause is ambiguous"

Try

 $_product = Mage::getModel('catalog/product')->load(1);
 $collection = Mage::getModel('catalog/product_option')
               ->getProductOptionCollection($_product)
               ->addFieldToFilter('default_option_price.price_type', array('eq' => 'percent'));

Try debugging using

echo $collection->getSelect();

In version 1.7.* the error seem to be "Error Code: 1052. Column 'price_type' in where clause is ambiguous"

Try

 $_product = Mage::getModel('catalog/product')->load(1);
 $collection = Mage::getModel('catalog/product_option')
               ->getProductOptionCollection($_product)
               ->addFieldToFilter('default_option_price.price_type', array('eq' => 'percent'));

Try debugging using

echo $collection->getSelect();

See

/app/code/core/Mage/Catalog/Model/Resource/Product/Option/Collection.php

Source Link
Loading