cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to use hidden fields located below shipping-method step or not?

Is it possible to use hidden fields located below shipping-method step or not?

I have noticed that shipping-method step also contains billing-methods step form that is hidden and located below the "next" button.

 

I am curious if there is a way to remove shipping methods button, unhide the billing form and make ajax call, so billing-methods options would appear when certain fields have been filled, just like it is done by Magento when choosing country from dropdown.

 

To me it seems strange that Magento have added those fields (perfect opportunity for developers), but have no documentation how to use them (one step checkout). 

2 REPLIES 2

Re: Is it possible to use hidden fields located below shipping-method step or not?


 I am curious if there is a way to remove shipping methods button, unhide the billing form and make ajax call, so billing-methods options would appear when certain fields have been filled, just like it is done by Magento when choosing country from dropdown.


I believe you are referring to:

 

<li id="payment" role="presentation" class="checkout-payment-method" data-bind="fadeVisible: isVisible" style="display: none;">
 [SNIP]
</li>

when you are on the shipping method step. This is basically only a placeholder. The actual content only gets loaded when you hit the Next button.

 

Is there a way to adjust this to what you outline - I am pretty sure there is but it would involve a lot of work around customising the checkout javascript. This is not for the faint of heart - have a look at the documentation here for just adding a field to give you an idea of how involved this gets.

 

 

Re: Is it possible to use hidden fields located below shipping-method step or not?

I know that it is lot of work, but i see reward same appealing. What i mean as reward is that better way to upgrade Magento version (using Magenta 2 new features plugins, widgets... ). I see creating onestep checkout module as process that involves writing over many files (I know that core files must be left alone!) including html - this is a way that is not using Magento 2 new features widgets, plugins... . But I see the way i refer to as such that uses those new features and leave html files alone!  

 

Only issue i see is yes indeed this question: Do i have enough experience in investigating such a big framework like Magento and answer is no. Reason why is that so. I think that I have not found a lot of tutorials that would help beginner Magento developer. 

 

Tutorials that would be useful in my opinion to beginners: Ones where experienced developer not only teaches how he/she creates the system (like most of the books have been written: place that method here and there, this row is doing that and so on), but where he/she adds a way how to get to the result (search process- code reading and debugging)- explaining how he/she thinks and searches in jungle of Magento methods and finds those methods (explaining his workflow and a way of thinking while writing module).

 

Yes, Alan storms articles are quite useful in a way to understand the system and learn (I like them because he points to files that readers who wants to know more can look into). Why i say they are not great is that he does not write about his research process, but only about findings. (I personally would like to read about the process that he uses to write those articles). Also I want to point out this article  that I think is a good reading, close to tutorials that i refer to, only issue for me was that the author did not explain debugging process - some parts of the process were skipped. Why I think those articles are good is that beginners can see how more experienced developers search and write modules- I mean process where developers skips asking questions in stack exchange and tries to solve problems by himself/herself.