GithubHelp home page GithubHelp logo

The shipping method is too long and has underscore make magento cant recognize the shipping method when checkout about elasticsuite-for-retailer HOT 12 CLOSED

smile-sa avatar smile-sa commented on June 30, 2024
The shipping method is too long and has underscore make magento cant recognize the shipping method when checkout

from elasticsuite-for-retailer.

Comments (12)

romainruaud avatar romainruaud commented on June 30, 2024

Hello @a970032 which version of Magento are you using ?

There was a problem in Magento 2.1 with the shipping_method field that was too long. It has been fixed in the module but I did not test it again against Magento 2.2.

Regards

from elasticsuite-for-retailer.

a970032 avatar a970032 commented on June 30, 2024

i am using it in Magento 2.2 after the replacing all smile_store_delivery with smilestoredelivery. i can checkout but the shipping method is switched to checkout and money order i dont know is it a magento bug or not

from elasticsuite-for-retailer.

romainruaud avatar romainruaud commented on June 30, 2024

Okay,

we'll have a look on Magento 2.2 with this module since it's untested for now. We put the effort on the elasticsuite module first, and will now ensure this one is also compatible.

Best regards.

from elasticsuite-for-retailer.

a970032 avatar a970032 commented on June 30, 2024

Thanks for the quick reply

from elasticsuite-for-retailer.

romainruaud avatar romainruaud commented on June 30, 2024

Hello @a970032 I think I have understood...

Could you please copy paste here what does the output of "describe sales_order" and "describe quote_address" in you MySQL server ?

You should see the field "shipping_method" with a length of 120 chars.

But I'm pretty sure you will not... If I take a look to this Magento's commit : magento/magento2@f70b196

I'm pretty sure that since they did put it only in an "UpgradeSchema", it is triggered only when upgrading an existing version of Magento, and it is not ran when installing Magento 2.2 from scratch.

I did backport the same fix in our module here : https://github.com/Smile-SA/magento2-module-store-delivery/blob/master/Setup/InstallSchema.php#L47

But I was expecting Magento doing their job properly and updating the column in Install AND Upgrade, which does not seem to be the case ...

Can you confirm the shipping method field is not 120 characters length as expected when installing Magento 2.2 from scratch ?

Regards

from elasticsuite-for-retailer.

a970032 avatar a970032 commented on June 30, 2024

I see the shipping_method length in sales_order is 120 length
so the problem i guess is the way magento split the shipping method they using
list($carrierCode, $method) = explode('_', $shippingMethod, 2);
so if your shipping method contain underscore will fail
here some class i found :
vendor\magento\module-sales\Model\Order.php:1194 getShippingMethod()
vendor\magento\module-rma\Model\Shipping.php::326

from elasticsuite-for-retailer.

romainruaud avatar romainruaud commented on June 30, 2024

Well that's kinda strange, I am not able to reproduce your issue on my instance.

What is the exact version of Magento you are using ? and is it a CE or EE version ?

Regards

from elasticsuite-for-retailer.

romainruaud avatar romainruaud commented on June 30, 2024

Are you able to record what is happening ? I do no understand very well at which step of the checkout you are getting the error.

Best regards

from elasticsuite-for-retailer.

a970032 avatar a970032 commented on June 30, 2024

The version is 2.2 EE
i have tested it should be fine on guest checkout but not with member logged in
enclose the video
ew file is too big so i uploaded to youtube
https://www.youtube.com/watch?v=mH99Ermj9zI&feature=youtu.be

i have created another video guest checkout
https://youtu.be/87qZVtYl9RM

and i have seen some post on stackoverflow about the underscore problem
https://stackoverflow.com/questions/21470816/after-creation-of-custom-shipping-method-the-getshippingcarrier-function-retur/23620361

from elasticsuite-for-retailer.

a970032 avatar a970032 commented on June 30, 2024

After i global replace
image like this and the missing firstname lastname telephone and shipping method is also solved

from elasticsuite-for-retailer.

romainruaud avatar romainruaud commented on June 30, 2024

Confirmed.

I just faced it on my instance. However this seems to appear only when logged in, when guest checkout goes fine.

Really strange... But I will fix this one.

Regards

from elasticsuite-for-retailer.

romainruaud avatar romainruaud commented on June 30, 2024

This one has been fixed in latest version of StoreDelivery module.

Let me know

from elasticsuite-for-retailer.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.