Deck 4: Magento 2 Certified Associate Developer

Full screen (f)
exit full mode
Question
A merchant tasked you to add an input field for notes to the Customer Account Information backend page. Which three actions do you specify in a module's Data Patch to add a customer notes attribute? (Choose three.)

A) $cache->clean(['eav', 'db_ddl']);
B) $customerSetup->addAttribute('customer', 'notes', $options);
C) $customerSetup->getConnection()->addColumn('customer_entity', 'notes', $columnSpecs);
D) $notesAttribute->setData('used_in_forms', ['adminhtml_customer']);
E) $customerSetup->addAttributeToSet('customer', $attributeSetIdCustomer, $groupId, 'notes');
Use Space or
up arrow
down arrow
to flip the card.
Question
How can you access the select query of a collection?

A) You can only access the select query after the collection has been loaded by calling the public method query()
B) It is stored in a protected variable $query and can only be accessed from the inside of a collection class
C) You can get it by using public method getSelect() which returns an instance of Magento\Framework\DB\Select
D) The select query is not available in the collection class, it will be generated by the MySQL adapter right before executing a query
Question
What is a valid use case for an around plugin?

A) The execution of the pluginized method must be suppressed
B) The arguments of the before plugins must be modified The arguments of the before plugins must be modified
C) The arguments of the after plugins must be modified after
D) The execution of the before and after plugins must be suppressed The execution of the and plugins must be suppressed
Question
You have to install a new module on the production environment. All the module is adding a new product attribute. You enabled maintenance mode, copied the module code, run bin/magento setup:upgrade and disabled maintenance mode. What two risks does this process pose? (Choose two.)

A) It will clean all caches which will cause a performance degradation
B) The new attribute will be invisible on the storefront until the cache is cleaned manually
C) It will void all active sessions
D) It will clean static assets from the pub/static folder It will clean static assets from the pub/static folder
Question
A third-party module uses a layout update that changes the template path for a core block from product/view/addto/compare.phtml of the Magento_Catalog module to custom/view/addto/compare.phtml of your custom module. The merchant has a customized version of this template in their custom theme. What is a consequence of this setup?

A) If the custom module is removed, the custom template will no longer apply
B) This setup will throw an IllegalStateException This setup will throw an IllegalStateException
C) If a preference for the core block is set, the template will no longer apply
D) If another module is installed which also customizes the same core template, the templates will be rendered sequentially
Question
You are adding a child node to the product.info block using the XML: <strong>You are adding a child node to the product.info block using the XML:   How will this block be rendered?</strong> A) Child block nodes are automatically rendered as HTML B) By calling $block->getChildHtml('mynewblock') in the parent block's template C) The layout is invalid since block elements cannot be nested D) Automatically if the block class Custom implements the _toHtml method <div style=padding-top: 35px> How will this block be rendered?

A) Child block nodes are automatically rendered as HTML
B) By calling $block->getChildHtml('mynewblock') in the parent block's template
C) The layout is invalid since block elements cannot be nested
D) Automatically if the block class Custom implements the _toHtml method
Question
Magento 2's architecture uses code to bootstrap a custom module that resides in app/code. What two files are required to make a module usable? (Choose two.)

A) Helper/Data.php
B) etc/config.xml
C) etc/module.xml
D) registration.php
Question
How does Magento store customer address attribute values?

A) Customer address is a flat entity, so all values are stored in the customer_address_entity table
B) Customer address is not an entity, so its properties are customer attributes
C) Customer address is an attribute of the customer, so it doesn't have its own attributes
D) Customer address is an EAV entity, so all values are stored in the customer_address_entity table and related values tables
Question
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?

A) Create a etc/db_schema.xml file in your module, add the column and run bin/magento setup:upgrade Create a etc/db_schema.xml file in your module, add the column and run bin/magento setup:upgrade
B) Create a etc/db.xml file in your module, add the column and run bin/magento setup:db-schema:upgrade etc/db.xml file in your module, add the column and run bin/magento setup:db-schema:upgrade
C) Run a command: bin/magento setup:db-schema:upgrade Run a command: bin/magento setup:db-schema:upgrade

D) Create a etc/db_schema_whitelist.json file in your module, add the column and run bin/magento setup:upgrade etc/db_schema_whitelist.json file in your module, add the column and run
Question
The module MyCompany_MyModule will add a new page to the admin interface at the URL path admin/mycompany/entity_grid. How do you name the file containing the action controller class so the admin router matches the path to the class?

A) Controller/Adminhtml/Entity/Grid/Index.php
B) Controller/Adminhtml/Mycompany/Entity/Grid.php
C) Controller/Adminhtml/Entity/Grid.php
D) Controller/Adminhtml/Mycompany/Entity_Grid.php
Question
How do you pass an array ['one', 'two] as a parameter to you block using the layout XML arguments directive? <strong>How do you pass an array ['one', 'two] as a parameter to you block using the layout XML arguments directive?  </strong> A) Option A B) Option B C) Option C D) Option D <div style=padding-top: 35px>

A) Option A
B) Option B
C) Option C
D) Option D
Question
In the module located at app/code/MyCompany/MyModule there is a JS module in the file view/frontend/web/register.js . The Magento base URL is https://magento.host/ and the luma theme with the en_US locale is used. What is the public URL for this file?

A) https://magento.host/pub/static/frontend//Magento/luma/en_US/MyCompany_MyModule/js/register.js
B) https://magento.host/pub/static/frontend/Magento/luma/en_US/MyCompany_MyModule/register.js
C) https://magento.host/pub/static/frontend/Magento/luma/en_US/MyCompany_MyModule/web/register.js
D) https://magento.host/app/code/MyCompany_MyModule/view/frontend/web/register.js
Question
What is the connection between product attribute sets and categories?

A) Categories have no connection to product attribute sets, and any product can be assigned to any category
B) Each category is linked to a single product attribute set, and only products from that attribute set are allowed in the category
C) Each category is linked to a single product attribute set, and only products from that category's set or any of its parent categories' sets are allowed
D) Categories can be connected to multiple product attribute sets, and only products from one of those sets are allowed in the category
Question
Products may be accessed using SEO friendly URLs like /my-product instead of /catalog/product/view/id/{ID} How is this one?

A) An event observer adds RewriteRules to .htaccess on product save
B) Magento\Catalog\Controller\Product\View::loadByUrlKey loads product pages using the url_key attribute value
C) Using a URL Rewrite stored in the database connecting the request path with the target path
D) A plugin on \Magento\UrlRewrite\Controller\Router::match loads products by the url_key attribute
Question
Which method of a Magento resource model will remove a record from the database?

A) remove
B) erase
C) clean
D) delete
Question
What will be the result of calling the save() method on a collection instance?

A) It will save all items with one INSERT … ON DUPLICATE KEY UPDATE query
B) It will loop over all items and call save () on each one
C) It will save the select query execution result into the cache
D) It will save the select query to the cache
Question
How many shipping addresses may be selected for an order during the checkout process?

A) One shipping address per line item is possible
B) Only one shipping address per order is possible
C) One shipping address per unit of quantity is possible
D) One shipping address per product type is possible
Question
A module you are working on needs to send a newsletter to all subscribed customers at predefined intervals. Which two actions do you take to make sure the newsletter is sent? (Choose two.)

A) Implement \MyCompany\MyModule\Cron\NewsLetterSender::execute and register it in etc/crontab/di.xml Implement \MyCompany\MyModule\Cron\NewsLetterSender::execute and register it in etc/crontab/di.xml
B) Implement \MyCompany\MyModule\Cron\NewsLetterSender::execute and register it in etc/crontab/.xml etc/crontab/.xml
C) Make sure bin/magento cron:run is added to the system crontab Make sure bin/magento cron:run is added to the system crontab
D) Register the plugin for \Magento\Customer\Model\Customer::authenticate in etc/crontab.xml Register the plugin for \Magento\Customer\Model\Customer::authenticate in etc/crontab.xml
Question
\Magento\Sales\Model\Api\OrderRepositoryInterface::getList accepts a SearchCriteriaInterface to filter and sort information. What class assists in creating an instance for SearchCriteriaInterface?

A) \Magento\Framework\Api\SearchCriteriaFactory
B) \Magento\Framework\Api\SearchCriteriaBuilder
C) \Magento\Sales\Model\Order\SearchCriteria
D) \Magento\Backend\Api\SearchCriteriaGenerator
Question
You are setting up a brand new Magento installation for a merchant who is migrating from Magento 1 to Magento 2. Keeping in mind upgradability and the need to customize, which one do you choose?

A) Create a new Magento instance using composer create-project Create a new Magento instance using composer create-project
B) Clone the magento/magento2 GitHub repository Clone the magento/magento2 GitHub repository
C) Run php bin/magento setup:migrate command Run php bin/magento setup:migrate command
D) Create a new Magento instance by using the bin/magento install command Create a new Magento instance by using the bin/magento install
Question
You have been given the task of importing products from an external source. You decide to create a custom module to do this. The class handling the import creates a product for each record, sets the data on it and saves it to the database. What do you inject into a constructor to represent each product you create?

A) \Magento\Catalog\Model\Product
B) \Magento\Catalog\Api\Data\ProductInterfaceFactory
C) \Magento\Catalog\Api\Data\ProductInterface
D) \Magento\Catalog\Model\ProductBuilder
Question
You added a new constructor argument to an existing action controller class. When you reload the page you get a PHP error that the wrong argument is passed to the class. How do you fix this?

A) Clean the page cache
B) Deploy static content
C) Clean the /generated/ folder Clean the /generated/ folder
D) Clean the config cache
Question
A custom module must make changes to the schema following each setup:upgrade run. This must be done after all other module's schema updates have been applied. How is this accomplished?

A) Write a plugin intercepting \Magento\Setup\Model\Installer::handleDBSchemaData Write a plugin intercepting \Magento\Setup\Model\Installer::handleDBSchemaData
B) Create an UpgradeSchemaAfter class which implements InstallSchemaInterface Create an UpgradeSchemaAfter class which implements InstallSchemaInterface
C) Update the module's setup_priority in etc/modules.xml Update the module's setup_priority in etc/modules.xml
D) Create a Recurring class which implements InstallSchemaInterface Create a Recurring
Question
Your module adds a new controller class which will return a JSON response. What will be the return type of the execute method?

A) You should implement a new API endpoint instead of returning JSON from a controller
B) The string value of \Zend_Json::encode() The string value of \Zend_Json::encode()
C) An instance of \Magento\Framework\Controller\Result\Json An instance of \Magento\Framework\Controller\Result\Json
D) No return needed, an object that can be converted to JSON must be set as the Response body
Question
Which entity in Magento supports scoped attributes?

A) Customer
B) CMS Page
C) Category
D) Customer Address
Question
You are creating a new page layout for your custom module. What is the primary difference between container and block elements?

A) They extend different abstract classes
B) A container's children are rendered automatically
C) Only containers can be removed by name or alias
D) A block's position within the layout can be altered
Question
You have loaded an instance of Magento\Catalog\Model\Product in the $product variable. You know that the loaded product has the type configurable with four variations. These variations have the prices: $10, $12, $12, $15. What will be the result of the $product->getFinalPrice() call?

A) [10, 12, 15]
B) 10
C) [10, 12, 12, 15]
D) 15
Question
You need to find all orders in the processing state. You have written the code: <strong>You need to find all orders in the processing state. You have written the code:   When you run the code, you get the following exception:   How do you resolve the exception?</strong> A) Specify a preference in di.xml to map SearchCriteriaBuilder to SearchCriteriaInterface B) Use dependency injection to load an instance of the SearchCriteria class C) Change the getList parameter to: $searchCriteriaBuilder->addFilter('state', 'processing')->create() D) Clear generated code to get a new version of SearchCriteriaBuilder <div style=padding-top: 35px> When you run the code, you get the following exception: <strong>You need to find all orders in the processing state. You have written the code:   When you run the code, you get the following exception:   How do you resolve the exception?</strong> A) Specify a preference in di.xml to map SearchCriteriaBuilder to SearchCriteriaInterface B) Use dependency injection to load an instance of the SearchCriteria class C) Change the getList parameter to: $searchCriteriaBuilder->addFilter('state', 'processing')->create() D) Clear generated code to get a new version of SearchCriteriaBuilder <div style=padding-top: 35px> How do you resolve the exception?

A) Specify a preference in di.xml to map SearchCriteriaBuilder to SearchCriteriaInterface
B) Use dependency injection to load an instance of the SearchCriteria class
C) Change the getList parameter to: $searchCriteriaBuilder->addFilter('state', 'processing')->create()
D) Clear generated code to get a new version of SearchCriteriaBuilder
Question
A module you are developing requires the addition of new routes that should be accessible in the store front. Where do you define your module's frontName?

A) etc/frontend/routes.xml
B) etc/frontend/config.xml
C) etc/config.xml
D) etc/routes.xml
Question
How do you set the custom block MyCompany\MyModule\Block\A as a child for the block named product.info using layout XML?

A) <strong>How do you set the custom block MyCompany\MyModule\Block\A as a child for the block named product.info using layout XML?</strong> A)   B)   C)   D)   <div style=padding-top: 35px>
B) <strong>How do you set the custom block MyCompany\MyModule\Block\A as a child for the block named product.info using layout XML?</strong> A)   B)   C)   D)   <div style=padding-top: 35px>
C) <strong>How do you set the custom block MyCompany\MyModule\Block\A as a child for the block named product.info using layout XML?</strong> A)   B)   C)   D)   <div style=padding-top: 35px>
D) <strong>How do you set the custom block MyCompany\MyModule\Block\A as a child for the block named product.info using layout XML?</strong> A)   B)   C)   D)   <div style=padding-top: 35px>
Question
You have created a custom module which must perform an action immediately after an order is placed, but only on the store front of the merchant site. You have selected the checkout_submit_all_after as the target event which the module will observe. In which file will the event observer be declared?

A) etc/frontend.xml
B) etc/events.xml
C) etc/config.xml
D) etc/frontend/events.xml
Question
Which two tasks are supported by Magento CLI? (Choose two.)

A) Customer password reset
B) Clearing cache
C) Codebase deployment from developer machine to staging server
D) Administrator account creation
Question
Your module, MyCompany_MyModule, is using the frontName mymodule. You need to locate the class responsible for the frontend path /mymodule/custom. What file contains the controller class for the frontend path /mymodule/custom?

A) Controller/Custom/Index.php
B) Controller/Custom.php
C) Controller/MyModule/Custom/Index.php
D) Controller/Frontend/MyModule/Custom.php
Question
Which three scopes can be used to set different System Configuration values in Magento? (Choose three.)

A) Language
B) Area
C) Store View
D) Store
E) Website
Question
You are working on a project that contains a million SKUs. The merchant has requested the product view page to have a custom color schema and page layout depending on the product price range. How do you implement this, keeping simplicity in mind?

A) Create a custom block which will dynamically choose the appropriate template
B) Specify custom layout update XML in the admin panel for every product
C) Write a Data Patch which will set the appropriate layout update XML for every product record
D) Enable the dynamic product page UI component and configure it to use a different layout per price range
Question
While developing a module you need to modify an existing Data Patch. How can you force Magento to execute an existing Data Patch file again?

A) By removing the Data Patch, running the command: bin/magento setup:db-data:upgrade , then copying the file back and running the command again By removing the Data Patch, running the command: bin/magento setup:db-data:upgrade , then copying the file back and running the command again
B) By deleting the record with the Data Patch class name from the table patch_list table By deleting the record with the Data Patch class name from the table patch_list table
C) By changing the version of the Data Patch in the getVersion method By changing the version of the Data Patch in the getVersion method
D) By modifying the data_version value in the setup_module table By modifying the data_version value in the setup_module
Question
You want to declare a block of the type \Magento\Framework\View\Element\Template with a template named view.phtml in the layout XML. What is the correct layout declaration for this?

A) <strong>You want to declare a block of the type \Magento\Framework\View\Element\Template with a template named view.phtml in the layout XML. What is the correct layout declaration for this?</strong> A)   B)   C)   D)   <div style=padding-top: 35px>
B) <strong>You want to declare a block of the type \Magento\Framework\View\Element\Template with a template named view.phtml in the layout XML. What is the correct layout declaration for this?</strong> A)   B)   C)   D)   <div style=padding-top: 35px>
C) <strong>You want to declare a block of the type \Magento\Framework\View\Element\Template with a template named view.phtml in the layout XML. What is the correct layout declaration for this?</strong> A)   B)   C)   D)   <div style=padding-top: 35px>
D) <strong>You want to declare a block of the type \Magento\Framework\View\Element\Template with a template named view.phtml in the layout XML. What is the correct layout declaration for this?</strong> A)   B)   C)   D)   <div style=padding-top: 35px>
Question
You are working on a new entity called vendor. You implemented the model, resource model and collection. You want to ensure that standard model events will be fired for your model, so an observer can be created for the events vendor_save_after, vendor_save_commit_after and others. How do you do that?

A) Create an entry in etc/di.xml and add the argument eve ntPrefix with the value of vendor Create an entry in etc/di.xml and add the argument eve ntPrefix with the value of vendor
B) Declare the $_eventPrefix property in your vendor model and set it to vendor Declare the $_eventPrefix property in your vendor model and set it to
C) You must implement all appropriate methods and fire the events manually
D) Ensure that the primary key in the corresponding table is named vendor_id Ensure that the primary key in the corresponding table is named vendor_id
Question
A merchant is interested in setting different prices for the same products in different store scopes. What do you reply to this inquiry?

