cancel
Showing results for 
Search instead for 
Did you mean: 

Promotions Causes Internal Server Error when using Category Conditions

Promotions Causes Internal Server Error when using Category Conditions

We are having issues with setting up Promotion which rely on Category Condition causing and infinite loop when adding products to baskets when this offer is used in conjunction with other offers.

 

Similar to: http://ka.lpe.sh/2015/03/28/magento-checkout-cart-500-error/

 

M2.0.7

 

Offer example using demo data.

Conditions

If ALL  of these conditions are TRUE :

Action

50%

Percentage of Product Price discount

Conditions: If ALL  of these conditions are TRUE :

 

When used with other offers in basket causes a "Internal Server Error" when adding new product items.

 

Has anyone got a solution to this. 

Thanks In advance

2 REPLIES 2

Re: Promotions Causes Internal Server Error when using Category Conditions

Please can you post here your exception detail, reported in log files.

Re: Promotions Causes Internal Server Error when using Category Conditions

[2016-06-20 14:14:14] main.CRITICAL: InvalidArgumentException: groupn is unknown type in /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/module-sales-rule/Model/Rule/Action/Discount/CalculatorFactory.php:47
Stack trace:
#0 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/module-sales-rule/Model/RulesApplier.php(145): Magento\SalesRule\Model\Rule\Action\Discount\CalculatorFactory->create('groupn')
#1 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/module-sales-rule/Model/RulesApplier.php(127): Magento\SalesRule\Model\RulesApplier->getDiscountData(Object(Magento\Quote\Model\Quote\Item), Object(Magento\SalesRule\Model\Rule\Interceptor))
#2 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/module-sales-rule/Model/RulesApplier.php(78): Magento\SalesRule\Model\RulesApplier->applyRule(Object(Magento\Quote\Model\Quote\Item), Object(Magento\SalesRule\Model\Rule\Interceptor), Object(Magento\Quote\Model\Quote\Address), 'amasty')
#3 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/module-sales-rule/Model/Validator.php(242): Magento\SalesRule\Model\RulesApplier->applyRules(Object(Magento\Quote\Model\Quote\Item), Object(Magento\SalesRule\Model\ResourceModel\Rule\Collection), false, 'amasty')
#4 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/module-sales-rule/Model/Quote/Discount.php(122): Magento\SalesRule\Model\Validator->process(Object(Magento\Quote\Model\Quote\Item))
#5 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/module-quote/Model/Quote/TotalsCollector.php(265): Magento\SalesRule\Model\Quote\Discount->collect(Object(Magento\Quote\Model\Quote), Object(Magento\Quote\Model\ShippingAssignment), Object(Magento\Quote\Model\Quote\Address\Total))
#6 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/module-quote/Model/Quote/TotalsCollector.php(144): Magento\Quote\Model\Quote\TotalsCollector->collectAddressTotals(Object(Magento\Quote\Model\Quote), Object(Magento\Quote\Model\Quote\Address))
#7 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/module-quote/Model/Quote.php(1922): Magento\Quote\Model\Quote\TotalsCollector->collect(Object(Magento\Quote\Model\Quote))
#8 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/module-checkout/Controller/Cart/CouponPost.php(84): Magento\Quote\Model\Quote->collectTotals()
#9 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/var/generation/Magento/Checkout/Controller/Cart/CouponPost/Interceptor.php(24): Magento\Checkout\Controller\Cart\CouponPost->execute()
#10 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/App/Action/Action.php(102): Magento\Checkout\Controller\Cart\CouponPost\Interceptor->execute()
#11 [internal function]: Magento\Framework\App\Action\Action->dispatch(Object(Magento\Framework\App\Request\Http))
#12 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Interceptor.php(74): call_user_func_array(Array, Array)
#13 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Checkout\Controller\Cart\CouponPost\Interceptor->___callParent('dispatch', Array)
#14 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Checkou...', 'dispatch', Object(Magento\Checkout\Controller\Cart\CouponPost\Interceptor), Array, 'designLoader')
#15 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/App/Action/Plugin/Design.php(39): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#16 [internal function]: Magento\Framework\App\Action\Plugin\Design->aroundDispatch(Object(Magento\Checkout\Controller\Cart\CouponPost\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#17 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)
#18 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Checkou...', 'dispatch', Object(Magento\Checkout\Controller\Cart\CouponPost\Interceptor), Array, 'contextPlugin')
#19 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/module-store/App/Action/Plugin/Context.php(106): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#20 [internal function]: Magento\Store\App\Action\Plugin\Context->aroundDispatch(Object(Magento\Checkout\Controller\Cart\CouponPost\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#21 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)
#22 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Checkou...', 'dispatch', Object(Magento\Checkout\Controller\Cart\CouponPost\Interceptor), Array, 'customer-app-ac...')
#23 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/module-customer/Model/App/Action/ContextPlugin.php(61): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#24 [internal function]: Magento\Customer\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Checkout\Controller\Cart\CouponPost\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#25 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)
#26 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Checkou...', 'dispatch', Object(Magento\Checkout\Controller\Cart\CouponPost\Interceptor), Array, 'storeCheck')
#27 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/module-store/App/Action/Plugin/StoreCheck.php(44): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#28 [internal function]: Magento\Store\App\Action\Plugin\StoreCheck->aroundDispatch(Object(Magento\Checkout\Controller\Cart\CouponPost\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#29 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)
#30 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Checkou...', 'dispatch', Object(Magento\Checkout\Controller\Cart\CouponPost\Interceptor), Array, 'weee-app-action...')
#31 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/module-weee/Model/App/Action/ContextPlugin.php(112): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#32 [internal function]: Magento\Weee\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Checkout\Controller\Cart\CouponPost\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#33 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)
#34 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Checkou...', 'dispatch', Object(Magento\Checkout\Controller\Cart\CouponPost\Interceptor), Array, 'tax-app-action-...')
#35 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/module-tax/Model/App/Action/ContextPlugin.php(91): Magento\Checkout\Controller\Cart\CouponPost\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#36 [internal function]: Magento\Tax\Model\App\Action\ContextPlugin->aroundDispatch(Object(Magento\Checkout\Controller\Cart\CouponPost\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#37 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Interceptor.php(140): call_user_func_array(Array, Array)
#38 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/var/generation/Magento/Checkout/Controller/Cart/CouponPost/Interceptor.php(39): Magento\Checkout\Controller\Cart\CouponPost\Interceptor->___callPlugins('dispatch', Array, Array)
#39 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/App/FrontController.php(55): Magento\Checkout\Controller\Cart\CouponPost\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#40 [internal function]: Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#41 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Interceptor.php(74): call_user_func_array(Array, Array)
#42 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#43 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'requestPreproce...')
#44 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php(89): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#45 [internal function]: Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#46 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)
#47 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'install')
#48 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Module/Plugin/DbStatusValidator.php(69): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#49 [internal function]: Magento\Framework\Module\Plugin\DbStatusValidator->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#50 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)
#51 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'searchautocompl...')
#52 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/mirasvit/module-search-autocomplete/src/SearchAutocomplete/Model/App/FrontController/Plugin.php(128): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#53 [internal function]: Mirasvit\SearchAutocomplete\Model\App\FrontController\Plugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#54 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)
#55 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
#56 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/module-page-cache/Model/App/FrontController/VarnishPlugin.php(55): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain\{closure}(Object(Magento\Framework\App\Request\Http))
#57 [internal function]: Magento\PageCache\Model\App\FrontController\VarnishPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#58 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Chain/Chain.php(67): call_user_func_array(Array, Array)
#59 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Interceptor.php(136): Magento\Framework\Interception\Chain\Chain->invokeNext('Magento\\Framewo...', 'dispatch', Object(Magento\Framework\App\FrontController\Interceptor), Array, 'front-controlle...')
#60 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php(73): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#61 [internal function]: Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch(Object(Magento\Framework\App\FrontController\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#62 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/Interception/Interceptor.php(140): call_user_func_array(Array, Array)
#63 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/var/generation/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#64 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/App/Http.php(115): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#65 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
#66 /var/www/vhosts/cashmerecentre.com/dev.cashmerecentre.com/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
#67 {main} [] []