- To do for products you have to take a deep dive in productRepository class present in product package. It already have create and update methods inside it. To create a product you would be needed to select three things:
b. Attribute Family
c. Select variants if you are creating congurable product.
Both the methods create and update in productRepository should work simultaneously if you want to create a product at one go.
To create products with faker you will just need to inject productRepository class and then create products with all necessary values used as it.
- For categories, you can refer this blog: https://bagisto.com/en/create-new-category-and-root-category-in-bagisto/