A) The prices can only be scoped per website or globally The prices can only be scoped per website or globally
B) The prices can be scoped per store The prices can be scoped per
C) The price scope can be set to store but this will lead to performance degradation of category pages The price scope can be set to but this will lead to performance degradation of category pages
D) The prices do not support scopes
Question
What order operation is available in the My Account section in the storefront?

A) Edit order
B) Refund
C) Reorder
D) Invoice
Question
What is the difference between online and offline shipping methods?

A) Online means that a shipment will have a tracking number, and offline means no tracking numbers are available
B) Online means Magento will use a shipping carrier's API to obtain rates, offline means Magento will calculate the rates internally
C) Online means that an item's shipping will be processed by the merchant, offline means that it will be processed by the customer
D) Online means that it will be sent to the customer using a shipping carrier, offline means the customer will pick up the order in person
Question
A merchant asks you to extend customer functionality to allow customer accounts to be associated with two or more billing addresses. How is this implemented?

A) By adding the attribute like customer_address_billing2 and customizing both My Account and Checkout functionality to use that new attribute
B) By changing the System Configuration setting: Customer>Allow multiple billing addresses to Yes
C) By altering the customer_entity table, adding the field billing_address2, and customizing both My Account and Checkout functionality to use that new field
D) This is out-of-the box functionality
Question
What is the relationship between products and categories in Magento?

A) Products may be assigned to zero or more categories
B) Product to category relation is dynamically defined by Catalog Product Rules
C) Each product belongs to zero or one category
D) Each product always belongs to one category
Question
How do you add a new link into the My Account sidebar?

A) By creating a new UI component
B) By creating a child of the My Account UI component
C) By adding the new section into the customer_account table in the database
D) By using a layout update
Question
You are working on a custom web API endpoint and have configured it in etc/webapi.xml. This config is cached as part of the config_webservice cache type. Keeping performance in mind, how do you refresh the cached version of this config using Magento CLI?

A) cache:clean config_webservice
B) cache:refresh config_webservice
C) cache:flush
D) cache:purge
Question
You have added a new attribute origin of the type varchar to the product entity. Which two calls will filter a product collection with origin set to "California"? (Choose two.)

A) $collection->addFieldToFilter('origin', "California");
B) $collection->addAttributeToSelect('origin', "California");
C) $collection->joinAttribute('origin', 'catalog_product/origin', 'origin', 'California");
D) $collection->addAttributeToFilter('origin', "California");
Question
A custom module needs to log all calls of \Magento\Customer\Api\AddressRepositoryInterface::save(). Which mechanism do you use?

A) An observer on the customer_address_repository_save event, which is automatically fired for every repository save
B) A proxy configured to intercept all calls to any public method and log them
C) An extension attribute configured in the extension_attributes.xml
D) A plugin declared for the save() method
Question
A merchant gives you the module MyCompany_MyModule to install. How do you identify which REST endpoints are supported by the module?

A) REST endpoints are declared in etc/webapi_rest/di.xml REST endpoints are declared in etc/webapi_rest/di.xml
B) Every public method of every interface in the Api folder automatically is exposed as a REST endpoint
C) REST endpoints are declared in etc/rest.xml etc/rest.xml
D) REST endpoints are declared in etc/webapi.xml etc/webapi.xml
Question
Assume that $collection is a new instance of a class that extends Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection, and $ids is an array of ids. How do you select a list of records from the database where the record ids are in the $ids list?

A) $collection->addFieldToFilter('record_id',['in'=>$ids]);
B) <strong>Assume that $collection is a new instance of a class that extends Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection, and $ids is an array of ids. How do you select a list of records from the database where the record ids are in the $ids list?</strong> A) $collection->addFieldToFilter('record_id',['in'=>$ids]); B)   C) $collection->in($ids); D) $collection->filterIn($ids); <div style=padding-top: 35px>
C) $collection->in($ids);
D) $collection->filterIn($ids);
Question
You are building a report using complex SQL aggregations to locate the required data. In what type of class do you put these SQL statements?

A) Resource model
B) Repository
C) Model
D) Helper
Question
Magento allows you to specify custom values per store for product attributes created in the admin panel. Which architectural pattern makes it possible?

A) Store Manager
B) Extension Attribute
C) Entity Attribute Value
D) Dependency Injection
Question
You have configured an event observer to watch the checkout_submit_all_after event using this XML: <strong>You have configured an event observer to watch the checkout_submit_all_after event using this XML:   What is the required class definition for the event observer?</strong> A)   B)   C)   D)   <div style=padding-top: 35px> What is the required class definition for the event observer?

A) <strong>You have configured an event observer to watch the checkout_submit_all_after event using this XML:   What is the required class definition for the event observer?</strong> A)   B)   C)   D)   <div style=padding-top: 35px>
B) <strong>You have configured an event observer to watch the checkout_submit_all_after event using this XML:   What is the required class definition for the event observer?</strong> A)   B)   C)   D)   <div style=padding-top: 35px>
C) <strong>You have configured an event observer to watch the checkout_submit_all_after event using this XML:   What is the required class definition for the event observer?</strong> A)   B)   C)   D)   <div style=padding-top: 35px>
D) <strong>You have configured an event observer to watch the checkout_submit_all_after event using this XML:   What is the required class definition for the event observer?</strong> A)   B)   C)   D)   <div style=padding-top: 35px>
Question
What happens when a category's is_anchor attribute is set to 1?

A) Products without a specified category will be associated with this category
B) The customer will see all products from all children of the category
C) This is the default category for a website
D) The category will always be visible in the menu
Question
A merchant requires the ability to configure contact information for their brick and mortar stores as a CSV file upload. The module already exists and contains an etc/adminhtml/system.xml file where the new field can be added. How do you specify the class that will process the uploaded file?

A) \Magento\Config\Model\Config\Upload\File
B) \Magento\Config\Model\Config\Frontend\File
C) \Magento\Config\Model\Config\Backend\File
D) \Magento\Config\Model\Config\Source\File
Question
You are tasked with ensuring customers who log into the site are authorized. By default, this consists of ensuring the customers email and password match the values in the database. On this project, you need to verify additional data in this process. Keeping in mind upgradeability, how is this done?

A) Create a before plugin for \Magento\Customer\Api\AccountManagementInterface's authenticate method
B) Create a mutation of a CustomerInterface object to intercept the username and password
C) Create an event observer for the user_save_after observer
D) Override \Magento\Customer\Controller\AccountController.php
Question
What is the connection between product attribute sets and categories?

A) Categories have no connection to product attribute sets, and any product can be assigned to any category
B) Each category is linked to a single product attribute set, and only products from that attribute set are allowed in the category
C) Each category is linked to a single product attribute set, and only products from that category's set or any of its parent categories'
D) Categories can be connected to multiple product attribute sets, and only products from one of those sets are allowed in the category
Question
There are two different configurable products which both share one variation. The shared variation is represented by the same simple product. A customer added both configurables to the cart with the same selected variation? How will they be displayed?

A) As two separate line items with quantity 1 each
B) As one line item which lists both configurable products with quantity 1 each
C) As one line item of the first product with quantity 2
D) As one line item of the second product with quantity 2
Question
You have created a new section in system configuration under the Catalog tab: <strong>You have created a new section in system configuration under the Catalog tab:   How do you restrict an access to the section using Magento ACL?</strong> A)   B)   C)   D)   <div style=padding-top: 35px> How do you restrict an access to the section using Magento ACL?

A) <strong>You have created a new section in system configuration under the Catalog tab:   How do you restrict an access to the section using Magento ACL?</strong> A)   B)   C)   D)   <div style=padding-top: 35px>
B) <strong>You have created a new section in system configuration under the Catalog tab:   How do you restrict an access to the section using Magento ACL?</strong> A)   B)   C)   D)   <div style=padding-top: 35px>
C) <strong>You have created a new section in system configuration under the Catalog tab:   How do you restrict an access to the section using Magento ACL?</strong> A)   B)   C)   D)   <div style=padding-top: 35px>
D) <strong>You have created a new section in system configuration under the Catalog tab:   How do you restrict an access to the section using Magento ACL?</strong> A)   B)   C)   D)   <div style=padding-top: 35px>
Question
You are debugging a problem resulting from a recently deployed around plugin. The plugin is intercepting the doSomething method. The aroundDoSomething plugin method is called successfully, but the original doSomething method is no longer being executed as expected. What is causing this?

A) The sort order of the plugin is too high and supersedes the priority of the intercepted method
B) The plugin implementation returned something other than its callable argument
C) The plugin implementation is skipping the execution of its callable argument
D) The plugin implementation overlooked using the AbstractPlugin parent class
Question
How do you persist an entity to the database?

A) Calling the store() method on the entity's model
B) Calling the update() method on the entity's collection
C) Calling the persist() method on the entity's repository
D) Calling the save() method on the entity's repository
Question
Assume that a customer's cart only includes one downloadable product. What effect will it cause on the quote object?

