etailer / Etailer_Backorders

A Magento extension to allow negative values in a product's 'Qty for Item's Status to Become Out of Stock'
MIT License
5 stars 6 forks source link

Fatal Error using "backorderable" column filter in catalog in admin panel #6

Open gebrial opened 8 years ago

gebrial commented 8 years ago

In the admin panel section Catlog->"Manage Products", I set the "To:" values of "Qty" and "Backorderable" columns to zero and hit search I get a fatal error:

Fatal error: Call to a member function getBackend() on a non-object in /var/www/public_html/app/code/core/Mage/Eav/Model/Entity/Abstract.php on line 816

This site seems to be talking about the same error. In our case, "min_qty" seems to not be an attribute. Not sure why yet.

seansan commented 7 years ago

Same issue here. filter_index is not set or does not know which table to reference. Or when using an extension like EAG grid the min_qty column is maybe already in the collection. Either way the join in Adminhtml should maybe contain a table alias so the filter_index can reference 'table_alias.min_qty' instead of defaulting to the index which is min_qty

captainyoung commented 7 years ago

Hi, What we did was remove all the admin stuff from this extension, and then used: https://www.magentocommerce.com/magento-connect/enhanced-admin-grids-editor.html

We kept this extension to allow magento to go below 0, ONLY. There are only 2 files you need to allow this. app/code/community/Etailer/Backorders/controllers/Catalog/ProductController/Catalog/ProductController.php app/code/community/Etailer/Backorders/Model/Stock/Item.php

The admin grids is a nice feature to add too.

seansan commented 7 years ago

Thanks we use EAG too. that s probably why we saw the same problem

Any other additions you did?

On Wed, Jan 18, 2017 at 9:53 PM, captainyoung notifications@github.com wrote:

Hi, What we did was remove all the admin stuff from this extension, and then used: https://www.magentocommerce.com/magento-connect/enhanced- admin-grids-editor.html

We kept this extension to allow magento to go below 0, ONLY. There are only 2 files you need to allow this. app/code/community/Etailer/Backorders/controllers/ Catalog/ProductController/Catalog/ProductController.php app/code/community/Etailer/Backorders/Model/Stock/Item.php

The admin grids is a nice feature to add too.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/etailer/Etailer_Backorders/issues/6#issuecomment-273598320, or mute the thread https://github.com/notifications/unsubscribe-auth/AAn0a7MntuGdNAHvfrBUILkiC9VoBNB8ks5rTnuwgaJpZM4IyPyM .

captainyoung commented 7 years ago

No, basically you need those two files, and the basic extension files. If you want a copy of the extension that I am using, just email me.

The one issue we started to have, which we are not sure if it is caused by the backorder extension, was that products would disappear from categories on the frontend.

We determined that this would happen during high traffic times, and basically when 2 customers would check out within 2-3 seconds of each other, the indexing that is done, would lose an entry in the price index table. This would have the effect of not showing that product in the category.

The fix was to comment out a line in. ( I did not edit the core file, I made an extension with the changed file. You could also over ride that one function in an extension) app/code/local/Mage/CatalogInventory/Model/Observor.php line 749: //Mage::getResourceSingleton('catalog/product_indexer_price')->reindexProductIds($productIds);

This will have the effect of not re-indexing prices, so if you use price rules, it could cause the price to be stale. We do not use any special price rules, so it has no effect on us.

On Wed, Jan 18, 2017 at 11:17 AM, seansan notifications@github.com wrote:

Thanks we use EAG too. that s probably why we saw the same problem

Any other additions you did?

On Wed, Jan 18, 2017 at 9:53 PM, captainyoung notifications@github.com wrote:

Hi, What we did was remove all the admin stuff from this extension, and then used: https://www.magentocommerce.com/magento-connect/enhanced- admin-grids-editor.html

We kept this extension to allow magento to go below 0, ONLY. There are only 2 files you need to allow this. app/code/community/Etailer/Backorders/controllers/ Catalog/ProductController/Catalog/ProductController.php app/code/community/Etailer/Backorders/Model/Stock/Item.php

The admin grids is a nice feature to add too.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/etailer/Etailer_Backorders/issues/6# issuecomment-273598320, or mute the thread https://github.com/notifications/unsubscribe-auth/ AAn0a7MntuGdNAHvfrBUILkiC9VoBNB8ks5rTnuwgaJpZM4IyPyM .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/etailer/Etailer_Backorders/issues/6#issuecomment-273604367, or mute the thread https://github.com/notifications/unsubscribe-auth/AQaVeKBVZrd0PJb76Nej6WGNpxqpHZcAks5rToFYgaJpZM4IyPyM .