Add Page

Main Functionalities:
Add product with unique SKU.
Add Request go through some validation.
Filter inputs from any malicious script.
Check if all required fields come with request or not.
Check if SKU is unique or exist in Database.
Check if price and product type properties are numeric.
List Error of each input below it
Product Type Properties Fields changed dynamically depend on type with jQuery
Request Scenario:
after you click on save button ajax request are sent with value of every field.
In Backend, i validate all fields with validations i said before and reply with a response with errors if exists
If ajax catch that the response contain errors i start to list all errors under its specific field.
if there isn't any error, product will be added to database using its type Model then i reply with success response and display a success message to user.
Last updated


