Free AD0-E703 Exam Braindumps (page: 15)

Page 14 of 34

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?

  1. \Magento\Catalog\Model\Product
  2. \Magento\Catalog\Api\Data\ProductInterfaceFactory
  3. \Magento\Catalog\Api\Data\ProductInterface
  4. \Magento\Catalog\Model\ProductBuilder

Answer(s): B



Which two tasks are supported by Magento CLI? (Choose two.)

  1. Customer password reset
  2. Clearing cache
  3. Codebase deployment from developer machine to staging server
  4. Administrator account creation

Answer(s): B,D



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?

  1. Create a custom block which will dynamically choose the appropriate template
  2. Specify custom layout update XML in the admin panel for every product
  3. Write a Data Patch which will set the appropriate layout update XML for every product record
  4. Enable the dynamic product page UI component and configure it to use a different layout per price range

Answer(s): A


Reference:

https://www.rohanhapani.com/magento-2-change-product-view-page-layout-based-on-price/



How do you add a foreign key to an existing table created by another module?

  1. Create etc/db_schema.xml file with the table node and constraint child node
  2. Run the command bin/magento setup:db-schema:upgrade <table> <constraint declaration>
  3. This can only be done with raw SQL in a Schema Patch file
  4. Create the etc/db_constraints.xml file and specify foreign key there in the constraint node

Answer(s): A


Reference:

https://magento.stackexchange.com/questions/192317/magento-2-how-to-add-foreign-key-in- update-schema






Post your Comments and Discuss Adobe AD0-E703 exam with other Community members:

AD0-E703 Discussions & Posts