magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.38k stars 9.28k forks source link

Onepage checkout page needs to be more customizable #3793

Closed jaimestuardo closed 8 years ago

jaimestuardo commented 8 years ago

I have spent almost 1 week trying to add a simple select field to shipping address in onepage checkout page.

The problem is that since this page is formed by mean of the damn knockoutjs framework, it is impossible to manage.

I only need to have a region dropdown and when an element is selected, a city dropdown must be populated accordingly. I did that right in register and address edit page, however, I could not do it in checkout page since, as I told, all template is rendered by javascript.

I have added a new attribute to customer table and it shows in the templates, but, the result is that I have 2 region fields. The one that I added lists all regions from all countries, and the default region field that lists regions only from my country. Now I would need to run a JavaScript to change those dropdowns, but I don't know where to put that code. The framework is impossible to follow correctly.

Why don't Magento developers use the templating system as the rest of the site? why to use such a terrible thing like knockoutjs? In honor of its name, it is really a K.O. to the brain. Was it really a gain using that?

The above sums to the fact that there is not documentation about how to do customizations to those templates.

Have you plan to do this part of Magento more customizable? If you haven't, I think you should consider it.

Thanks Jaime

ishakhsuvarov commented 8 years ago

@jaimestuardo Thank you for sharing your thoughts on this, we greatly appreciate any kind of feedback about our work.

Why don't Magento developers use the templating system as the rest of the site?

The client-side rendering concept was initially introduced to the Checkout flow to make it faster and more responsive by avoiding costly rendering action on backend. Currently, this approach is widely used in other Magento components.

Have you plan to do this part of Magento more customizable? If you haven't, I think you should consider it.

Yes, we have multiple tasks in our product backlog to improve documentation and make Checkout more customisable. However, JS rendering concepts are going to remain the same for now.

There are multiple resources you may refer to get help with Magento 2 development, for example:

If you have any feature requests or proposals we are always open to discussion. Additionally, if you have improvement ideas and would like to contribute to the codebase – we are accepting Pull Requests.

jaimestuardo commented 8 years ago

Thanks @ishakhsuvarov, I hope this process get updated soon. Meanwhile, I will try to solve the problem. And, you cannot imagine the flooding of questions I have sent to Magento Stack Exchange and community.magento.com and nobody answers, what means that nobody knows. It can mean also that documentation is really poor and/or nobody in the universe has wanted to customize the checkout page. Maybe they have thought not to get into very deep trouble. I think they are smarter but I really never guessed that a very simple thing could be turned it into a very difficult thing.

ishakhsuvarov commented 8 years ago

@jaimestuardo We are working in that direction. In the meantime, please check other GitHub tickets which you have opened recently, I hope we will be able to answer your questions.

Thanks.

jaimestuardo commented 8 years ago

Thanks a lot, but I have finally followed this thinking: "if you can't beat them, join them". After several days trying to do one thing that should be very simple programmatically, and without seeing the light at the end of the tunnel, I decided to do what Magento wants, that is, to have an input field called city and a dropdown field called region_id. That is not what my customer expected but I am too late with this project, so I will convince him to do it this way, arguing that these are Magento limitations. This is not lie, indeed, while there is a lack of good documentation and a more understandable way to do it, it is not possible in practice.

Best regards Jaime