Skip to content

Commit

Permalink
Add an event on parallel checkout block rendering. (#33)
Browse files Browse the repository at this point in the history
  • Loading branch information
p-bystritsky authored Dec 1, 2023
1 parent d0a23bd commit ad8340e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Checkout/Block/Parallel.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ public function isParallelCheckoutEnabled()
/** @var Bold_Checkout_Model_Config $boldConfig */
$boldConfig = Mage::getSingleton(Bold_Checkout_Model_Config::RESOURCE);
$quote = Mage::getSingleton('checkout/cart')->getQuote();
return Bold_Checkout_Service_IsBoldCheckoutAllowedForQuote::isAllowed($quote)
$renderBlock = new Varien_Object(['result' => true]);
Mage::dispatchEvent ('bold_checkout_parallel_render_block', ['render' => $renderBlock, 'block' => $this]);
return $renderBlock->getResult()
&& Bold_Checkout_Service_IsBoldCheckoutAllowedForQuote::isAllowed($quote)
&& $boldConfig->isCheckoutTypeParallel($websiteId);
}

Expand Down

0 comments on commit ad8340e

Please sign in to comment.