You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?php
require_once 'app/Mage.php';
Mage::app();
$collection = Mage::getModel('catalog/product')->getCollection()
->addAttributeToSelect('tax_class_id')
->addAttributeToSort('name');
// toggle this to see the weird result
$collection->addAttributeToSelect('price');
// to make the script faster and lighter
$collection->setPageSize(1);
if ($collection->getSize() > 0) {
var_dump($collection->getFirstItem()->getData('tax_class_id'));
}
// does not help, the SQL is exactly the same
// echo (string) $collection->getSelect();
Expected result (*)
It should give you the tax class id as an integer, as declared for this attribute type.
Preconditions (*)
Steps to reproduce (*)
Expected result (*)
Actual result (*)
Extra information
I spent a lot of time debugging this issue, you can find a detailed thread about it here: https://magento.stackexchange.com/questions/105244/magento-1-admin-product-grid-column-value-disappear-on-name-search/105421
So I already have a fix for it, will do a PR soon
The text was updated successfully, but these errors were encountered: