Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

After upgrade no products can be added to cart! 
 
aarne
Sr. Member
 
Total Posts:  130
Joined:  2007-09-06
 

Not sure why, but I tested on default template that no product goes into cart, just gives the error saying “Product could not be added to cart.”

Also when logged in and going to cart I get “Redirect Loop” and 404’s!

When not logged in cart is shown as empty, but as said nothing can be added.

So this upgrade makes the store unusable, since noone can buy anything! BAD!

Also session based language in admin html doesn’t work anymore.

All products tested are configurable products.

This is the result of 15min roaming around.

 
Magento Community Magento Community
Magento Community
Magento Community
 
aarne
Sr. Member
 
Total Posts:  130
Joined:  2007-09-06
 

And yes, I have emptied var/cache, rebuild cache and danced rain dance. smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
alehano
Jr. Member
 
Total Posts:  18
Joined:  2008-10-24
 

My problem is - when i added configurable poducts and go to cart page it says:

The requested quantity for “Product” is not available.
Selected configuration is not available.

But quantity=10

Simple products works ok.

 
Magento Community Magento Community
Magento Community
Magento Community
 
aarne
Sr. Member
 
Total Posts:  130
Joined:  2007-09-06
 

I have the issue also with simple. Nothing can be added to cart and also there’s the redirect loop issue when logged in. Really sucks at the moment. Speed seems to be improved though. rasberry

 
Magento Community Magento Community
Magento Community
Magento Community
 
aarne
Sr. Member
 
Total Posts:  130
Joined:  2007-09-06
 

The issue is here: http://www.hardcasa.com/

If can’t get this to solve soon, have to downgrade back to 1.2.1.2

 
Magento Community Magento Community
Magento Community
Magento Community
 
J_T_
Mentor
 
Avatar
Total Posts:  1961
Joined:  2008-08-07
London-ish, UK
 

First off, IMO it’s a bit silly to upgrade on a production site. You could have saved yourself and your customers the hassle if you tested this first.

To fix, you need to get in touch with the designer of your template as at a glance, it appears the template is not compatible with the latest code.

 
Magento Community Magento Community
Magento Community
Magento Community
 
aarne
Sr. Member
 
Total Posts:  130
Joined:  2007-09-06
 

We did test this, but for some reason this issue got unnoticed, didn’t even think this could happen. But ofc anything can with these matters. smile Downgrading is not that big of an issue for us.

And regarding the template being to fault, that’s not the case since the same issue happens with upgraded default template. Can be tested here: www.hardcasa.de

 
Magento Community Magento Community
Magento Community
Magento Community
 
aarne
Sr. Member
 
Total Posts:  130
Joined:  2007-09-06
 

Oh well, the reason wasn’t 1.3.0 after all.

We had local changes in Product model, so the class didn’t upgrade itself. smile Feeling stupid a bit, but can’t remember everything. So after upgrading the Product model to local including our own modifications everything works.

 
Magento Community Magento Community
Magento Community
Magento Community
 
where_s_gary
Jr. Member
 
Total Posts:  12
Joined:  2009-01-12
 

I’m having a similar problem. Whenever I tried to add anything to the shopping cart, I get this error:

Fatal error: Call to undefined method Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Flat::getAttribute()

doesn’t matter if it is a simple product or configurable product.

here is my test site: goldengadgets.simplehelix.com

Anyone know what the problem might be?

Gary

 
Magento Community Magento Community
Magento Community
Magento Community
 
where_s_gary
Jr. Member
 
Total Posts:  12
Joined:  2009-01-12
 

UPDATE:

I turned off the Flat Catalog Category and it fixed the problems. Then I tested the Flat Catalog Products and it works fine.

Which option will make my site run faster?

Flat Catalog Category (currently not working*)
or
Flat Catalog Products (works)
?

PS: a newer problem that I encountered on “Flat Catalog Category” was that after you do add a configurable product into your shopping cart, you cannot remove it from the cart menu on the sidebar. The site just errors out. Also this problem does not appear in the flat catalog products option.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bencole
Jr. Member
 
Total Posts:  10
Joined:  2008-08-11
 

BUMP!!!
Same problem

Cant add product to the cart with ‘Flat Catalog Category’ turned on - with is turned off it all works fine.

We receive the error

Fatal error: Call to undefined method Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Flat::getAttribute() in /app/code/core/Mage/Catalog/Model/Category.php on line 532

when a product is added to cart

Please help!

 
Magento Community Magento Community
Magento Community
Magento Community
 
alehano
Jr. Member
 
Total Posts:  18
Joined:  2008-10-24
 

I think the best solution is install blank magento 1.3 instead upgrade. I fixed my issue exactly like this.

 
Magento Community Magento Community
Magento Community
Magento Community
 
bencole
Jr. Member
 
Total Posts:  10
Joined:  2008-08-11
 

ok, ive just started looking into this issue and have found a very hacky ‘fix’

if you go to

/app/code/core/Mage/Catalog/Model and comment out lines 531-534 of Category.php then you can add product to the cart again.

However this is a very bad fix and ive no idea what the implication of doing this are - so far im yet to fine any tho

does any one know of any implications of doing this?

 
Magento Community Magento Community
Magento Community
Magento Community
 
purplemine
Sr. Member
 
Total Posts:  143
Joined:  2008-05-20
London
 

I’ve found the same errors, but found that turning off flat category (leaving on flat product) solves the problem for the moment.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Matt Kammersell
Jr. Member
 
Avatar
Total Posts:  16
Joined:  2007-09-21
Las Vegas, NV
 

Real Solution :

around anything that uses the getAttribute, try this (what I did to the Url model to solve the same problem in EE 1.7.1)

if (Mage::helper('catalog/category_flat')->isEnabled()) {
                $attribute 
Mage::getSingleton('catalog/config')->getAttribute('catalog_category'$attributeCode);
            
else {
                $attribute 
$this->getCategoryModel()->getResource()->getAttribute($attributeCode);
            
}
 
Magento Community Magento Community
Magento Community
Magento Community
 
m_reichenbach
Jr. Member
 
Total Posts:  2
Joined:  2011-11-06
 

Better solution:
Add missing function to the class Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Flat as e.g. in Magento 1.6.0.0:

/**
 * Retrieve attribute instance
 * Special for non static flat table
 *
 * added from Magento 1.6.0.0
 *
 * @param mixed $attribute
 * @return Mage_Eav_Model_Entity_Attribute_Abstract
 */
public function getAttribute($attribute)
{
    
return Mage::getSingleton('catalog/config')
        ->
getAttribute(Mage_Catalog_Model_Category::ENTITY$attribute);
}

You might also want to add a fix in the function _loadNodes() in the same class by adding the filter “include_in_menu” (or else categories will be shown in the navigation even when they are set to NOT be shown):

$select $_conn->select()
    ->
from(array('main_table'=>$this->getMainStoreTable($storeId)), array('main_table.entity_id''main_table.name''main_table.path''main_table.is_active''main_table.is_anchor'))
    ->
joinLeft(
        array(
'url_rewrite'=>$this->getTable('core/url_rewrite')),
        
'url_rewrite.category_id=main_table.entity_id AND url_rewrite.is_system=1 AND url_rewrite.product_id IS NULL AND url_rewrite.store_id="'.$storeId.'" AND url_rewrite.id_path LIKE "category/%"',
        array(
'request_path' => 'url_rewrite.request_path'))
    ->
where('main_table.is_active = ?''1')
    
// added from Magento 1.6.0.0
    
->where('main_table.include_in_menu = ?''1')
//    ->order('main_table.path', 'ASC')
    
->order('main_table.position''ASC');
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top