ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 34 - AD0-E722 discussion

Report
Export

An Architect needs to review a custom product feed export module that a developer created for a merchant. During final testing before the solution is deployed, the product feed output is verified as correct. All unit and integration tests for code pass.

However, once the solution is deployed to production, the product price values in the feed are incorrect for several products. The products with incorrect data are all currently part of a content staging campaign where their prices have been reduced.

What did the developer do incorrectly that caused the feed output to be incorrect for products in the content staging campaign?

A.
The developer retrieved product data directly from the database using the entity_id column rather than a collection or repository.
Answers
A.
The developer retrieved product data directly from the database using the entity_id column rather than a collection or repository.
B.
The developer forgot to use the getContentStagingValue method to retrieve the active campaign value of the product data.
Answers
B.
The developer forgot to use the getContentStagingValue method to retrieve the active campaign value of the product data.
C.
The developer did not check for an active content staging campaign and emulates the campaign state when retrieving product data.
Answers
C.
The developer did not check for an active content staging campaign and emulates the campaign state when retrieving product data.
Suggested answer: C

Explanation:

Option C is correct because the developer did not check for an active content staging campaign and emulate the campaign state when retrieving product data. Content staging campaigns can modify the product data such as price, name, description, and so on, based on a schedule.To get the correct product data for a specific date and time, the developer needs to use the Magento\Staging\Model\VersionManager class to set the current version ID and emulate the campaign state1. Otherwise, the product data will be retrieved from the default store view without applying the campaign changes.

Option A is incorrect because retrieving product data directly from the database using the entity_id column is not necessarily wrong. It may not be the best practice, but it does not cause the feed output to be incorrect for products in the content staging campaign.The content staging campaigns are stored in separate tables with a version ID that links to the main product table2. The developer can still join these tables and query the product data based on the version ID and date.

Option B is incorrect because there is no such method as getContentStagingValue in Magento 2. The developer cannot use this method to retrieve the active campaign value of the product data. The correct way to get the product data for a specific campaign is to use the Magento\Staging\Model\VersionManager class as mentioned above.

1: Content Staging | Adobe Commerce Developer Guide

2: Content Staging | Adobe Commerce Developer Guide

asked 02/10/2024
han wu
40 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first