popup add_edit_product

Modal for adding or modifying a product

This is the popup used for adding or modifying an Product on the platform. Exists in the menufocusgroup_product resuable and on the owner's portal.

Key Workflows

Button New Product is clicked

  • Creates a new Product if one does not exist already

    • Sets the Total sold field to 0

  • Runs the Save product custom workflow on the Product

Button Add Image is clicked

  • Creates an Image instance and adds it to the images state of this reusable

  • If the product does not have a primary image - which should only be the case when initially creating a product or if you’ve deleted every existing image - then the newly created Image will be marked as the main primary

  • The new Image(s) are not saved to the Product until the Button New Product / Save Changes is clicked

Group Remove Image is clicked

  • Delinks the Image instance from the Product and removes it from the images state on the reusable

  • If this Image was the Image main for the product, Image main will be set to a new Image

Save product [Custom workflow]

  • Updates the product with the inputted values from the form

  • When saving the Image main and Images we refer to the image main and images states on this reusable

Last updated