Comments (15)
Here's the fixed version of the public function,
private function _getAllVisibleItems()
{
if (Mage::helper('spranks_configurabletierprices')->isAdmin()) {
$quote = Mage::getSingleton('checkout/session')->getQuote();
$adminquote = Mage::getSingleton('adminhtml/session_quote')->getQuote();
$cartItems = $quote->getAllVisibleItems();
$adminItems = $adminquote->getAllVisibleItems();
return $adminItems;
} else {
return $cartItems;
}
}
Currency switch now works with the module, if anyone can tidy this code will be great. Thanks for the module!
from customgento_configurabletierprices.
Thanks for the report. I still need to check the issue and will do that asap.
But your "fixed" function looks weird. $cartItems
is not defined. Could you clarify what you are trying to do there?
from customgento_configurabletierprices.
Thank you for looking into it,
$cartItems is just a name for the call to get the $quote->getAllVisibleItems (); Can be change to any other name for the call "$configItems" I changed the code because of the infinite loop "Mage::getSingleton('checkout/session')->getQuote()->getAllVisibleItems();" which is causing the memory size exhausted or hangs on currency switch. What i did was just split the code to break the infinite loop the code is around the same as original but different view. I have subscribe to this issue and will await for your good news, Thank again!
from customgento_configurabletierprices.
I could reproduce the issue. I tried to come up with the best fix I can currently find. I now load the quote object if we are in the checkout process to avoid the infinite loop. Otherwise, I simply get the quote object from the checkout session.
@kevccy could you test the current master branch and give me feedback if it resolves the issue for you?
from customgento_configurabletierprices.
Yes, have tested the master branch, the currency switch still hangs and memory size exhausted. I checked the code it could may well be on line 92: "return $quote->getAllVisibleItems();" that is causing the infinite loop. I try adding an instance for it but still not fix the issue, not sure where in the code that is still causing the infinite loop.
from customgento_configurabletierprices.
What is causing the infinite loop is Mage::getSingleton('adminhtml/session_quote')->getQuote()
. But when we are in the checkout, we now load the quote directly and do not get it from the session. This solves the problem in my test environment. Could you please check the output of Mage::app()->getRequest()->getRouteName()
when you switch the currency and tell me what it is?
from customgento_configurabletierprices.
Fatal error: Allowed memory exhausted, "\app\code\core\Mage\Eav\Model\Entity\Collection\Abstract.php on line 1108"
from customgento_configurabletierprices.
This cannot be the output of Mage::app()->getRequest()->getRouteName()
. Do you have a publicly available test system, where I can check it myself? Then please send the data to [email protected]. Otherwise, I think I cannot really help you any more.
from customgento_configurabletierprices.
I got this code on Line:1088 "$select = implode(' UNION ALL ', $selects);" could it be something to do with this? I will test the code on another new setup to see if the error still remains, if not it may well be something on the website or database causing the issue.
from customgento_configurabletierprices.
As said, the only thing which would help me would be the output of Mage::app()->getRequest()->getRouteName()
when you switch the currency. You could add a var_dump(Mage::app()->getRequest()->getRouteName());
quick and dirty into my observer to see it.
from customgento_configurabletierprices.
string(20) "configurablegridview"
from customgento_configurabletierprices.
This is the output if you change the currency in the checkout/cart? Sounds like you are switching the currency on another page...
from customgento_configurabletierprices.
I think i may know where that could be causing the error, i have a module for configurable grid view. I will uninstall the module to see if works. I need a little time to test the issue, will let you know once i get the results shortly. Thanks
from customgento_configurabletierprices.
Got the results, master code working now, it was one of the configurable grid module was using rewrote version of template/catalog/product/view/type/options/configurable.phtml , code all works fine now, Thanks for your help!
from customgento_configurabletierprices.
Glad that it works now :-)
from customgento_configurabletierprices.
Related Issues (20)
- Wrong Price Display On Detail Page
- Configurable Tier Prices with different prices HOT 4
- Get Error When clicking on "Configurable Tier Prices" HOT 7
- Tier Prices on Configurable Product Page HOT 1
- Options with Fixed Price Producing Wrong Unit Price HOT 5
- Module not working HOT 2
- Configurable products HOT 7
- My Magento store ignore this extension! HOT 1
- Group Pricing HOT 5
- Bad cart total HOT 1
- only simple products are taken in account HOT 2
- Configurable Prices Do Not Work in Admin HOT 6
- Ability to Use Simple Price and Not Configurable HOT 2
- Configurable Tier Price HOT 6
- Doesn't work for 1.9.3.2 HOT 3
- If I am on the cart and save a product in the admin that is in cart, I get a nested loop HOT 3
- Implement Test Methods For Admin Pricing
- Extract method `_calculateProductQuantity` in observer HOT 10
- Mage_Core_Exception HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from customgento_configurabletierprices.