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

Page 2 of 3
Magento 1.4-shopping cart price rules -cann’t add to cart
 
millboy
Jr. Member
 
Total Posts:  30
Joined:  2010-03-21
 
TSDesigns - 17 June 2010 02:12 AM

sorry, you need more than 0.

public function getId()
    
{
        $id 
parent::getId();
        return 
$id $id 1;
    
}

This work! Thank you! smile

 
Magento Community Magento Community
Magento Community
Magento Community
 
Narros
Jr. Member
 
Total Posts:  4
Joined:  2010-06-21
 

Hello gentlemen, no, I’m another user of magento to whom this crazy new 1.4.1 update

I tried what you have mentioned:

/*********************** PAYMENTS ***************************/
     public function  getId ()
        
{
               $id 
parent :: getId ();
              return 
$id $id ;
        


    
public function getPaymentsCollection()
        
{
               
if (is_null($this->_payments)) {
                     $this
->_payments Mage::getModel('sales/quote_payment')->getCollection();

                     if (
$this->getId()) {
                             $this
->_payments->setQuoteFilter($this->getId());
                            foreach (
$this->_payments as $payment{
                                   $payment
->setQuote($this);
                              
}
                      }
                }
               
return $this->_payments;
        
}

and my problem is still there, the rule does not apply 4% discount on transfers. if you help me thank you. a salute to the community

 
Magento Community Magento Community
Magento Community
Magento Community
 
millboy
Jr. Member
 
Total Posts:  30
Joined:  2010-03-21
 

I tested some more (using 1.4.0.1) and the first fix works for me! (first findings smile

The alternative fix (for 1.4.1.0) does not work for me (still getting the message that I can’t add to cart).

 
Magento Community Magento Community
Magento Community
Magento Community
 
Volly
Jr. Member
 
Total Posts:  16
Joined:  2009-09-23
 

@Narros
Make sure you have the same error message in your exeption.log
I think, especially the error-line in the Quote.php is relevant (Should be on line 209). As i explain before, the fail on adding items to the shopping cart can cause by different reasons. It’s possible, that you have a different error. Then you need a different bug-fix.

That was my error log.

2010-06-25T12:05:30+00:00 DEBUG (7): Exception messageSQLSTATE[23000]Integrity constraint violation1452 Cannot add or update a child rowa foreign key constraint fails (`d00e1507/mag932_sales_flat_quote_payment`, CONSTRAINT `FK_SALES_QUOTE_PAYMENT_SALES_QUOTEFOREIGN KEY (`quote_id`) REFERENCES `mag932_sales_flat_quote` (`entity_id`) ON DELETE CASCADE ON UPD)
Trace#0 /www/htdocs/w00afc36/magento/magento/lib/Zend/Db/Statement.php(300): Zend_Db_Statement_Pdo->_execute(Array)
#1 /www/htdocs/w00afc36/magento/magento/lib/Zend/Db/Adapter/Abstract.php(468): Zend_Db_Statement->execute(Array)
#2 /www/htdocs/w00afc36/magento/magento/lib/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query('INSERT INTO `ma...', Array)
#3 /www/htdocs/w00afc36/magento/magento/lib/Varien/Db/Adapter/Pdo/Mysql.php(333): Zend_Db_Adapter_Pdo_Abstract->query('INSERT INTO `ma...', Array)
#4 /www/htdocs/w00afc36/magento/magento/lib/Zend/Db/Adapter/Abstract.php(546): Varien_Db_Adapter_Pdo_Mysql->query('INSERT INTO `ma...', Array)
#5 /www/htdocs/w00afc36/magento/magento/app/code/core/Mage/Core/Model/Mysql4/Abstract.php(414): Zend_Db_Adapter_Abstract->insert('mag932_sales_fl...', Array)
#6 /www/htdocs/w00afc36/magento/magento/app/code/core/Mage/Core/Model/Abstract.php(306): Mage_Core_Model_Mysql4_Abstract->save(Object(Mage_Sales_Model_Quote_Payment))
#7 /www/htdocs/w00afc36/magento/magento/app/code/core/Mage/Core/Model/Mysql4/Collection/Abstract.php(470): Mage_Core_Model_Abstract->save()

#8 /www/htdocs/w00afc36/magento/magento/app/code/core/Mage/Sales/Model/Quote.php(209): Mage_Core_Model_Mysql4_Collection_Abstract->save()

#9 /www/htdocs/w00afc36/magento/magento/app/code/core/Mage/Core/Model/Abstract.php(307): Mage_Sales_Model_Quote->_afterSave()
#10 /www/htdocs/w00afc36/magento/magento/app/code/core/Mage/Checkout/Model/Cart.php(357): Mage_Core_Model_Abstract->save()
#11 /www/htdocs/w00afc36/magento/magento/app/code/core/Mage/Checkout/controllers/CartController.php(184): Mage_Checkout_Model_Cart->save()
#12 /www/htdocs/w00afc36/magento/magento/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Checkout_CartController->addAction()
#13 /www/htdocs/w00afc36/magento/magento/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('add')
#14 /www/htdocs/w00afc36/magento/magento/app/code/core/Mage/Core/Controller/Varien/Front.php(177): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#15 /www/htdocs/w00afc36/magento/magento/app/code/core/Mage/Core/Model/App.php(304): Mage_Core_Controller_Varien_Front->dispatch()
#16 /www/htdocs/w00afc36/magento/magento/app/Mage.php(596): Mage_Core_Model_App->run(Array)
#17 /www/htdocs/w00afc36/magento/magento/index.php(82): Mage::run('', 'store')
#18 {main}

Also make sure you have deleted all content in “/var/cache” after do your fix (even if you have all caches off). The database-engine of Magento caches some of the requests, so maybe an old request has an influence on that (correct me if i’m wrong).

@TSDesign
Your solution work for me in 1.4.1 as well.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Volly
Jr. Member
 
Total Posts:  16
Joined:  2009-09-23
 

Also make sure you have deleted all content in “/var/cache” after do your fix (even if you have all caches off). The database-engine of Magento caches some of the requests, so maybe an old request has an influence on that (correct me if i’m wrong).

 
Magento Community Magento Community
Magento Community
Magento Community
 
Narros
Jr. Member
 
Total Posts:  4
Joined:  2010-06-21
 

My problem is that I do not discount the share transfers. and I do not discount rate does this code.

807 put on the line with all the code you explain before, both public function getId () as public function getPaymentsCollection ()

It’s not an expert on this in magento, so I need a little help. thank you very much

 
Magento Community Magento Community
Magento Community
Magento Community
 
Volly
Jr. Member
 
Total Posts:  16
Joined:  2009-09-23
 

@Narros

My problem is that I do not discount the share transfers. and I do not discount rate does this code.

Don’t know exactly what’s your problem. Post an error/exception log.
These specific bug should only appears when using a discount on the cart.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Narros
Jr. Member
 
Total Posts:  4
Joined:  2010-06-21
 

is a discount on the car. it is all the products if they transfer a percentage is deducted.

 
Magento Community Magento Community
Magento Community
Magento Community
 
DCAlmeida
Sr. Member
 
Avatar
Total Posts:  164
Joined:  2008-12-28
PRT
 

I have the same problem!

This is a huge bug, anyone already reported it?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Volly
Jr. Member
 
Total Posts:  16
Joined:  2009-09-23
 

It is posted in
http://www.magentocommerce.com/bug-tracking/issue?issue=8950
but the core team cant reproduce the error.

Can you please post the plugins u use. I the combination of one of the plugins and the cart rule can cause the problem.
I used:
- German Market Ready
- Cash on Delivery
- Netzarbeiter Login Activation
- Netzarbeiter Login Catalog

 
Magento Community Magento Community
Magento Community
Magento Community
 
DCAlmeida
Sr. Member
 
Avatar
Total Posts:  164
Joined:  2008-12-28
PRT
 

Wow, today I tried without logged in and the cupon works! If I login and try to apply cupon, Magento returns a message of a invalid cupon code

 
Magento Community Magento Community
Magento Community
Magento Community
 
Frosttec2
Jr. Member
 
Total Posts:  1
Joined:  2010-06-07
 

public function getId()
    
{
        $id 
parent::getId();
        return 
$id $id 1;
    
}

if i use this all my new visitants will use the same quote id so they might be add to the same cart
any ideias how to solve it?

 
Magento Community Magento Community
Magento Community
Magento Community
 
chroust
Jr. Member
 
Total Posts:  20
Joined:  2009-05-11
 

I have a few thoughts for this solution:

1) what exactly is this ID for?

2) I had a problem with cart even with the comment fix. After a while playing around a disabled all cart rules, removed my quote.php. Then it worked again.
I did the fix again quote.php to community folder with commented filter line and then I enabled the cart rules. For now it’s OK.
I’m on 1.4.0.1

 
Magento Community Magento Community
Magento Community
Magento Community
 
Narros
Jr. Member
 
Total Posts:  4
Joined:  2010-06-21
 

the problem is in the magento 1.4.1.0.

Nobody addresses or whole I do not

I have my shop broken

 
Magento Community Magento Community
Magento Community
Magento Community
 
tim_bezhashvyly
Jr. Member
 
Avatar
Total Posts:  17
Joined:  2010-05-19
 

Bug filed http://www.magentocommerce.com/bug-tracking/issue?issue=9770

Also none of custom fixes posted in this thread work with 1.4.1.0

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top
Page 2 of 3