How do you obtain customer information in a JavaScript module?
Magento does not expose customer information in JavaScript for security reasons
By sending an AJAX request to the url: /customer/account/info/?json=1
By using customerData.get(‘customer’) call, where customerData is an instance of Magento_Customer/js/customer-data
Customer information is available in localStorage and be retrieved by calling window.localStorage.getItem(‘customer’)
A merchant sells shoes with multiple variations such as a color and size. A shoe is represented by a configurable product. There are seven different colors and four sizes.
What is the minimal amount of simple products that represent a combination of color and size needs to be created in order to make a shoe salable?
Each color and size must have at least one representation, so a minimum of seven products is needed
One simple product that represents a combination of color and size is enough
A product may be purchased even without any combination available. The color and size may be adjusted during order fulfillment
A simple product for every combination must be created
You are developing a module and need to add another column to a table introduced by another module MyCompany_MyModule via db schema.
How do you do that?
Create a etc/db_schema.xml file in your module, add the column and run bin/magento setup:upgrade
Create a etc/db.xml file in your module, add the column and run bin/magento setup:db-schema:upgrade
Run a command: bin/magento setup:db-schema:upgrade