polaije Posted October 6, 2018 Share Posted October 6, 2018 Hi, I just upgrade to 1.7.4.2 and I have detected during the order process that with certain countries after the creation of addres the process return to the address page with message "one new address created" and I have to call the cart again to continue the order but without succeeding to arrive to the carriers step because no carriers are displayed and this without any message. This is not the same behavior with the country Belgium (site country), the carriers are directly shown after the creation of address. My questions are : Where do I have to search in the core files to isolate the issue ? Can the carrier module (bpost) be responsible of this behavior ? Please can you help me to search where this happened. Jean-Marie Link to comment Share on other sites More sharing options...
musicmaster Posted October 8, 2018 Share Posted October 8, 2018 My hunch would be to find first out what is the difference between the two groups of countries. My guess (the only I think of at the moment) would be that the difference is between countries where you have to enter a state/province/region and those where you don't. Link to comment Share on other sites More sharing options...
polaije Posted October 8, 2018 Author Share Posted October 8, 2018 All the zones are created in countries. Only a difference with the name Belgium and Belgique. I manage to get it working with reinitializing the default settings for address but order tunnel exit to address page after creation of first address. I have to call the cart and strangly the address comes with the message the billing address is different. In this case I can see the carriers. If the billing and destination address are the same on the page, the continue button does not have any effect. The initial problem was not only with Netherland but also other countries except Belgium. You are in Netherland, can you make a test for me at Pharmanovea.com. Thanks, Jean-Marie Link to comment Share on other sites More sharing options...
polaije Posted October 8, 2018 Author Share Posted October 8, 2018 To investigate further the problem occurs when the two adresses, delivery and billing are equal and shown on the same page. When the link to enter a different address is shown the carriers are displayed. Link to comment Share on other sites More sharing options...
musicmaster Posted October 9, 2018 Share Posted October 9, 2018 Something isn't right on this site. When I look at the javascript console I see some synchronous XMLhttprequest warnings. That shouldn't happen in 1.7.4.2. Maybe you are mixing versions? Link to comment Share on other sites More sharing options...
polaije Posted October 9, 2018 Author Share Posted October 9, 2018 The version is the one after upgrade from 1.7.4.0 to 1.7.4.2. I have to say that I have an override to stop orders for specific products in countries outside Belgium. The problem is the order tunnel exit after creating an address with not Belgium countries. We can recall the cart to continue but this is not good. Link to comment Share on other sites More sharing options...
musicmaster Posted October 10, 2018 Share Posted October 10, 2018 You should ask those override people about that synchronous XMLhttprequest. That is a serious issue. Link to comment Share on other sites More sharing options...
polaije Posted October 11, 2018 Author Share Posted October 11, 2018 I am the author of this override. I am not an expert in PHP, it prevents clients from countries outside Belgium to buy a specific category. Here is the code : OrderController.php ( C++ source, ASCII text ) <?php /** * @author PresTeamShop.com * @copyright PresTeamShop.com - 2013 */ class OrderController extends OrderControllerCore { /* * module: restrictedproduct * date: 2015-07-19 15:34:42 * version: 1.0.6 */ public function initContent() { require_once (_PS_MODULE_DIR_ . 'RestrictedProductMedipim/RestrictedProductMedipim.php'); if (Configuration::isCatalogMode()) { Tools::redirect('index.php'); } $this->restorePersistedData($this->checkoutProcess); $this->checkoutProcess->handleRequest( Tools::getAllValues() ); $presentedCart = $this->cart_presenter->present($this->context->cart); if (count($presentedCart['products']) <= 0 || $presentedCart['minimalPurchaseRequired']) { // if there is no product in current cart, redirect to cart page $cartLink = $this->context->link->getPageLink('cart'); Tools::redirect($cartLink); } $product = $this->context->cart->checkQuantities(true); if (is_array($product)) { // if there is an issue with product quantities, redirect to cart page $cartLink = $this->context->link->getPageLink('cart', null, null, array('action' => 'show')); Tools::redirect($cartLink); } $msg=""; if (count($presentedCart['products']) > 0 ) { if(!empty($this->context->cart->id)){ $id_address_delivery = (int)$this->context->cart->id_address_delivery; $address = new Address($id_address_delivery); $id_country_address = $address->id_country; if($id_country_address != null) { if($id_country_address != 3){ $products = $this->context->cart->getProducts(); $msg_restricted_products = 'One or more products can not be sold in the country listed in your address delivery' . ': '; foreach ($products as $product) { $id_product = (int)$product['id_product']; if(RestrictedProductMedipim::checkProduct($id_product)!= ""){ $msg_restricted_products = $msg_restricted_products . $product['name'] . ', ' ; $msg="error"; } } if ($msg !="") { $this->errors[] = $this->trans($msg_restricted_products, array(), 'Shop.Notifications.Error'); echo '<script type="text/javascript">document.getElementById("checkout-payment-step").style.visibility="hidden";);</script>'; } } } } } $this->checkoutProcess ->setNextStepReachable() ->markCurrentStep() ->invalidateAllStepsAfterCurrent(); $this->saveDataToPersist($this->checkoutProcess); if (!$this->checkoutProcess->hasErrors() && $msg=="") { if ($_SERVER['REQUEST_METHOD'] !== 'GET' && !$this->ajax) { return $this->redirectWithNotifications( $this->checkoutProcess->getCheckoutSession()->getCheckoutURL() ); } } else { $cartLink = $this->context->link->getPageLink('cart', null, null, array('action' => 'show')); $this->redirectWithNotifications($cartLink); //$cartLink = $this->context->link->getPageLink('cart', null, null, array('action' => 'show')); //Tools::redirect($cartLink); } parent::initContent(); } } The RestrictedProductMedipim is a function in a module that I also wrote. Do you see Something wrong in my code ? Link to comment Share on other sites More sharing options...
musicmaster Posted October 11, 2018 Share Posted October 11, 2018 When I look at the javascript file that produced the synchronous request I get https://pharmanovea.com/themes/care/assets/cache/bottom-228321279.js This is a cache address so the question is still open what the original file is. You might want to disable CCC and caching to see this. Link to comment Share on other sites More sharing options...
polaije Posted October 12, 2018 Author Share Posted October 12, 2018 I tested this issue with a site clone without cache and I found the error in …./themes/core.js:1544, see the img You can have it with presta17.pharmanovea.com Dont take the jpg error into account, the img are not at correct location. Link to comment Share on other sites More sharing options...
polaije Posted October 12, 2018 Author Share Posted October 12, 2018 I just upgraded the presta17.pharmanovea.com to 1.7.4.3 with classic theme and now I have a strange behavior, the step carrier refresh page every second. I have to return back to 1.4.7.2 Link to comment Share on other sites More sharing options...
polaije Posted October 12, 2018 Author Share Posted October 12, 2018 The presta17.... site is out, I had a problem with the cloner. I just remove the cache from javascript to be able to track the error on pharmanovea.com. Remember, my problem is just that for non Belgium countries the order exit and shows the address page (new address added) and we have to call the cart again to continue. Link to comment Share on other sites More sharing options...
polaije Posted October 18, 2018 Author Share Posted October 18, 2018 One up on this issue... I finally understand why the problem of exiting the order occurs with Belgium, this is because it is designed as default country. On the order page, when we change the country in the address step, the button change from Continue to Save and the address confirmation page is loaded interrupting the order process. As Belgium is the default we dont have to change it. Is this the normal behavior ? If it is we have a problem having a small country as default. Concerning the xmlhttprequest error it occurs in themes/node.js at line 1544 and I Don't know if it has an effect on the normal order procedure. Link to comment Share on other sites More sharing options...
polaije Posted October 18, 2018 Author Share Posted October 18, 2018 I found the solution, it was the theme that was not updated like the fix #7710 for classic theme. Now change in country does not interrupt the order process. 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