Bonjour à tous,
J'ai une erreur 500 lors du paiement par chèque. J'ai déjà réinitialisé le module, rien. Voici le message en mode debug.
------------------------------------EN--
Hello to all,
I have a 500 error when paying by check. I have already reset the module, nothing. Here is the message in debug mode.
------------------------------------SRC--
PaymentModule.php line 1063
protected function createOrderCartRules( Order $order, Cart $cart, $order_list, $total_reduction_value_ti, $total_reduction_value_tex, $id_order_state ) { $cart_rule_used = array(); // prepare cart calculator to correctly get the value of each cart rule line1063 $calculator = $cart->newCalculator($order->product_list, $cart->getCartRules(), $order->id_carrier); $calculator->processCalculation(_PS_PRICE_COMPUTE_PRECISION_); $cartRulesData = $calculator->getCartRulesData(); $cart_rules_list = array(); foreach ($cartRulesData as $cartRuleData) { $cartRule = $cartRuleData->getCartRule(); // Here we need to get actual values from cart calculator $values = array( 'tax_incl' => $cartRuleData->getDiscountApplied()->getTaxIncluded(), 'tax_excl' => $cartRuleData->getDiscountApplied()->getTaxExcluded(), ); // If the reduction is not applicable to this order, then continue with the next one if (!$values['tax_excl']) { continue; }
PaymentModule.php line 485
} // end foreach ($products) $product_list_txt = ''; $product_list_html = ''; if (count($product_var_tpl_list) > 0) { $product_list_txt = $this->getEmailTemplateContent('order_conf_product_list.txt', Mail::TYPE_TEXT, $product_var_tpl_list); $product_list_html = $this->getEmailTemplateContent('order_conf_product_list.tpl', Mail::TYPE_HTML, $product_var_tpl_list); } $total_reduction_value_ti = 0; $total_reduction_value_tex = 0; $cart_rules_list = $this->createOrderCartRules( line485 $order, $this->context->cart, $order_list, $total_reduction_value_ti, $total_reduction_value_tex, $id_order_state ); $cart_rules_list_txt = ''; $cart_rules_list_html = ''; if (count($cart_rules_list) > 0) { $cart_rules_list_txt = $this->getEmailTemplateContent('order_conf_cart_rules.txt', Mail::TYPE_TEXT, $cart_rules_list); $cart_rules_list_html = $this->getEmailTemplateContent('order_conf_cart_rules.tpl', Mail::TYPE_HTML, $cart_rules_list); } // Specify order id for message
in validation.php line 67
$mailVars = array( '{check_name}' => Configuration::get('CHEQUE_NAME'), '{check_address}' => Configuration::get('CHEQUE_ADDRESS'), '{check_address_html}' => str_replace("\n", '<br />', Configuration::get('CHEQUE_ADDRESS'))); line67 $this->module->validateOrder((int)$cart->id, Configuration::get('PS_OS_CHEQUE'), $total, $this->module->displayName, null, $mailVars, (int)$currency->id, false, $customer->secure_key); Tools::redirect('index.php?controller=order-confirmation&id_cart='.(int)$cart->id.'&id_module='.(int)$this->module->id.'&id_order='.$this->module->currentOrder.'&key='.$customer->secure_key); } }