RE: Header button in SuiteCommerce Advance Website

Jahangir Rookie Asked on November 21, 2023 in SuiteCommerce.
Add Comment
1 Answers

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:

  1. Create a new extension in SuiteCommerce Advanced.
  2. In the extension, create a new controller that will handle the form submission.
  3. In the controller, create a new action that will render the form.
  4. In the form, create the fields and buttons that you need.
  5. Add the button to the header of the SuiteCommerce Advanced website.
  6. 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" />

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!

Beginner Answered on November 21, 2023.

Thanks buddy.

on November 21, 2023.

This is a terrible answer and looks like it was written by taking the user’s question and posting it into ChatGPT.

on November 22, 2023.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.