A) The quote object will have a downloadable URL instead of an address
B) The quote object will not have shipping address
C) The quote object will not have any address
D) The quote object will not have a billing address
Question
You are working on a jewelry store that sells rings. Each ring allows an adjustment in size. The customer specifies finger size in inches and the merchant physically adjusts the stocked ring to the required size. How is this represented in Magento?

A) Using custom options, with rings as simple products
B) Using categories, with each ring size as a separate product
C) Using configurable products, with ring size as an attributive value
D) Using custom options, with rings as bundle products
Question
In layout files you can change al element's order on a page. This can be done using one of the following: instruction before and after element attributes? How are two methods different?

A) They are the same, both provide access to the same functionality
B) Elements are renamed by default when using the move instruction
C) The move instruction allows altering an element's parent node
D) Before and after attributes can only be used with referenceContainer and referenceBlock
Question
You need to add a new text attribute to all products in the Magento store. When this attribute is displayed on the product page, its values must be different depending on the selected language. Keeping simplicity in mind, how do you add this attribute?

A) Use the Magento CLI to create a new custom attribute, then generate dictionaries for all supported languages
B) Use a Data Patch to create a new EAV attribute
C) Add a new column to the catalog_product_entity table using declarative schema Add a new column to the catalog_product_entity table using declarative schema
D) Use the admin panel to create a new extension attribute
Question
You got a notification about error that occurred on a production environment. The merchant gave you the error identifier. How do you find the error message based on the identifier?

A) An error is written to the var/log/exception.log file including the identifier An error is written to the var/log/exception.log file including the identifier
B) The error is sent to the pre-configured error email with the identifier in the subject
C) A file with a name matching the identifier is written to the var/report folder A file with a name matching the identifier is written to the var/report folder
D) An error message is written to the database table error_log with an error_id field matching the identifier An error message is written to the database table error_log with an error_id field matching the identifier
Question
You are adding a new menu item to the admin backend which will link to a custom backend page. The declaration of the route: <strong>You are adding a new menu item to the admin backend which will link to a custom backend page. The declaration of the route:   What do you specify as the menu item action attribute value so it links to /admin/mycompany/mymodule/?</strong> A) action=adminhtml/mycompany/mymodule/ B) action=admin/mycompany/mymodule/ C) It is not possible without extending the adminhtml route in routes.xml D) action=mycompany/mymodule/ <div style=padding-top: 35px> What do you specify as the menu item action attribute value so it links to /admin/mycompany/mymodule/?

A) action="adminhtml/mycompany/mymodule/"
B) action="admin/mycompany/mymodule/"
C) It is not possible without extending the adminhtml route in routes.xml
D) action="mycompany/mymodule/"
Question
During a code review of a module MyCompany_PaymentCurrencies you see a configuration field declared in the file etc/adminhtml/system.xml: <strong>During a code review of a module MyCompany_PaymentCurrencies you see a configuration field declared in the file etc/adminhtml/system.xml:   What is the consequence of the attribute showInStore being set to 0?</strong> A) The field value will not be accessible on the store front by calling ScopeConfigInterface::getValue() with a $scopeType argument of 'store'. B) The input field will not be visible if a store view scope is selected in the system configuration C) The input field will only be visible if a website's default store scope is selected in the system configuration D) The input field will be disabled if a store view scope is selected in the system configuration <div style=padding-top: 35px> What is the consequence of the attribute showInStore being set to 0?

A) The field value will not be accessible on the store front by calling ScopeConfigInterface::getValue() with a $scopeType argument of 'store'.
B) The input field will not be visible if a store view scope is selected in the system configuration
C) The input field will only be visible if a website's default store scope is selected in the system configuration
D) The input field will be disabled if a store view scope is selected in the system configuration
Question
You added a plugin declaration to MyCompany/MyModule/etc/di.xml: <strong>You added a plugin declaration to MyCompany/MyModule/etc/di.xml:   What will be the effect of this declaration?</strong> A) An exception because plugins must not be applied to the interfaces B) An exception because of the syntax error in the declaration C) The plugin will be ignored because ActionInterface will never be instantiated directly D) The plugin will be applied to all implementors of the ActionInterface <div style=padding-top: 35px> What will be the effect of this declaration?

A) An exception because plugins must not be applied to the interfaces
B) An exception because of the syntax error in the declaration
C) The plugin will be ignored because ActionInterface will never be instantiated directly
D) The plugin will be applied to all implementors of the ActionInterface
Question
You have been asked to display details from the customer's latest order on the customer's account dashboard (customer/account/). You create a new custom template to show the information. How do you obtain an order repository so you can fetch an order?

A) Create a view model and specify an OrderRepositoryInterface argument in the _construct method
B) In your template, add the following: $orderRepository=ObjectManager::getInstance()->get(OrderRepositoryInterface::class);
C) In your block, add a method with the following: return ObjectManager::getInstance()->get(OrderRepositoryInterface::class);
D) $orderRepository = new OrderRepository();
Question
How can you render a text on a page using only layout xml?

A) <strong>How can you render a text on a page using only layout xml?</strong> A)   B)   C)   D)   <div style=padding-top: 35px>
B) <strong>How can you render a text on a page using only layout xml?</strong> A)   B)   C)   D)   <div style=padding-top: 35px>
C) <strong>How can you render a text on a page using only layout xml?</strong> A)   B)   C)   D)   <div style=padding-top: 35px>
D) <strong>How can you render a text on a page using only layout xml?</strong> A)   B)   C)   D)   <div style=padding-top: 35px>
Question
How do you obtain customer information in a JavaScript module?

A) Magento does not expose customer information in JavaScript for security reasons
B) By sending an AJAX request to the url: /customer/account/info/?json=1
C) By using customerData.get('customer') call, where customerData is an instance of Magento_Customer/js/customer-data
D) Customer information is available in localStorage and be retrieved by calling window.localStorage.getItem('customer')
Question
You are reviewing a theme in app/design/frontend/MyCompany/MyTheme and see the file etc/view.xml. What is the function of this file?

A) It configures Grunt to compile assets for the theme
B) It stores theme and image configuration values
C) It specifies the applicable CSS files for the theme
D) It informs Magento that the theme is present and available for use
Question
In a code review of a merchant's site you have discovered that there are multiple observers for the checkout_submit_all_after event. After closer inspection, you notice one of these observers is relying on the others being executed before it is called. What risk does this pose, and how can it be mitigated?

A) There is no risk posed as long as each event observer specifies a correct sortOrder. Nothing needs to be changed.
B) Event observers are fired in alphabetical order of the observer name. There is no risk here.
C) Magento only supports one observer per event. These observers will need to be combined into a single point of customization.
D) Order of listener execution cannot be guaranteed, resulting in a fragile implementation. This code should be re-worked using plugins
Question
Where do you change the frontName for the admin router?

A) app/etc/config.xml
B) app/etc/env.php
C) app/etc/local.xml
D) composer.json
Question
Which two ways does Magento persist category relationships in the database? (Choose two.)

A) Using slash-separated values in the path field
B) in the table catalog_category_index
C) in the parent_id field
D) Using comma-separated values in the parent-ids field
Question
In the module located at app/code/MyCompany/MyModule there is a JS module in the file view/frontend/web/register.js . The Magento base URL is https://magento.host/ and the luma theme with the en_US locate is used. What is the public URL for this file?

A) https://magento.host/pub/static/frontend//Magento/luma/en_US/MyCompany_MyModule/js/register.js
B) https://magento.host/pub/static/frontend/Magento/luma/en_US/MyCompany_MyModule/register.js
C) https://magento.host/pub/static/frontend/Magento/luma/en_US/MyCompany_MyModule/web/register.js
D) https://magento.host/app/code/MyCompany_MyModule/view/frontend/web/register.js
Question
You have created a new block and will be adding this block on every page. The block contains user-specific information and cannot be cached. The block is added to the default.xml with: <strong>You have created a new block and will be adding this block on every page. The block contains user-specific information and cannot be cached. The block is added to the default.xml with:   What does this accomplish?</strong> A) The block will be loaded on the store front using AJAX B) FPC will cache the block content for all cacheable pages C) FPC will be bypassed for this block and all other page content will be cached D) All store front pages are no longer cacheable <div style=padding-top: 35px> What does this accomplish?

A) The block will be loaded on the store front using AJAX
B) FPC will cache the block content for all cacheable pages
C) FPC will be bypassed for this block and all other page content will be cached
D) All store front pages are no longer cacheable
Question
What scopes are available for customer attributes?

A) Global only
B) Website only
C) Global and Website
D) Global, Website and Store
Question
You are tasked to install an extension to the merchant's Magento instance. The extension is developed by the company called MyCompany and its codebase is available from all four locations listed below. Which two installations options do you choose from to prevent version conflicts during upgrade? (Choose two.)

A) Clone the code from GitHub and put it into the vendor directory
B) Download the extension code from the developer's website, and put it into app/code
C) Use Magento web setup wizard to pull the code from Magento's composer repository
D) Use composer CLI to pull the code from MyCompany's repository
Question
You are reviewing a Magento module and see a directory named Service. What can you determine from this directory's name?

