Here is what I am trying to achieve. I have a magento2 store and I want to add customization functionality. The way it is going to work is I add a link on products page which will take users to this customization page.
This customization page will have its own URL and hence will be a new module. Here is what I have so far:
- Controller: Does nothing, returns a page.
- Block: Has some sample functions defined.
- Templates: Has HTML code and gets the values by calling sample functions from block.
Here is what I need now:
Where should my logic go. This logic will get the metadata from database for chosen product and display options. Should this be in block or the controller?
I think the logic to display options will be in template. Correct me if I am wrong.