Magento Magento 2 Certified Associate Developer Exam Practice Questions (P. 2)
- Full Access (102 questions)
- Six months of Premium Access
- Access to one million comments
- Seamless ChatGPT Integration
- Ability to download PDF files
- Anki Flashcard files for revision
- No Captcha & No AdSense
- Advanced Exam Configuration
Question #6
What is the connection between product attribute sets and categories?
- ACategories have no connection to product attribute sets, and any product can be assigned to any category
- BEach category is linked to a single product attribute set, and only products from that attribute set are allowed in the category
- CEach 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
- DCategories can be connected to multiple product attribute sets, and only products from one of those sets are allowed in the category
Correct Answer:
D
Reference:
https://www.cloudways.com/blog/configuring-product-attribute-sets-in-magento/
D
Reference:
https://www.cloudways.com/blog/configuring-product-attribute-sets-in-magento/
send
light_mode
delete
Question #7
How can you access the select query of a collection?
- AYou can only access the select query after the collection has been loaded by calling the public method query()
- BIt is stored in a protected variable $query and can only be accessed from the inside of a collection class
- CYou can get it by using public method getSelect() which returns an instance of Magento\Framework\DB\Select
- DThe select query is not available in the collection class, it will be generated by the MySQL adapter right before executing a query
Correct Answer:
C
Reference:
https://mage2.pro/t/topic/610
C
Reference:
https://mage2.pro/t/topic/610
send
light_mode
delete
Question #8
You are developing a module MyCompany_StoreInfo to display information about brick and mortar stores on a frontend page. The displayed information varies based on the country of a given store.
What two elements automatically render their children? (Choose two.)
What two elements automatically render their children? (Choose two.)
- A<block class=ג€\Magento\Framework\View\Element\AbstractBlockג€ name=ג€shop.info.detailsג€/>
- B<block class=ג€\Magento\Framework\View\Element\Templateג€ name=ג€shop.info.detailsג€/>
- C<container name=ג€shop.info.detailsג€/>
- D<block class=ג€\Magento\Framework\View\Element\Text\ListTextג€ name=ג€shop.info.detailsג€/>
Correct Answer:
CD
CD
send
light_mode
delete
Question #9
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?
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.
- B$collection->in($ids);
- C$collection->filterIn($ids);
Correct Answer:
A
Reference:
https://magento.stackexchange.com/questions/121040/how-to-get-product-collections-by-set-of-ids-in-magento-2
A
Reference:
https://magento.stackexchange.com/questions/121040/how-to-get-product-collections-by-set-of-ids-in-magento-2
send
light_mode
delete
Question #10
While reviewing a layout file named sales_order_view.xml you notice the element
<update handle=`customer_account`/>
What is the purpose of this element?
<update handle=`customer_account`/>
What is the purpose of this element?
- AReplaces the customer_account handle with sales_order_view
- BNothing, this element has been deprecated
- CAdds the customer_account handle to the page's handles list
- DUpdates the current page handle to customer_account
Correct Answer:
C
C
send
light_mode
delete
All Pages