A) It is where the API response cache is stored
B) It is where API-related configuration resides
C) It is where the module's service contracts are stored
D) You need to review the files in this folder to understand its purpose
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/102
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 4: Magento 2 Certified Associate Developer
1
A merchant tasked you to add an input field for notes to the Customer Account Information backend page. Which three actions do you specify in a module's Data Patch to add a customer notes attribute? (Choose three.)

A) $cache->clean(['eav', 'db_ddl']);
B) $customerSetup->addAttribute('customer', 'notes', $options);
C) $customerSetup->getConnection()->addColumn('customer_entity', 'notes', $columnSpecs);
D) $notesAttribute->setData('used_in_forms', ['adminhtml_customer']);
E) $customerSetup->addAttributeToSet('customer', $attributeSetIdCustomer, $groupId, 'notes');
$cache->clean(['eav', 'db_ddl']);
$customerSetup->addAttribute('customer', 'notes', $options);
$notesAttribute->setData('used_in_forms', ['adminhtml_customer']);
2
How can you access the select query of a collection?

A) You can only access the select query after the collection has been loaded by calling the public method query()
B) It is stored in a protected variable $query and can only be accessed from the inside of a collection class
C) You can get it by using public method getSelect() which returns an instance of Magento\Framework\DB\Select
D) The select query is not available in the collection class, it will be generated by the MySQL adapter right before executing a query
You can get it by using public method getSelect() which returns an instance of Magento\Framework\DB\Select
3
What is a valid use case for an around plugin?

A) The execution of the pluginized method must be suppressed
B) The arguments of the before plugins must be modified The arguments of the before plugins must be modified
C) The arguments of the after plugins must be modified after
D) The execution of the before and after plugins must be suppressed The execution of the and plugins must be suppressed
The execution of the before and after plugins must be suppressed The execution of the and plugins must be suppressed
4
You have to install a new module on the production environment. All the module is adding a new product attribute. You enabled maintenance mode, copied the module code, run bin/magento setup:upgrade and disabled maintenance mode. What two risks does this process pose? (Choose two.)

A) It will clean all caches which will cause a performance degradation
B) The new attribute will be invisible on the storefront until the cache is cleaned manually
C) It will void all active sessions
D) It will clean static assets from the pub/static folder It will clean static assets from the pub/static folder
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
5
A third-party module uses a layout update that changes the template path for a core block from product/view/addto/compare.phtml of the Magento_Catalog module to custom/view/addto/compare.phtml of your custom module. The merchant has a customized version of this template in their custom theme. What is a consequence of this setup?

A) If the custom module is removed, the custom template will no longer apply
B) This setup will throw an IllegalStateException This setup will throw an IllegalStateException
C) If a preference for the core block is set, the template will no longer apply
D) If another module is installed which also customizes the same core template, the templates will be rendered sequentially
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
6
You are adding a child node to the product.info block using the XML: <strong>You are adding a child node to the product.info block using the XML:   How will this block be rendered?</strong> A) Child block nodes are automatically rendered as HTML B) By calling $block->getChildHtml('mynewblock') in the parent block's template C) The layout is invalid since block elements cannot be nested D) Automatically if the block class Custom implements the _toHtml method How will this block be rendered?

A) Child block nodes are automatically rendered as HTML
B) By calling $block->getChildHtml('mynewblock') in the parent block's template
C) The layout is invalid since block elements cannot be nested
D) Automatically if the block class Custom implements the _toHtml method
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
7
Magento 2's architecture uses code to bootstrap a custom module that resides in app/code. What two files are required to make a module usable? (Choose two.)

A) Helper/Data.php
B) etc/config.xml
C) etc/module.xml
D) registration.php
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
8
How does Magento store customer address attribute values?

A) Customer address is a flat entity, so all values are stored in the customer_address_entity table
B) Customer address is not an entity, so its properties are customer attributes
C) Customer address is an attribute of the customer, so it doesn't have its own attributes
D) Customer address is an EAV entity, so all values are stored in the customer_address_entity table and related values tables
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
9
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?

A) Create a etc/db_schema.xml file in your module, add the column and run bin/magento setup:upgrade Create a etc/db_schema.xml file in your module, add the column and run bin/magento setup:upgrade
B) Create a etc/db.xml file in your module, add the column and run bin/magento setup:db-schema:upgrade etc/db.xml file in your module, add the column and run bin/magento setup:db-schema:upgrade
C) Run a command: bin/magento setup:db-schema:upgrade Run a command: bin/magento setup:db-schema:upgrade

D) Create a etc/db_schema_whitelist.json file in your module, add the column and run bin/magento setup:upgrade etc/db_schema_whitelist.json file in your module, add the column and run
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
10
The module MyCompany_MyModule will add a new page to the admin interface at the URL path admin/mycompany/entity_grid. How do you name the file containing the action controller class so the admin router matches the path to the class?

A) Controller/Adminhtml/Entity/Grid/Index.php
B) Controller/Adminhtml/Mycompany/Entity/Grid.php
C) Controller/Adminhtml/Entity/Grid.php
D) Controller/Adminhtml/Mycompany/Entity_Grid.php
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
11
How do you pass an array ['one', 'two] as a parameter to you block using the layout XML arguments directive? <strong>How do you pass an array ['one', 'two] as a parameter to you block using the layout XML arguments directive?  </strong> A) Option A B) Option B C) Option C D) Option D

A) Option A
B) Option B
C) Option C
D) Option D
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
12
In the module located at app/code/MyCompany/MyModule there is a JS module in the file view/frontend/web/register.js . The Magento base URL is https://magento.host/ and the luma theme with the en_US locale is used. What is the public URL for this file?

A) https://magento.host/pub/static/frontend//Magento/luma/en_US/MyCompany_MyModule/js/register.js
B) https://magento.host/pub/static/frontend/Magento/luma/en_US/MyCompany_MyModule/register.js
C) https://magento.host/pub/static/frontend/Magento/luma/en_US/MyCompany_MyModule/web/register.js
D) https://magento.host/app/code/MyCompany_MyModule/view/frontend/web/register.js
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
13
What is the connection between product attribute sets and categories?

A) Categories have no connection to product attribute sets, and any product can be assigned to any category
B) Each category is linked to a single product attribute set, and only products from that attribute set are allowed in the category
C) Each category is linked to a single product attribute set, and only products from that category's set or any of its parent categories' sets are allowed
D) Categories can be connected to multiple product attribute sets, and only products from one of those sets are allowed in the category
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
14
Products may be accessed using SEO friendly URLs like /my-product instead of /catalog/product/view/id/{ID} How is this one?

A) An event observer adds RewriteRules to .htaccess on product save
B) Magento\Catalog\Controller\Product\View::loadByUrlKey loads product pages using the url_key attribute value
C) Using a URL Rewrite stored in the database connecting the request path with the target path
D) A plugin on \Magento\UrlRewrite\Controller\Router::match loads products by the url_key attribute
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
15
Which method of a Magento resource model will remove a record from the database?

A) remove
B) erase
C) clean
D) delete
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
16
What will be the result of calling the save() method on a collection instance?

A) It will save all items with one INSERT … ON DUPLICATE KEY UPDATE query
B) It will loop over all items and call save () on each one
C) It will save the select query execution result into the cache
D) It will save the select query to the cache
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
17
How many shipping addresses may be selected for an order during the checkout process?

A) One shipping address per line item is possible
B) Only one shipping address per order is possible
C) One shipping address per unit of quantity is possible
D) One shipping address per product type is possible
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
18
A module you are working on needs to send a newsletter to all subscribed customers at predefined intervals. Which two actions do you take to make sure the newsletter is sent? (Choose two.)

A) Implement \MyCompany\MyModule\Cron\NewsLetterSender::execute and register it in etc/crontab/di.xml Implement \MyCompany\MyModule\Cron\NewsLetterSender::execute and register it in etc/crontab/di.xml
B) Implement \MyCompany\MyModule\Cron\NewsLetterSender::execute and register it in etc/crontab/.xml etc/crontab/.xml
C) Make sure bin/magento cron:run is added to the system crontab Make sure bin/magento cron:run is added to the system crontab
D) Register the plugin for \Magento\Customer\Model\Customer::authenticate in etc/crontab.xml Register the plugin for \Magento\Customer\Model\Customer::authenticate in etc/crontab.xml
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
19
\Magento\Sales\Model\Api\OrderRepositoryInterface::getList accepts a SearchCriteriaInterface to filter and sort information. What class assists in creating an instance for SearchCriteriaInterface?

A) \Magento\Framework\Api\SearchCriteriaFactory
B) \Magento\Framework\Api\SearchCriteriaBuilder
C) \Magento\Sales\Model\Order\SearchCriteria
D) \Magento\Backend\Api\SearchCriteriaGenerator
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
20
You are setting up a brand new Magento installation for a merchant who is migrating from Magento 1 to Magento 2. Keeping in mind upgradability and the need to customize, which one do you choose?

