I cannot see description and short description attributes of the product in adminhtml after saving:

/** @var \Magento\Store\Model\StoreManagerInterface */
protected $_manStore;
/** @var \Magento\Catalog\Api\ProductRepositoryInterface */
protected $_repoProd;

 * @param \Magento\Catalog\Api\Data\ProductInterface $product
 * @param string $name
 * @param string $desc
 * @param string $shortDesc
 * @param int $status
 * @param float $price
 * @param float $weight
protected function _updateProduct($product, $name, $desc, $shortDesc, $status, $price, $weight)

Description & short desc. attributes are saved for default store view instead (store_id=1):

enter image description here

How can I save these attributes visible for adminhtml using Magento way (not SQL direct updates)?

  • I must ask why you use underscores in front of your variable and function names. It's an old agreement between programmers that it means the variable or function is private. As of modern PHP versions, you can declare visibility as you are already doing. It is even officially deprecated: github.com/php-fig/fig-standards/blob/master/accepted/…
    – Jacques
    Dec 14, 2016 at 15:15
  • I'm old, my code is old, my old code uses old agreements.
    – Alex Gusev
    Dec 15, 2016 at 7:02
  • Whenever I edit an old module with such names I refactor it. Easily done with a proper EDI like PhpStorm.
    – Jacques
    Dec 19, 2016 at 13:22

1 Answer 1


Set the current store by name:

  • yes, store code instead of store ID works, both for admin and default stores.
    – Alex Gusev
    Dec 16, 2016 at 6:31
  • Old, but life saving ! Thanks for the tip. Jul 13, 2017 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.