/** * Set $ignoreLongCalculations variable * * @param boolean $value Mode * * @return void */ public static function setIgnoreLongCalculationsMode($value) { if (true == $value && \XLite\Module\CDev\XPaymentsConnector\Core\Iframe::getInstance()->useIframe() && \XLite\Core\Request::getInstance()->xpc_iframe) { // Workaround for checkCheckoutAction() method of controller. // Otherwise shippings might be not calculated $value = false; } parent::setIgnoreLongCalculationsMode($value); }
/** * Recalculate order * * @return void */ protected function doActionRecalculate() { if ($this->isOrderEditable()) { // Set ignoreLongCalculations mode for shipping rates gathering \XLite\Model\Shipping::setIgnoreLongCalculationsMode(false); // Initialize temprorary order $order = static::getTemporaryOrder($this->getOrder()->getOrderId(), true); // Update order items list $this->updateOrderItems($order); // Perform 'recalculate' action via model form $this->getOrderForm()->performAction('recalculate'); if (\XLite\Core\Request::getInstance()->isAJAX()) { $this->displayRecalculateData($order); $this->displayRecalculateShippingData($order); $this->restoreFormId(); $this->removeTemporaryOrder($order); } } }