A) Create a new Magento instance using composer create-project Create a new Magento instance using composer create-project
B) Clone the magento/magento2 GitHub repository Clone the magento/magento2 GitHub repository
C) Run php bin/magento setup:migrate command Run php bin/magento setup:migrate command
D) Create a new Magento instance by using the bin/magento install command Create a new Magento instance by using the bin/magento install
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
21
You have been given the task of importing products from an external source. You decide to create a custom module to do this. The class handling the import creates a product for each record, sets the data on it and saves it to the database. What do you inject into a constructor to represent each product you create?

A) \Magento\Catalog\Model\Product
B) \Magento\Catalog\Api\Data\ProductInterfaceFactory
C) \Magento\Catalog\Api\Data\ProductInterface
D) \Magento\Catalog\Model\ProductBuilder
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
22
You added a new constructor argument to an existing action controller class. When you reload the page you get a PHP error that the wrong argument is passed to the class. How do you fix this?

A) Clean the page cache
B) Deploy static content
C) Clean the /generated/ folder Clean the /generated/ folder
D) Clean the config cache
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
23
A custom module must make changes to the schema following each setup:upgrade run. This must be done after all other module's schema updates have been applied. How is this accomplished?

A) Write a plugin intercepting \Magento\Setup\Model\Installer::handleDBSchemaData Write a plugin intercepting \Magento\Setup\Model\Installer::handleDBSchemaData
B) Create an UpgradeSchemaAfter class which implements InstallSchemaInterface Create an UpgradeSchemaAfter class which implements InstallSchemaInterface
C) Update the module's setup_priority in etc/modules.xml Update the module's setup_priority in etc/modules.xml
D) Create a Recurring class which implements InstallSchemaInterface Create a Recurring
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
24
Your module adds a new controller class which will return a JSON response. What will be the return type of the execute method?

A) You should implement a new API endpoint instead of returning JSON from a controller
B) The string value of \Zend_Json::encode() The string value of \Zend_Json::encode()
C) An instance of \Magento\Framework\Controller\Result\Json An instance of \Magento\Framework\Controller\Result\Json
D) No return needed, an object that can be converted to JSON must be set as the Response body
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
25
Which entity in Magento supports scoped attributes?

A) Customer
B) CMS Page
C) Category
D) Customer Address
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
26
You are creating a new page layout for your custom module. What is the primary difference between container and block elements?

A) They extend different abstract classes
B) A container's children are rendered automatically
C) Only containers can be removed by name or alias
D) A block's position within the layout can be altered
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
27
You have loaded an instance of Magento\Catalog\Model\Product in the $product variable. You know that the loaded product has the type configurable with four variations. These variations have the prices: $10, $12, $12, $15. What will be the result of the $product->getFinalPrice() call?

A) [10, 12, 15]
B) 10
C) [10, 12, 12, 15]
D) 15
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
28
You need to find all orders in the processing state. You have written the code: <strong>You need to find all orders in the processing state. You have written the code:   When you run the code, you get the following exception:   How do you resolve the exception?</strong> A) Specify a preference in di.xml to map SearchCriteriaBuilder to SearchCriteriaInterface B) Use dependency injection to load an instance of the SearchCriteria class C) Change the getList parameter to: $searchCriteriaBuilder->addFilter('state', 'processing')->create() D) Clear generated code to get a new version of SearchCriteriaBuilder When you run the code, you get the following exception: <strong>You need to find all orders in the processing state. You have written the code:   When you run the code, you get the following exception:   How do you resolve the exception?</strong> A) Specify a preference in di.xml to map SearchCriteriaBuilder to SearchCriteriaInterface B) Use dependency injection to load an instance of the SearchCriteria class C) Change the getList parameter to: $searchCriteriaBuilder->addFilter('state', 'processing')->create() D) Clear generated code to get a new version of SearchCriteriaBuilder How do you resolve the exception?

A) Specify a preference in di.xml to map SearchCriteriaBuilder to SearchCriteriaInterface
B) Use dependency injection to load an instance of the SearchCriteria class
C) Change the getList parameter to: $searchCriteriaBuilder->addFilter('state', 'processing')->create()
D) Clear generated code to get a new version of SearchCriteriaBuilder
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
29
A module you are developing requires the addition of new routes that should be accessible in the store front. Where do you define your module's frontName?

A) etc/frontend/routes.xml
B) etc/frontend/config.xml
C) etc/config.xml
D) etc/routes.xml
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
30
How do you set the custom block MyCompany\MyModule\Block\A as a child for the block named product.info using layout XML?

A) <strong>How do you set the custom block MyCompany\MyModule\Block\A as a child for the block named product.info using layout XML?</strong> A)   B)   C)   D)
B) <strong>How do you set the custom block MyCompany\MyModule\Block\A as a child for the block named product.info using layout XML?</strong> A)   B)   C)   D)
C) <strong>How do you set the custom block MyCompany\MyModule\Block\A as a child for the block named product.info using layout XML?</strong> A)   B)   C)   D)
D) <strong>How do you set the custom block MyCompany\MyModule\Block\A as a child for the block named product.info using layout XML?</strong> A)   B)   C)   D)
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
31
You have created a custom module which must perform an action immediately after an order is placed, but only on the store front of the merchant site. You have selected the checkout_submit_all_after as the target event which the module will observe. In which file will the event observer be declared?

A) etc/frontend.xml
B) etc/events.xml
C) etc/config.xml
D) etc/frontend/events.xml
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
32
Which two tasks are supported by Magento CLI? (Choose two.)

A) Customer password reset
B) Clearing cache
C) Codebase deployment from developer machine to staging server
D) Administrator account creation
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
33
Your module, MyCompany_MyModule, is using the frontName mymodule. You need to locate the class responsible for the frontend path /mymodule/custom. What file contains the controller class for the frontend path /mymodule/custom?

A) Controller/Custom/Index.php
B) Controller/Custom.php
C) Controller/MyModule/Custom/Index.php
D) Controller/Frontend/MyModule/Custom.php
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
34
Which three scopes can be used to set different System Configuration values in Magento? (Choose three.)

A) Language
B) Area
C) Store View
D) Store
E) Website
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
35
You are working on a project that contains a million SKUs. The merchant has requested the product view page to have a custom color schema and page layout depending on the product price range. How do you implement this, keeping simplicity in mind?

A) Create a custom block which will dynamically choose the appropriate template
B) Specify custom layout update XML in the admin panel for every product
C) Write a Data Patch which will set the appropriate layout update XML for every product record
D) Enable the dynamic product page UI component and configure it to use a different layout per price range
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
36
While developing a module you need to modify an existing Data Patch. How can you force Magento to execute an existing Data Patch file again?

A) By removing the Data Patch, running the command: bin/magento setup:db-data:upgrade , then copying the file back and running the command again By removing the Data Patch, running the command: bin/magento setup:db-data:upgrade , then copying the file back and running the command again
B) By deleting the record with the Data Patch class name from the table patch_list table By deleting the record with the Data Patch class name from the table patch_list table
C) By changing the version of the Data Patch in the getVersion method By changing the version of the Data Patch in the getVersion method
D) By modifying the data_version value in the setup_module table By modifying the data_version value in the setup_module
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
37
You want to declare a block of the type \Magento\Framework\View\Element\Template with a template named view.phtml in the layout XML. What is the correct layout declaration for this?

A) <strong>You want to declare a block of the type \Magento\Framework\View\Element\Template with a template named view.phtml in the layout XML. What is the correct layout declaration for this?</strong> A)   B)   C)   D)
B) <strong>You want to declare a block of the type \Magento\Framework\View\Element\Template with a template named view.phtml in the layout XML. What is the correct layout declaration for this?</strong> A)   B)   C)   D)
C) <strong>You want to declare a block of the type \Magento\Framework\View\Element\Template with a template named view.phtml in the layout XML. What is the correct layout declaration for this?</strong> A)   B)   C)   D)
D) <strong>You want to declare a block of the type \Magento\Framework\View\Element\Template with a template named view.phtml in the layout XML. What is the correct layout declaration for this?</strong> A)   B)   C)   D)
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
38
You are working on a new entity called vendor. You implemented the model, resource model and collection. You want to ensure that standard model events will be fired for your model, so an observer can be created for the events vendor_save_after, vendor_save_commit_after and others. How do you do that?

A) Create an entry in etc/di.xml and add the argument eve ntPrefix with the value of vendor Create an entry in etc/di.xml and add the argument eve ntPrefix with the value of vendor
B) Declare the $_eventPrefix property in your vendor model and set it to vendor Declare the $_eventPrefix property in your vendor model and set it to
C) You must implement all appropriate methods and fire the events manually
D) Ensure that the primary key in the corresponding table is named vendor_id Ensure that the primary key in the corresponding table is named vendor_id
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
39
A merchant is interested in setting different prices for the same products in different store scopes. What do you reply to this inquiry?

A) The prices can only be scoped per website or globally The prices can only be scoped per website or globally
B) The prices can be scoped per store The prices can be scoped per
C) The price scope can be set to store but this will lead to performance degradation of category pages The price scope can be set to but this will lead to performance degradation of category pages
D) The prices do not support scopes
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
40
What order operation is available in the My Account section in the storefront?

A) Edit order
B) Refund
C) Reorder
D) Invoice
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
41
What is the difference between online and offline shipping methods?

A) Online means that a shipment will have a tracking number, and offline means no tracking numbers are available
B) Online means Magento will use a shipping carrier's API to obtain rates, offline means Magento will calculate the rates internally
C) Online means that an item's shipping will be processed by the merchant, offline means that it will be processed by the customer
D) Online means that it will be sent to the customer using a shipping carrier, offline means the customer will pick up the order in person
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
42
A merchant asks you to extend customer functionality to allow customer accounts to be associated with two or more billing addresses. How is this implemented?

A) By adding the attribute like customer_address_billing2 and customizing both My Account and Checkout functionality to use that new attribute
B) By changing the System Configuration setting: Customer>Allow multiple billing addresses to Yes
C) By altering the customer_entity table, adding the field billing_address2, and customizing both My Account and Checkout functionality to use that new field
D) This is out-of-the box functionality
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
43
What is the relationship between products and categories in Magento?

A) Products may be assigned to zero or more categories
B) Product to category relation is dynamically defined by Catalog Product Rules
C) Each product belongs to zero or one category
D) Each product always belongs to one category
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
44
How do you add a new link into the My Account sidebar?

A) By creating a new UI component
B) By creating a child of the My Account UI component
C) By adding the new section into the customer_account table in the database
D) By using a layout update
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
45
You are working on a custom web API endpoint and have configured it in etc/webapi.xml. This config is cached as part of the config_webservice cache type. Keeping performance in mind, how do you refresh the cached version of this config using Magento CLI?

A) cache:clean config_webservice
B) cache:refresh config_webservice
C) cache:flush
D) cache:purge
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
46
You have added a new attribute origin of the type varchar to the product entity. Which two calls will filter a product collection with origin set to "California"? (Choose two.)

A) $collection->addFieldToFilter('origin', "California");
B) $collection->addAttributeToSelect('origin', "California");
C) $collection->joinAttribute('origin', 'catalog_product/origin', 'origin', 'California");
D) $collection->addAttributeToFilter('origin', "California");
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
47
A custom module needs to log all calls of \Magento\Customer\Api\AddressRepositoryInterface::save(). Which mechanism do you use?

A) An observer on the customer_address_repository_save event, which is automatically fired for every repository save
B) A proxy configured to intercept all calls to any public method and log them
C) An extension attribute configured in the extension_attributes.xml
D) A plugin declared for the save() method
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
48
A merchant gives you the module MyCompany_MyModule to install. How do you identify which REST endpoints are supported by the module?

A) REST endpoints are declared in etc/webapi_rest/di.xml REST endpoints are declared in etc/webapi_rest/di.xml
B) Every public method of every interface in the Api folder automatically is exposed as a REST endpoint
C) REST endpoints are declared in etc/rest.xml etc/rest.xml
D) REST endpoints are declared in etc/webapi.xml etc/webapi.xml
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
49
Assume that $collection is a new instance of a class that extends Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection, and $ids is an array of ids. How do you select a list of records from the database where the record ids are in the $ids list?

A) $collection->addFieldToFilter('record_id',['in'=>$ids]);
B) <strong>Assume that $collection is a new instance of a class that extends Magento\Framework\Model\ResourceModel\Db\Collection\AbstractCollection, and $ids is an array of ids. How do you select a list of records from the database where the record ids are in the $ids list?</strong> A) $collection->addFieldToFilter('record_id',['in'=>$ids]); B)   C) $collection->in($ids); D) $collection->filterIn($ids);
C) $collection->in($ids);
D) $collection->filterIn($ids);
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
50
You are building a report using complex SQL aggregations to locate the required data. In what type of class do you put these SQL statements?

A) Resource model
B) Repository
C) Model
D) Helper
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
51
Magento allows you to specify custom values per store for product attributes created in the admin panel. Which architectural pattern makes it possible?

A) Store Manager
B) Extension Attribute
C) Entity Attribute Value
D) Dependency Injection
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
52
You have configured an event observer to watch the checkout_submit_all_after event using this XML: <strong>You have configured an event observer to watch the checkout_submit_all_after event using this XML:   What is the required class definition for the event observer?</strong> A)   B)   C)   D)   What is the required class definition for the event observer?

A) <strong>You have configured an event observer to watch the checkout_submit_all_after event using this XML:   What is the required class definition for the event observer?</strong> A)   B)   C)   D)
B) <strong>You have configured an event observer to watch the checkout_submit_all_after event using this XML:   What is the required class definition for the event observer?</strong> A)   B)   C)   D)
C) <strong>You have configured an event observer to watch the checkout_submit_all_after event using this XML:   What is the required class definition for the event observer?</strong> A)   B)   C)   D)
D) <strong>You have configured an event observer to watch the checkout_submit_all_after event using this XML:   What is the required class definition for the event observer?</strong> A)   B)   C)   D)
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
53
What happens when a category's is_anchor attribute is set to 1?

A) Products without a specified category will be associated with this category
B) The customer will see all products from all children of the category
C) This is the default category for a website
D) The category will always be visible in the menu
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
54
A merchant requires the ability to configure contact information for their brick and mortar stores as a CSV file upload. The module already exists and contains an etc/adminhtml/system.xml file where the new field can be added. How do you specify the class that will process the uploaded file?

A) \Magento\Config\Model\Config\Upload\File
B) \Magento\Config\Model\Config\Frontend\File
C) \Magento\Config\Model\Config\Backend\File
D) \Magento\Config\Model\Config\Source\File
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
55
You are tasked with ensuring customers who log into the site are authorized. By default, this consists of ensuring the customers email and password match the values in the database. On this project, you need to verify additional data in this process. Keeping in mind upgradeability, how is this done?

A) Create a before plugin for \Magento\Customer\Api\AccountManagementInterface's authenticate method
B) Create a mutation of a CustomerInterface object to intercept the username and password
C) Create an event observer for the user_save_after observer
D) Override \Magento\Customer\Controller\AccountController.php
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
56
What is the connection between product attribute sets and categories?

A) Categories have no connection to product attribute sets, and any product can be assigned to any category
B) Each category is linked to a single product attribute set, and only products from that attribute set are allowed in the category
C) Each category is linked to a single product attribute set, and only products from that category's set or any of its parent categories'
D) Categories can be connected to multiple product attribute sets, and only products from one of those sets are allowed in the category
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
57
There are two different configurable products which both share one variation. The shared variation is represented by the same simple product. A customer added both configurables to the cart with the same selected variation? How will they be displayed?

A) As two separate line items with quantity 1 each
B) As one line item which lists both configurable products with quantity 1 each
C) As one line item of the first product with quantity 2
D) As one line item of the second product with quantity 2
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
58
You have created a new section in system configuration under the Catalog tab: <strong>You have created a new section in system configuration under the Catalog tab:   How do you restrict an access to the section using Magento ACL?</strong> A)   B)   C)   D)   How do you restrict an access to the section using Magento ACL?

A) <strong>You have created a new section in system configuration under the Catalog tab:   How do you restrict an access to the section using Magento ACL?</strong> A)   B)   C)   D)
B) <strong>You have created a new section in system configuration under the Catalog tab:   How do you restrict an access to the section using Magento ACL?</strong> A)   B)   C)   D)
C) <strong>You have created a new section in system configuration under the Catalog tab:   How do you restrict an access to the section using Magento ACL?</strong> A)   B)   C)   D)
D) <strong>You have created a new section in system configuration under the Catalog tab:   How do you restrict an access to the section using Magento ACL?</strong> A)   B)   C)   D)
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
59
You are debugging a problem resulting from a recently deployed around plugin. The plugin is intercepting the doSomething method. The aroundDoSomething plugin method is called successfully, but the original doSomething method is no longer being executed as expected. What is causing this?

A) The sort order of the plugin is too high and supersedes the priority of the intercepted method
B) The plugin implementation returned something other than its callable argument
C) The plugin implementation is skipping the execution of its callable argument
D) The plugin implementation overlooked using the AbstractPlugin parent class
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
60
How do you persist an entity to the database?

A) Calling the store() method on the entity's model
B) Calling the update() method on the entity's collection
C) Calling the persist() method on the entity's repository
D) Calling the save() method on the entity's repository
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
61
Assume that a customer's cart only includes one downloadable product. What effect will it cause on the quote object?

A) The quote object will have a downloadable URL instead of an address
B) The quote object will not have shipping address
C) The quote object will not have any address
D) The quote object will not have a billing address
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
62
You are working on a jewelry store that sells rings. Each ring allows an adjustment in size. The customer specifies finger size in inches and the merchant physically adjusts the stocked ring to the required size. How is this represented in Magento?

