- I'm trying to programatically update configurable product name and keep other product data unchanged.
- The store has 6 store views.
- Each store view has unique name - all of them need changing.
I'm using this code:
... $product = $this->productRepository->get('111111111'); $product->setName('New Name'); $this->productRepository->save($product);
It updates the name but also removes the product from other storeviews (keeps for the default store view only) and removes all product variations.
- How do I update product name for each store view separately?
- Why Product Repository's save method removes stuff + how to prevent it?