Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Variables
assign_products_to_websites.php File Reference

Go to the source code of this file.

Variables

 $objectManager = Bootstrap::getObjectManager()
 
 $websiteRepository = $objectManager->get(WebsiteRepositoryInterface::class)
 
 $websiteCodes = ['eu_website', 'us_website', 'global_website']
 
 $websiteIds = []
 
foreach($websiteCodes as $websiteCode) $skus = ['SKU-1', 'SKU-2', 'SKU-3', 'SKU-4']
 
 $productRepository = $objectManager->get(ProductRepositoryInterface::class)
 

Variable Documentation

◆ $objectManager

$objectManager = Bootstrap::getObjectManager()

Definition at line 12 of file assign_products_to_websites.php.

◆ $productRepository

$productRepository = $objectManager->get(ProductRepositoryInterface::class)

Definition at line 25 of file assign_products_to_websites.php.

◆ $skus

foreach ( $websiteCodes as $websiteCode) $skus = ['SKU-1', 'SKU-2', 'SKU-3', 'SKU-4']

Definition at line 23 of file assign_products_to_websites.php.

◆ $websiteCodes

$websiteCodes = ['eu_website', 'us_website', 'global_website']

Definition at line 16 of file assign_products_to_websites.php.

◆ $websiteIds

$websiteIds = []

Definition at line 17 of file assign_products_to_websites.php.

◆ $websiteRepository

$websiteRepository = $objectManager->get(WebsiteRepositoryInterface::class)

Definition at line 15 of file assign_products_to_websites.php.