New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug while adding a new step to checkout before Shipping Address #8875
Comments
You can set the ko.obserable(false) to fix this... But i am facing a new issue the template file is not called. |
I did eventually do this, after having spent a day figuring out how it works. I also added a condition where if the hash string is equal to "shipping", then the default component without any extensions is used. It's a shame that there's a need for a workaround, shouldn't this be working OOTB? |
Is your template called ??? |
Yes. |
Did u try it in Magento version 2.1.5 |
No, only in 2.1.3 for now. |
Same problem for me. Preconditions
|
I have also referred this isse in devdocs |
Is there any patch for the issue? |
Confirmed it's also an issue with: PreconditionsMagento version 2.1.6 |
Also an issue with Magento 2.1.7 however i cannot fix with workaround "ko.obserable(false)" Second step is then shown instead of first. |
I tried the sample mixin code in the dev docs (http://devdocs.magento.com/guides/v2.1/howdoi/checkout/checkout_new_step.html) but it didnt work out. turns out the sample code is missing a important line. add the following line to the Vendor_Module/js/view/shipping-payment-mixin file: this.isVisible = kko.observable(false) payment.js uses the isVisible variable to store the value if the step should be visible or not. whereas, shipment.js uses the visible variable to do the same. The sample code in the dev document is missing the line above which is why two steps are activated on the loading of the checkout. shipping-payment-mixin.js contents: define(
); On a side note, remember to change the sort value in the initialize function in my-step-view.js and sortOrder value in checkout_index_index.xml if you want the custom step to be the first step. Hope this helps someone. |
#8875 (comment) is it working? |
@AlexandreKhayrullin, thank you for your report. |
andrewli-ca Seems to work unless you are only purchasing downloadable products. Then the payment/review sections still shows up. |
@andrewli-ca Does this work if only custom step and payment step are involved ? |
Hello everyone, I looked into the issue and I'm going to close it for the following reasons:
If you feel there is still some work to be done within this issue then please let me know and reopen it and I'll gladly help anyway I can. |
Preconditions
Steps to reproduce
Expected result
Actual result
It appears that the bug is due to the fact that while adding the step "Shipping Address" to the checkout (in the file vendor/magento/module-checkout/view/frontend/web/js/view/shipping.js) , the only check to detect whether the form should be displayed by default is done on the quote, whether it is virtual or not (the same condition that tells whether the step should be included at all) . There is nothing to check for existing steps and hide the "Shipping Address" form if a new step is added before it.
The text was updated successfully, but these errors were encountered: