Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
|
Go to the source code of this file.
Variables | |
$productId = 333 | |
$objectManager = Bootstrap::getObjectManager() | |
$websiteResourceModel = $objectManager->get(WebsiteResourceModel::class) | |
$storeGroupResourceModel = $objectManager->get(GroupResourceModel::class) | |
$storeResourceModel = $objectManager->get(StoreResourceModel::class) | |
$productRepository = $objectManager->create(ProductRepositoryInterface::class) | |
$resourceConnection = $objectManager->get(ResourceConnection::class) | |
$flagManager = $objectManager->get(\Magento\Framework\FlagManager::class) | |
$productLinkField | |
$website = $objectManager->create(Website::class) | |
$storeGroup = $objectManager->create(Group::class) | |
$storeOne = $objectManager->create(Store::class) | |
$storeTwo = $objectManager->create(Store::class) | |
$stores | |
$product = $objectManager->create(Product::class) | |
foreach($stores as $store) | $connection = $resourceConnection->getConnection() |
foreach ( $stores as $store) $connection = $resourceConnection->getConnection() |
createProductStoreValuesUnSync Product status values
Definition at line 145 of file website_attribute_sync.php.
$flagManager = $objectManager->get(\Magento\Framework\FlagManager::class) |
Definition at line 33 of file website_attribute_sync.php.
$objectManager = Bootstrap::getObjectManager() |
Definition at line 27 of file website_attribute_sync.php.
$product = $objectManager->create(Product::class) |
Definition at line 109 of file website_attribute_sync.php.
$productId = 333 |
create whole website->storeGroup->[store1,store2] structure and add product to it with "Status" website attribute values that have different values in the same website (which is wrong behavior) also turns on "Require sync" flag
Definition at line 26 of file website_attribute_sync.php.
$productLinkField |
Definition at line 34 of file website_attribute_sync.php.
$productRepository = $objectManager->create(ProductRepositoryInterface::class) |
Definition at line 31 of file website_attribute_sync.php.
$resourceConnection = $objectManager->get(ResourceConnection::class) |
Definition at line 32 of file website_attribute_sync.php.
Group $storeGroup = $objectManager->create(Group::class) |
Create store group
Definition at line 59 of file website_attribute_sync.php.
$storeGroupResourceModel = $objectManager->get(GroupResourceModel::class) |
Definition at line 29 of file website_attribute_sync.php.
Store $storeOne = $objectManager->create(Store::class) |
Create Stores
Definition at line 75 of file website_attribute_sync.php.
$storeResourceModel = $objectManager->get(StoreResourceModel::class) |
Definition at line 30 of file website_attribute_sync.php.
$stores |
Definition at line 95 of file website_attribute_sync.php.
Store $storeTwo = $objectManager->create(Store::class) |
Definition at line 89 of file website_attribute_sync.php.
$website = $objectManager->create(Website::class) |
Definition at line 45 of file website_attribute_sync.php.
$websiteResourceModel = $objectManager->get(WebsiteResourceModel::class) |
Definition at line 28 of file website_attribute_sync.php.