Free AD0-E704 Exam Braindumps (page: 6)

Page 5 of 23

Suppose you are tasked with update a product price to 10% more and it's cart rule to provide 5% discount after 2 month. So after this timeperiod, product price and cart rule must be activated workign in the frontend for users.
Which Magento feature you should use to do the above task?

  1. Use "Schedules Update" feature provided by the "Magento Staging" module.
  2. Use "Schedules Update" feature provided by the "Magento Sales" module.
  3. Use "Schedules Update" feature provided by the "Magento Catalog" module.
  4. We can't set any "schedule update" in future date for product or cart rule data.

Answer(s): A



Suppose you are working with order collection where you need to get the Customer collection object in foreach loop to check wheather current order's customer accout is locked or not. For this you injected Magento\Customer\Model\Customer $customer in the constructor to use $customer collection object. But in loop when this object is used, you notice that it's returning the same customer even if you pass different customer id to filter the customer collection inside loop.
What is the solution for this problem?

  1. Use proxy class for customer and use create() method to get a fresh customer object
  2. Use factory class for customer and use create() method to get a fresh customer object
  3. We can not filter a collection in foreach loop, need to use load() on customer model
  4. None of these

Answer(s): B



When you reference a factory or proxy in a class constructor, these classes are generated by default inside generated directory, if they are not present in codebase.
Which Magento class is resposible for this?

  1. ObjectManager
  2. FileManager
  3. ClassManager
  4. IntanceManager

Answer(s): A



When your class will be instantiated all the dependencies injected in your class constructor will also get instantiated, and it will trigger a chain reaction of object creation, this can really slow down the process.
What could be the solution of above problem?

  1. Use Proxy classes with help of di.xml
  2. Use VitualType classes with help of di.xml
  3. Use Dependecy Injection with help of di.xml
  4. Use factory classes instead of Model.

Answer(s): A






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

AD0-E704 Exam Discussions & Posts