i’v updated my magneto version from 1.3 to 1.4 。but the problem occur!
after i config the ”shopping cart price rules “in the admin , i can’t add my products to the shoping cart in the frontend .( only when i choose the condition to payment method ,it occur !)
i’ve tried to solve the issues:
use the app\code\core\Mage\SalesRule of 1.3 to replace the new one ,and then the products go to cart,
but the discount of the price can’t been counted .
some guys can help me , i really think it’s a bug of 1.4 ,because of the problem also appending in a new installed magento 1.4 。
I have a temporary solution for this issue which happen to me too.
I have also sent a error report to the team of magento in the community but I guess they are busy for their enterprise edition no one will
have time to fix this. So here is my simple but sounds working solution:
In the /app/code/core/mage/sales/model/quote.php change the code in around line 807
all you need to do is to make the setQuoteFilter method gone
/*********************** PAYMENTS ***************************/ public function getPaymentsCollection() { if (is_null($this->_payments)) { $this->_payments = Mage::getModel(\'sales/quote_payment\')->getCollection(); //->setQuoteFilter($this->getId());
if ($this->getId()) { foreach ($this->_payments as $payment) { $payment->setQuote($this); } } } return $this->_payments; }
Then you can add the product to cart. In the checkout you can have your discount or surcharge now.
The only problem here is the payment method seems to record the selection of the credit card dates,
each time I go to the payment it has the dates chosen, but luckly it doesn\’t record the card number.
Hope any magento team developer give me some hints on this, as I don\’t have much time reading your code.
Hope this will help and no one need to buy surcharge extensions which still need a developer to customize it for you.
1.4.0.1
I met this issue on the server days ago.When I have a test on my local computer,I works normally.I guess there are some files wrong on the server but I don’t know which one is wrong.
Here is the report in “var/report”
a:5:{i:0;s:292:"Warning: include(/home/fashionb/public_html/app/design/frontend/base/default/template/page/homepage.phtml) [<a href=’function.include’>function.include</a>]: failed to open stream: No such file or directory in /home/fashionb/public_html/app/code/core/Mage/Core/Block/Template.php on line 189";i:1;s:2072:"#0 /home/fashionb/public_html/app/code/core/Mage/Core/Block/Template.php(189): mageCoreErrorHandler(2, ‘include(/home/f...’, ‘/home/fashionb/...’, 189, Array)
#1 /home/fashionb/public_html/app/code/core/Mage/Core/Block/Template.php(189): Mage_Core_Block_Template::fetchView()
#2 /home/fashionb/public_html/app/code/core/Mage/Core/Block/Template.php(225): Mage_Core_Block_Template->fetchView(’frontend/base/d...’)
#3 /home/fashionb/public_html/app/code/core/Mage/Core/Block/Template.php(242): Mage_Core_Block_Template->renderView()
#4 /home/fashionb/public_html/app/code/core/Mage/Core/Block/Abstract.php(674): Mage_Core_Block_Template->_toHtml()
#5 /home/fashionb/public_html/app/code/core/Mage/Core/Model/Layout.php(536): Mage_Core_Block_Abstract->toHtml()
#6 /home/fashionb/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(389): Mage_Core_Model_Layout->getOutput()
#7 /home/fashionb/public_html/app/code/core/Mage/Cms/Helper/Page.php(126): Mage_Core_Controller_Varien_Action->renderLayout()
#8 /home/fashionb/public_html/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), ‘home’)
#9 /home/fashionb/public_html/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), ‘home’)
#10 /home/fashionb/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->indexAction()
#11 /home/fashionb/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch(’index’)
#12 /home/fashionb/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(177): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#13 /home/fashionb/public_html/app/code/core/Mage/Core/Model/App.php(304): Mage_Core_Controller_Varien_Front->dispatch()
#14 /home/fashionb/public_html/app/Mage.php(596): Mage_Core_Model_App->run(Array)
#15 /home/fashionb/public_html/index.php(78): Mage::run(’’, ‘store’)
#16 {main}”;s:3:"url”;s:1:"/”;s:11:"script_name”;s:10:"/index.php”;s:4:"skin”;s:7:"default";}
Hi zhangbopeng,
I guess maybe I can speak chinese with u haha, the error you have is simple one. It tells you that your installation of the magento has missed the file called “/home/fashionb/public_html/app/code/core/Mage/Core/Block/Template.php” which should not be missed. I think your installation of your magento site is not complete and you need to reinstall it. No further information I can give right now.
For 1.4.0.1 magento has changed a little bit of the template standard, so if you want to customize its layout, just follow all the files in the “base” folder, copy and place in your theme folder and start changing them.
The method of changing the discount function here is not 100% complete, in my recent testing all the calculation are right and checkout is fine. But for some login user after the first checkout success then if they add a new product to cart the sidebar of the cart will display $0, but in checkout it return to normal, i guess the filter of quote has something to do with the display, but I am too busy to find it out, if someone did find out pls PM me.
As living in Australia, I would love to use the Bpay payment, but the Fontis Australia Bpay is not working as I expect, and recently I have create a new module only for Bpay and it is successfully use the Order Id to be the reference number, if anyone want to know how to do it I will make a post in a new topic.
Thank you for this topic host to display the error page so I can tackle this problem more easily. Hope guys in magento work together make this good platform free! it’s enterprice is good but not worth $9000 per year!!! only with something other programmers can do and change.
Dear bzhang:
Thanks for you reply.
I overwrite the file template.php with my local one,so it seems work,thank you very much.
If you want to come to China,I will be glad to introduce you.
Dear bzhang:
The problem is still there : (
When I flush the cache,the problems appear again.
I may mistake the temple.php to be the issue.
Need your help!
ps:When I active the shopping cart price rule,this error apprears,but when I inactive it ,I can add to cart.What I want is customers can enjoy 10% discount when they pay by West Union.I have a setting the same as the local one,which works well.So what’s problem?
Hi, we had this issue too. So we compared the databases from an updated and a fresh installed version. After we added the following lines to the db, it worked for us (might be from an extension). Can anyone confirm that?
ALTER TABLE `sales_flat_quote_payment` ADD `account_status` varchar(255) DEFAULT NULL, ADD `address_status` varchar(255) DEFAULT NULL, ADD `protection_eligibility` varchar(255) DEFAULT NULL, ADD `ideal_issuer_id` varchar(255) DEFAULT NULL, ADD `ideal_issuer_list` text AFTER `cc_ss_issue`;
BTW: Try to first deactivate, then to activate all. Maybe this did the trick…
The problem was that my rules didn’t work for NOT LOGGED IN users, it simply couldn’t add items to the cart. There was no problem for logged users. Now it seems to work for everybody. I think it’s because I used rule based on shipping and payment method.
Have the same problem, don’t try the solution yet - but it looks good.
I’m interested to know which modules/plugins you uses, that can cause the problem. Maybe we found an common divisor.
Me using:
- German Shop (0.1.10 by Techdivistion)
- CashOnDelivery (1.4.1)
- IG CashOnDelivery (1.0.5 - not longer used)
- LoginCatalog (1.0.9 by Netzarbeiter)
on an Magento 1.4.01 with two stores.
I already have checked some of the sql-setups of my modules, but can’t find an possible troublemaker.
hi jmnieto,
when you can\’t add a item to the cart, there many possiblities of bugs. Cause any PHP-Error in the cart or Payment-system can cause this. Check your log to ensure you have the same error.
extracts from my log:
Exception message: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`???`.`sales_flat_quote_payment`, CONSTRAINT `FK_SALES_QUOTE_PAYMENT_SALES_QUOTE` FOREIGN KEY (`quote_id`) REFERENCES `sales_flat_quote` (`entity_id`) ON DELETE CASCADE ON UPDATE CA) .... /var/www/svn/myluxphone.com/app/code/core/Mage/Sales/Model/Quote.php(209): Mage_Core_Model_Mysql4_Collection_Abstract->save() ...
As you can see its a slightly differents to the log of zhangbopeng, which main error seems ot be in
I found the solution for my problem in:
http://www.magentocommerce.com/boards/viewthread/178371/ (second post)
EDIT: TSDesign was a bit faster. ^^
@TSDesign found the same solution, but have also the same question about 1.4.1.
I visited the diff-log and found there are many changes in quote.php - but i can not say if the problem is solved.