Jump to content

Add Custom Field to New Product Page


jayashanka

Recommended Posts

Hi,

I'm using knowband multi vendor marketplace and I want to add 2 new custom fields to Seller dashboard Add New Product Page and Edit Product Page.

 

I have already added these 2 custom fields in admin panel Add Product Page. But I couldn't find a way to do it in Front Office Seller dashboard. 

 

Appreciate your kind support.

Link to comment
Share on other sites

Hi,

Adding custom fields requires customizing the module's code. This customization involves modifying the module's templates and controllers. Here are the general steps to add custom fields to the Seller dashboard's Add New Product and Edit Product pages:

  1. First, create the custom fields you want to add to the Seller dashboard. You mentioned that you've already added them to the admin panel Add Product Page, so ensure that these fields are properly defined and stored in the database.
  2. You'll need to edit the module's templates and controllers to display and save your custom fields.

  3. Locate the module's templates for the Seller dashboard. In the templates, you'll need to add code to display your custom fields on the Add New Product and Edit Product pages. You can use Smarty variables to fetch and display the values of these custom fields.

  4. Next, you'll need to modify the controllers responsible for handling the Add New Product and Edit Product actions for Sellers. These controllers can be found in the module's folder. In these controllers, you'll need to add code to handle the submission and validation of the custom fields when a Seller adds or edits a product. This includes saving the custom field data to the database.

  5. Implement validation logic to ensure that the data entered by Sellers in the custom fields is valid and secure.

  6. Test the changes thoroughly to make sure that your custom fields are displayed correctly in the Seller dashboard, and that data is saved and retrieved as expected.

 

Please be aware that modifying module code can be complex, and it's important to have backups of your PrestaShop installation in case something goes wrong

It's also a good idea to consult Knowband's official documentation or support resources, as they may have specific guidelines or recommendations for customizing their module.

Hope this helps!

Thanks!

Link to comment
Share on other sites

  • 2 months later...

Hi

I think you need to create module with DB table. 

Where you will keep all custom fileds data from prducts.
In BackOffice you can use hook like displayAdminProductsExtra or any other workinkg in product.

Product save you must put data from extra fields to DB.

Edited by rthakur
by mistake upload (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...