RE: Header button in SuiteCommerce Advance Website
The best approach to create a button on the header in SuiteCommerce Advanced website along with the login and register buttons and to show a form on click of the button would be to code in an extension. This is because extensions are a more maintainable and reusable way to add custom functionality to SuiteCommerce Advanced websites, and they allow you to separate your custom code from the core SuiteCommerce Advanced codebase.
Here are the steps on how to create the button and form in an extension:
- Create a new extension in SuiteCommerce Advanced.
- In the extension, create a new controller that will handle the form submission.
- In the controller, create a new action that will render the form.
- In the form, create the fields and buttons that you need.
- Add the button to the header of the SuiteCommerce Advanced website.
- When the button is clicked, the form should be displayed.
Here is an example of how to create the button and form in an extension:
<a href="#" class="button">My Button</a> <form action="/my-extension/controller/action"> <input type="text" name="name" /> <input type="submit" value="Submit" /> </form>
This is just a basic example, and you will need to modify the code to fit your specific needs. However, this should give you a good starting point for creating the button and form in an extension.
I hope this helps!