cancel
Showing results for 
Search instead for 
Did you mean: 

Why I can not write shipping module that uses selection(dropdown) and customise form validation

0 Kudos

Why I can not write shipping module that uses selection(dropdown) and customise form validation

 My questions are how to add dropdown to the shipping method section and if specific method has been selected (the one that developers have been thought about) make address field required to be filled? I have added image about what i am asking to the post.

 

History: In magento 1.X the developers just edited the phtml file that displayed the shipping method (can be found, when searched) but in magento 2.x uses html files where php can't be used. 

 

Example: some countries uses post-offices where customers can get their orders. So the shop owners need possibility to add dropdown of post offices to the website. Also when they can select to pick up in post office or shop then why they need to add their address making the address field dependable with selected shipping method.

 

I have tired to solve it myself but I do not like none of the solutions that i have came up with: adding the selection field with jQuery (somehow adding it to the order) below shipping method its content depends on shipping method that is selected (main disadvantages are that it might decrease the speed and user has to scroll down to add post office) or writing completely new shipping module that contains this possibility (Magento updates might have added dependency or changed the overwritten files that might brake the website or make module unresponsive - writing new module means writing over many default files rising risks and making the default shipping method useless (main functionality in this kind  cms)).

 

I have tried to ask help Magento Community Forums (programming section) and Magento Stack Exchange - no response! Both of these websites contains a lot of questions about checkout page that are without no replies including many almost duplicate questions about the problem i am facing Smiley Sad. Are they without answer because developers lack such knowledge or something else that is unclear.

 

The main issue is, that I find those functionalities described elementary in such cms and can not understand why they are not added. Why developers have not thought about that user group - Magento is used all over the globe and so should be the features that can be added without changing too much the original code? 

 

The modules (extendability) not included to Magento should be dealing with only special requirements like slider or adding blocks (that has been well documented) or third party connection (Facebook, POS... ) ... But not functionalities like those where there is atleast entire country in need such features! Difficulty adding such features (that most developers can not manage (posts i have found in web while researching [example1]))  is not allowing the shop owners to began using Magento 2.

 

dropdown