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

And SQL error with a configurable product when showing options in shopping cart. 
 
TheYesMan
Jr. Member
 
Total Posts:  9
Joined:  2007-11-02
 

This happens when I add configurable product to the cart and then tries to show the product options.

exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'id #545)
    
AND (main_table.product_super_attribute_id in ('1'))
GROUP BY
    
`main_t' at line 9' in [root_path/lib/Zend/Db/Statement/Pdo.php:227
Stack trace:
#1 [root_path]/lib/Zend/Db/Statement.php(279): Zend_Db_Statement_Pdo->_execute(Array)
#2 [root_path]/lib/Zend/Db/Adapter/Abstract.php(396): Zend_Db_Statement->execute(Array)
#3 ...
......
..... and so on
#35 [root_path]/index.php(29): Mage::run('base')
#36 {main}And so on ...

Any Idea ?

Image Attachments
magento.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
TheYesMan
Jr. Member
 
Total Posts:  9
Joined:  2007-11-02
 

This happens when I add configurable product to the cart and then asks for:
“Please specify the product option(s)”
(See the attachment.)

exception 'Zend_Db_Statement_Exception' with message 'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'id #545)
    
AND (main_table.product_super_attribute_id in ('1'))
GROUP BY
    
`main_t' at line 9' in [root_path/lib/Zend/Db/Statement/Pdo.php:227
Stack trace:
#1 [root_path]/lib/Zend/Db/Statement.php(279): Zend_Db_Statement_Pdo->_execute(Array)
#2 [root_path]/lib/Zend/Db/Adapter/Abstract.php(396): Zend_Db_Statement->execute(Array)
#3 ...
......
..... and so on
#35 [root_path]/index.php(29): Mage::run('base')
#36 {main}
Image Attachments
magento.png
 
Magento Community Magento Community
Magento Community
Magento Community
 
TheYesMan
Jr. Member
 
Total Posts:  9
Joined:  2007-11-02
 

The SQL which is causing the error is this:

#1 SELECT `main_table`.*, `option_table`.* 
#2 FROM `catalog_product_super_attribute_pricing` AS `main_table` 
#3 INNER JOIN `eav_attribute_option` AS `option_table` ON main_table.value_index=option_table.option_id 
#4 INNER JOIN `catalog_product_super_attribute` AS `attribute` ON attribute.product_super_attribute_id = main_table.product_super_attribute_id 
#5 WHERE (main_table.product_super_attribute_id in ('1')) 
#6 AND (Object id #514) 
#7 AND (main_table.product_super_attribute_id in ('1')) 
#8 GROUP BY `main_table`.`value_id` 
#9 ORDER BY `option_table`.`sort_order` asc

As you can see, there is an object instead of a value (line number 6), thus breaking the query.

I hope magenta developers can tell me what is happening.

 
Magento Community Magento Community
Magento Community
Magento Community
 
TheYesMan
Jr. Member
 
Total Posts:  9
Joined:  2007-11-02
 

I’m really stuck with this error. I can’t continue using the whole application due to this problem.

Please help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Michael_1
Enthusiast
 
Total Posts:  826
Joined:  2007-08-31
 

Hi TheYesMan,

We’ll try to reproduce this and fix it in the next releases.

Thank you.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top