Skip to content

Instantly share code, notes, and snippets.

@tux-rampage
Created December 3, 2015 16:26
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tux-rampage/4d318ef516c8f4b2cf7e to your computer and use it in GitHub Desktop.
Save tux-rampage/4d318ef516c8f4b2cf7e to your computer and use it in GitHub Desktop.
Magento Hotfixes
diff --git a/magento/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Subselect.php b/magento/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Subselect.php
index c07e179..e3ba1e6 100644
--- a/magento/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Subselect.php
+++ b/magento/app/code/core/Mage/SalesRule/Model/Rule/Condition/Product/Subselect.php
@@ -111,6 +111,12 @@
// $aggregatorArr = explode('/', $this->getAggregator());
// $this->setValue((int)$aggregatorArr[0])->setAggregator($aggregatorArr[1]);
+ // The parent class is passing children of configurable items to this method again
+ // this is causing an infinite recursion if we let it pass
+ if ($object->getParentItemId()) {
+ return parent::validate($object);
+ }
+
$attr = $this->getAttribute();
$total = 0;
foreach ($object->getQuote()->getAllVisibleItems() as $item) {
@simbus82
Copy link

https://magento.stackexchange.com/questions/37395/magento-debug-trace/44112

for me your solution work only in part. The solution in the link, it is working good in CE too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment