Summer Sale - Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: dpt65

AD0-E704 Questions and Answers

Note! Following AD0-E704 Exam is Retired now. Please select the alternative replacement for your Exam Certification.

AD0-E704 Questions and Answers

Question # 6

You are developing a new payment method. It is required that any new order created with this payment method needs to have a specific custom status. Assume the status has been added to the system already, assigned to the processing state, and the new order state for the payment method is processing. How do you set the custom status on orders placed with the new payment method?

A.

Add a custom status code to the Magento\Sales\Model\Order-\Payment class as a $newOrderStatus constructor parameter using di.xml

B.

Create a system configuration option order.status and set the status code as its value

C.

Create an observer for the event sales_order_set_status, get the $status parameter and set the new status using $status->setStatus()

D.

Create a command setOrderStatus and add it to a commandPool with a name set_status

Full Access
Question # 7

You are working on a new feature to allow multiple vendors for various products. To display vendors you add a custom fieldset component and select with the name myCompanyVendors. It will be shown if the number of vendors is more than one.

To do this you implement a custom method on your component:

How do you cause the method to be called when the value of options change?

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 8

A merchant is planning to create a single scheduled update for one million products. They are wondering about website performance. What two performance issues will the update cause?

A.

Magento will index all records in the cataiog_product_entity table regardless of the version so the index tables will be big

B.

When applying a scheduled update Magento will reindex all affected products

C.

The catalog_product_entity_* tables will contain all the staged values which slows down all queries related to them

D.

Magento runs a cron job every minute to generate and maintain preview data

Full Access
Question # 9

Suppose in a store there are 500 categories and it's increasing as per the need. Let's say your frontend developer asked you to modify the header and include CSS files on some specific category pages based on the custom category attribute selection from backend. What should be the acceptable and easiest way to do this, so that no new file creation and code update will be required after implementation:

A.

create a new layout XML file for the category called catalog_category_view.xml and add the layout modification code

B.

create a new layout XML file for the category called catalog_category_view_selectable__CustomLayout.xml

and assign it to the needed categories from backend, and add the layout modification code in it.

C.

create a custom layout handle for the category using observer layout_load_before and add the layout modification code

D.

create a custom layout handle for the category using observer layout_load_after and add the layout modification code

Full Access
Question # 10

In homepage, you need to add inline css in the body tag. What should be the correct way of doing this using layout XML file cms_index_index.xml:

A.

<body>

</body>

B.

<body>

</body>

C.

<body>

</body>

D.

<body>

</body>

Full Access
Question # 11

You have a task to modify the grand total on the checkout page with a negative price adjustment which depends on the shipping address postcode. What are two approaches to be used in this case?

A.

Create a new shopping cart price rule with a condition based on the shipping address postcode

B.

Create a JavaScript mixin for the Magento_Checkout/ js /view /summary/,subtotal, change total there and Magento will submit the modified total when placing an order

C.

Create a new total collector which adds a negative price adjustment based on the postcode

D.

Create an observer on the event sales_quote_collect_totals_after, get the quote object, check the postcode and set the modified grand total into it

Full Access
Question # 12

You need to build a custom module to add a notice to the Advanced Inventory section on the product form. The notice text can be specified in the system configuration. How do you implement this?

A.

You add a plugin on the form \Magento\Cataiog\Ui\DataProvid«r\Product\Form\ProductDataProvider to add a field in the Advanced Inventory section

B.

YOU add a plugin on Magento\CatalogInventory\Ui\DataProvider\Product\Form\Modifier\AdvancedInventory to modify the Section metadata

C.

You inject a custom block into the reference container in the catalog_product_index layout

D.

You add a field to product_form. xml as a child of the stock_data fieldset

Full Access
Question # 13

Magento regenerates the admin URL secret key for each new session. What is the purpose of this key?

A.

To prevent brute-force attacks

B.

To prevent admin pages from being cached

C.

To validate ACL permissions for the current admin user

D.

To prevent admin panel Cross Site Request Forgery attacks

Full Access