Alekssi Posted September 1, 2020 Share Posted September 1, 2020 (edited) 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); } } Edited September 1, 2020 by Alekssi (see edit history) Link to comment Share on other sites More sharing options...
50 Nuances de Bois Posted October 20, 2020 Share Posted October 20, 2020 bonjour, je voulais savoir si vous aviez trouvé la solution pour l'erreur 500 en cas de paiement par chèque ? car j'ai le meme probleme sur ma boutique. Merci pour votre réponse Link to comment Share on other sites More sharing options...
Alekssi Posted October 20, 2020 Author Share Posted October 20, 2020 Bonjour, Oui je vous invite sur ce poste : J'avais une fonction en private au lieu de public. Link to comment Share on other sites More sharing options...
50 Nuances de Bois Posted October 30, 2020 Share Posted October 30, 2020 Merci pour la reponse, je vais essayé de trouver mais c'est chaud Link to comment Share on other sites More sharing options...
50 Nuances de Bois Posted October 30, 2020 Share Posted October 30, 2020 Vous avez changé comment la fonction ? Link to comment Share on other sites More sharing options...
50 Nuances de Bois Posted October 30, 2020 Share Posted October 30, 2020 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now