A) Using custom options, with rings as simple products
B) Using categories, with each ring size as a separate product
C) Using configurable products, with ring size as an attributive value
D) Using custom options, with rings as bundle products
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
63
In layout files you can change al element's order on a page. This can be done using one of the following: instruction before and after element attributes? How are two methods different?

A) They are the same, both provide access to the same functionality
B) Elements are renamed by default when using the move instruction
C) The move instruction allows altering an element's parent node
D) Before and after attributes can only be used with referenceContainer and referenceBlock
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
64
You need to add a new text attribute to all products in the Magento store. When this attribute is displayed on the product page, its values must be different depending on the selected language. Keeping simplicity in mind, how do you add this attribute?

A) Use the Magento CLI to create a new custom attribute, then generate dictionaries for all supported languages
B) Use a Data Patch to create a new EAV attribute
C) Add a new column to the catalog_product_entity table using declarative schema Add a new column to the catalog_product_entity table using declarative schema
D) Use the admin panel to create a new extension attribute
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
65
You got a notification about error that occurred on a production environment. The merchant gave you the error identifier. How do you find the error message based on the identifier?

A) An error is written to the var/log/exception.log file including the identifier An error is written to the var/log/exception.log file including the identifier
B) The error is sent to the pre-configured error email with the identifier in the subject
C) A file with a name matching the identifier is written to the var/report folder A file with a name matching the identifier is written to the var/report folder
D) An error message is written to the database table error_log with an error_id field matching the identifier An error message is written to the database table error_log with an error_id field matching the identifier
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
66
You are adding a new menu item to the admin backend which will link to a custom backend page. The declaration of the route: <strong>You are adding a new menu item to the admin backend which will link to a custom backend page. The declaration of the route:   What do you specify as the menu item action attribute value so it links to /admin/mycompany/mymodule/?</strong> A) action=adminhtml/mycompany/mymodule/ B) action=admin/mycompany/mymodule/ C) It is not possible without extending the adminhtml route in routes.xml D) action=mycompany/mymodule/ What do you specify as the menu item action attribute value so it links to /admin/mycompany/mymodule/?

A) action="adminhtml/mycompany/mymodule/"
B) action="admin/mycompany/mymodule/"
C) It is not possible without extending the adminhtml route in routes.xml
D) action="mycompany/mymodule/"
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
67
During a code review of a module MyCompany_PaymentCurrencies you see a configuration field declared in the file etc/adminhtml/system.xml: <strong>During a code review of a module MyCompany_PaymentCurrencies you see a configuration field declared in the file etc/adminhtml/system.xml:   What is the consequence of the attribute showInStore being set to 0?</strong> A) The field value will not be accessible on the store front by calling ScopeConfigInterface::getValue() with a $scopeType argument of 'store'. B) The input field will not be visible if a store view scope is selected in the system configuration C) The input field will only be visible if a website's default store scope is selected in the system configuration D) The input field will be disabled if a store view scope is selected in the system configuration What is the consequence of the attribute showInStore being set to 0?

A) The field value will not be accessible on the store front by calling ScopeConfigInterface::getValue() with a $scopeType argument of 'store'.
B) The input field will not be visible if a store view scope is selected in the system configuration
C) The input field will only be visible if a website's default store scope is selected in the system configuration
D) The input field will be disabled if a store view scope is selected in the system configuration
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
68
You added a plugin declaration to MyCompany/MyModule/etc/di.xml: <strong>You added a plugin declaration to MyCompany/MyModule/etc/di.xml:   What will be the effect of this declaration?</strong> A) An exception because plugins must not be applied to the interfaces B) An exception because of the syntax error in the declaration C) The plugin will be ignored because ActionInterface will never be instantiated directly D) The plugin will be applied to all implementors of the ActionInterface What will be the effect of this declaration?

A) An exception because plugins must not be applied to the interfaces
B) An exception because of the syntax error in the declaration
C) The plugin will be ignored because ActionInterface will never be instantiated directly
D) The plugin will be applied to all implementors of the ActionInterface
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
69
You have been asked to display details from the customer's latest order on the customer's account dashboard (customer/account/). You create a new custom template to show the information. How do you obtain an order repository so you can fetch an order?

A) Create a view model and specify an OrderRepositoryInterface argument in the _construct method
B) In your template, add the following: $orderRepository=ObjectManager::getInstance()->get(OrderRepositoryInterface::class);
C) In your block, add a method with the following: return ObjectManager::getInstance()->get(OrderRepositoryInterface::class);
D) $orderRepository = new OrderRepository();
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
70
How can you render a text on a page using only layout xml?

A) <strong>How can you render a text on a page using only layout xml?</strong> A)   B)   C)   D)
B) <strong>How can you render a text on a page using only layout xml?</strong> A)   B)   C)   D)
C) <strong>How can you render a text on a page using only layout xml?</strong> A)   B)   C)   D)
D) <strong>How can you render a text on a page using only layout xml?</strong> A)   B)   C)   D)
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
71
How do you obtain customer information in a JavaScript module?

A) Magento does not expose customer information in JavaScript for security reasons
B) By sending an AJAX request to the url: /customer/account/info/?json=1
C) By using customerData.get('customer') call, where customerData is an instance of Magento_Customer/js/customer-data
D) Customer information is available in localStorage and be retrieved by calling window.localStorage.getItem('customer')
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
72
You are reviewing a theme in app/design/frontend/MyCompany/MyTheme and see the file etc/view.xml. What is the function of this file?

A) It configures Grunt to compile assets for the theme
B) It stores theme and image configuration values
C) It specifies the applicable CSS files for the theme
D) It informs Magento that the theme is present and available for use
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
73
In a code review of a merchant's site you have discovered that there are multiple observers for the checkout_submit_all_after event. After closer inspection, you notice one of these observers is relying on the others being executed before it is called. What risk does this pose, and how can it be mitigated?

A) There is no risk posed as long as each event observer specifies a correct sortOrder. Nothing needs to be changed.
B) Event observers are fired in alphabetical order of the observer name. There is no risk here.
C) Magento only supports one observer per event. These observers will need to be combined into a single point of customization.
D) Order of listener execution cannot be guaranteed, resulting in a fragile implementation. This code should be re-worked using plugins
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
74
Where do you change the frontName for the admin router?

A) app/etc/config.xml
B) app/etc/env.php
C) app/etc/local.xml
D) composer.json
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
75
Which two ways does Magento persist category relationships in the database? (Choose two.)

A) Using slash-separated values in the path field
B) in the table catalog_category_index
C) in the parent_id field
D) Using comma-separated values in the parent-ids field
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
76
In the module located at app/code/MyCompany/MyModule there is a JS module in the file view/frontend/web/register.js . The Magento base URL is https://magento.host/ and the luma theme with the en_US locate is used. What is the public URL for this file?

A) https://magento.host/pub/static/frontend//Magento/luma/en_US/MyCompany_MyModule/js/register.js
B) https://magento.host/pub/static/frontend/Magento/luma/en_US/MyCompany_MyModule/register.js
C) https://magento.host/pub/static/frontend/Magento/luma/en_US/MyCompany_MyModule/web/register.js
D) https://magento.host/app/code/MyCompany_MyModule/view/frontend/web/register.js
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
77
You have created a new block and will be adding this block on every page. The block contains user-specific information and cannot be cached. The block is added to the default.xml with: <strong>You have created a new block and will be adding this block on every page. The block contains user-specific information and cannot be cached. The block is added to the default.xml with:   What does this accomplish?</strong> A) The block will be loaded on the store front using AJAX B) FPC will cache the block content for all cacheable pages C) FPC will be bypassed for this block and all other page content will be cached D) All store front pages are no longer cacheable What does this accomplish?

A) The block will be loaded on the store front using AJAX
B) FPC will cache the block content for all cacheable pages
C) FPC will be bypassed for this block and all other page content will be cached
D) All store front pages are no longer cacheable
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
78
What scopes are available for customer attributes?

A) Global only
B) Website only
C) Global and Website
D) Global, Website and Store
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
79
You are tasked to install an extension to the merchant's Magento instance. The extension is developed by the company called MyCompany and its codebase is available from all four locations listed below. Which two installations options do you choose from to prevent version conflicts during upgrade? (Choose two.)

A) Clone the code from GitHub and put it into the vendor directory
B) Download the extension code from the developer's website, and put it into app/code
C) Use Magento web setup wizard to pull the code from Magento's composer repository
D) Use composer CLI to pull the code from MyCompany's repository
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
80
You are reviewing a Magento module and see a directory named Service. What can you determine from this directory's name?

A) It is where the API response cache is stored
B) It is where API-related configuration resides
C) It is where the module's service contracts are stored
D) You need to review the files in this folder to understand its purpose
Unlock Deck
Unlock for access to all 102 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 102 flashcards in this deck.