Adobe Certification

AD0-E717 — Adobe Commerce Developer Professional Study Guide

60 practice questions with correct answers and detailed explanations. Use this guide to review concepts before taking the practice exam.

▶ Take Practice Exam 60 questions  ·  Free  ·  No registration

About the AD0-E717 Exam

The Adobe Adobe Commerce Developer Professional (AD0-E717) certification validates professional expertise in Adobe technologies. This study guide covers all 60 practice questions from our AD0-E717 practice test, complete with correct answers and explanations to help you understand each concept thoroughly.

Review each question and explanation below, then test yourself with the full interactive practice exam to measure your readiness.

60 Practice Questions & Answers

Q1 Medium

When implementing a custom module in Adobe Commerce, where should you declare module dependencies to ensure proper loading order?

  • A By registering module names in the etc/modules.xml file
  • B In the etc/config.xml file with dependency nodes
  • C In the module's module.xml file using the <sequence> tag ✓ Correct
  • D In the composer.json file under require-dev section
Explanation

Module dependencies in Adobe Commerce are declared in the etc/module.xml file using the <sequence> element to control the load order of modules and ensure proper initialization.

Q2 Medium

What is the primary purpose of using a Data Mapper pattern in Adobe Commerce custom extensions?

  • A To cache database query results in Redis
  • B To validate form input data before submission
  • C To separate data retrieval logic from business logic and provide a clean abstraction layer ✓ Correct
  • D To handle XML parsing and serialization tasks
Explanation

The Data Mapper pattern in Adobe Commerce isolates the logic that retrieves data from business logic, making the code more maintainable and testable by providing a clear separation of concerns.

Q3 Hard

In Adobe Commerce, which interface should be implemented to create a custom payment method that integrates with the checkout process?

  • A Magento\Payment\Model\InfoInterface
  • B Magento\Payment\Model\PaymentInterface
  • C Magento\Framework\Model\AbstractModel
  • D Magento\Payment\Model\MethodInterface ✓ Correct
Explanation

Custom payment methods in Adobe Commerce must implement the MethodInterface (Magento\Payment\Model\MethodInterface), which defines the contract for payment processing functionality.

Q4 Medium

What is the correct way to add a custom attribute to the customer entity in Adobe Commerce?

  • A Use the InstallData or UpgradeData script in Setup folder with addAttribute method ✓ Correct
  • B Add the attribute definition in the customer XML configuration file
  • C Directly modify the database table using raw SQL queries in a custom script
  • D Create a migration script in app/code/Module/Setup/Patch/Data/
Explanation

Custom customer attributes should be created using InstallData or UpgradeData setup scripts that utilize the AttributeSetup class to properly register attributes in Adobe Commerce.

Q5 Hard

When creating a GraphQL resolver in Adobe Commerce, which class should be extended to implement resolver logic?

  • A Magento\Framework\GraphQL\Query\Resolver
  • B Magento\Framework\Model\AbstractModel
  • C Magento\GraphQL\ResolverFactory
  • D Magento\Framework\GraphQL\Query\ResolverInterface ✓ Correct
Explanation

GraphQL resolvers in Adobe Commerce must implement the ResolverInterface (Magento\Framework\GraphQL\Query\ResolverInterface) to define the resolve method that processes GraphQL queries.

Q6 Easy

What does the app/etc/env.php file contain in Adobe Commerce?

  • A Database connection credentials and system configuration values ✓ Correct
  • B Module configurations and theme settings
  • C Cache backend configuration and storage options
  • D Static file deployment paths
Explanation

The env.php file stores sensitive configuration like database credentials and environment-specific settings that should not be committed to version control in Adobe Commerce installations.

Q7 Medium

In Adobe Commerce, how should you properly observe custom events from other modules without creating tight coupling?

  • A By declaring an observer in the events.xml file and implementing ObserverInterface ✓ Correct
  • B By creating a shared dependency injection container configuration
  • C By using the event manager to dispatch events directly in the module constructor
  • D By directly calling methods of the source module's classes
Explanation

Custom events in Adobe Commerce should be observed by declaring observers in etc/events.xml and implementing the ObserverInterface, which maintains loose coupling between modules.

Q8 Medium

What is the purpose of the di.xml file in an Adobe Commerce module?

  • A To specify module version and author information
  • B To manage translation strings for the module
  • C To define database table structures
  • D To configure the dependency injection container and define class preferences ✓ Correct
Explanation

The di.xml file in Adobe Commerce is used to configure the dependency injection container, define class preferences, virtual types, and constructor dependencies for the module.

Q9 Hard

When developing a custom extension that modifies core Adobe Commerce behavior, which approach should you use instead of modifying core files directly?

  • A All of the above methods are equally preferred ✓ Correct
  • B Use Plugins (Interceptors) to modify class behavior through before/after/around methods
  • C Create event observers that listen to core module events
  • D Extend core classes and override methods in your custom module
Explanation

Adobe Commerce provides multiple extension mechanisms including plugins, observers, and class inheritance to modify core behavior without touching core files; the choice depends on the specific use case and context.

Q10 Hard

What is the correct syntax for declaring a before-type plugin in the di.xml file?

  • A <plugin name="customPlugin" type="CustomPlugin" disabled="false"><before method="methodName" /></plugin>
  • B <type name="VendorClass"><plugin name="customPlugin" type="CustomPlugin" sortOrder="10" /></type> ✓ Correct
  • C <beforePlugin class="CustomPlugin" target="VendorClass" method="methodName" />
  • D <type name="VendorClass"><plugin name="customPlugin" type="CustomPlugin" sortOrder="10"><before method="methodName"/></plugin></type>
Explanation

Plugins in Adobe Commerce are declared within a <type> element, and the 'before' method execution is specified in the plugin class itself; the di.xml only declares the plugin association with sortOrder.

Q11 Medium

In Adobe Commerce, what is the primary function of the Product Resource Model?

  • A To cache product information in the session storage
  • B To format product data for display in templates
  • C To provide REST API endpoints for product data
  • D To manage database operations including load, save, and delete for product entities ✓ Correct
Explanation

The Product Resource Model in Adobe Commerce (extends AbstractDb) handles all database operations for products, managing the relationship between the product model and its database representation.

Q12 Medium

What is the purpose of the etc/adminhtml/system.xml file in an Adobe Commerce module?

  • A To configure system settings that appear in Store > Settings > Configuration ✓ Correct
  • B To manage admin dashboard widgets and their display
  • C To register admin routes and controllers
  • D To define admin user roles and permissions
Explanation

The etc/adminhtml/system.xml file defines configuration settings that are displayed in the Adobe Commerce admin panel's System Configuration, allowing merchants to customize module behavior.

Q13 Hard

When you need to add custom validation to a quote item in Adobe Commerce, which observer event should you use?

  • A sales_quote_item_validate
  • B checkout_cart_product_add_after
  • C sales_quote_add_item ✓ Correct
  • D sales_quote_save_before
Explanation

The 'sales_quote_add_item' event is dispatched when an item is added to the quote, allowing custom validation logic to be implemented through observers before the item is persisted.

Q14 Medium

What is the role of Interceptors (Plugins) in the Adobe Commerce extension architecture?

  • A To handle HTTP request/response interception for caching
  • B To manage database query optimization
  • C To filter and validate user input in forms
  • D To intercept and modify method calls of existing classes without extending them ✓ Correct
Explanation

Plugins (Interceptors) in Adobe Commerce allow you to modify the behavior of public methods by executing code before, after, or around the method call without directly modifying or extending the original class.

Q15 Medium

In Adobe Commerce, how do you create a custom collection that filters products by a specific attribute?

  • A Instantiate ProductCollection and use addAttributeToSelect and addAttributeToFilter methods ✓ Correct
  • B Use the QueryBuilder pattern with the SearchCriteria API
  • C Create a SQL query directly and execute it through the connection object
  • D Define filters in the product XML configuration file
Explanation

Custom product collections in Adobe Commerce use the ProductCollection class with methods like addAttributeToFilter() to apply attribute-based filtering in an ORM-style approach.

Q16 Medium

What does the Magento\Framework\App\Config\ScopeConfigInterface provide in Adobe Commerce?

  • A Direct access to the core_config_data database table
  • B Methods to manage module-level configuration files
  • C Access to system configuration values based on scope (default, website, store) ✓ Correct
  • D Tools to parse and validate XML configuration files
Explanation

ScopeConfigInterface in Adobe Commerce provides the getValue() method to retrieve configuration values respecting the scope hierarchy (default, website, store view).

Q17 Medium

When implementing a custom admin controller in Adobe Commerce, which class should it extend?

  • A Magento\Admin\Controller\AdminAction
  • B Magento\Framework\App\Action\Action
  • C Magento\Backend\App\Action ✓ Correct
  • D Magento\Framework\Controller\AbstractController
Explanation

Custom admin controllers should extend Magento\Backend\App\Action, which provides admin authentication, authorization checks, and other admin-specific functionality.

Q18 Medium

What is the correct way to dispatch a custom event in Adobe Commerce with data?

  • A $this->_eventManager->dispatch('custom_event', ['item' => $item, 'data' => $customData]); ✓ Correct
  • B new Event('custom_event', ['item' => $item, 'data' => $customData]);
  • C $this->eventFactory->create('custom_event')->setData($customData)->dispatch();
  • D Events::dispatch('custom_event', $item, $customData);
Explanation

In Adobe Commerce, events are dispatched using the EventManager object's dispatch() method, passing the event name and an array of parameters to be available to observers.

Q19 Easy

In Adobe Commerce, what is the purpose of the Layout XML files (layout/*.xml)?

  • A To configure CSS and JavaScript loading
  • B To define database table structures
  • C To store HTML templates for pages
  • D To define page structure, blocks, containers, and their arrangement ✓ Correct
Explanation

Layout XML files in Adobe Commerce define the page structure including blocks, containers, arguments, and their hierarchical arrangement, which is then rendered to generate the final HTML output.

Q20 Hard

What is the significance of the 'around' type plugin in Adobe Commerce and when should it be used?

  • A It is used only for logging and debugging purposes
  • B It should never be used because 'before' and 'after' plugins are sufficient
  • C It wraps the original method and allows you to bypass execution or modify both input and output ✓ Correct
  • D It executes after both 'before' and 'after' type plugins
Explanation

Around plugins in Adobe Commerce can completely replace method execution logic, bypass the original method, or modify both method arguments and return values, making them powerful but requiring careful use.

Q21 Hard

How should you handle sensitive data like API keys in your Adobe Commerce custom extension?

  • A Define them in system.xml as encrypted configuration values using the 'encrypted' attribute ✓ Correct
  • B Store them directly in the module configuration XML files
  • C Store them in the database without encryption for performance
  • D Keep them in hardcoded variables in PHP files for quick access
Explanation

Sensitive data in Adobe Commerce should be stored as encrypted configuration values defined in system.xml with the encrypted='1' attribute, which ensures secure storage and retrieval.

Q22 Medium

What is the purpose of the Magento\Framework\Model\ResourceModel\Db\AbstractDb class?

  • A It handles database migration and schema changes
  • B It provides query caching mechanisms
  • C It provides ORM-style database operations for model persistence ✓ Correct
  • D It manages database connection pooling and optimization
Explanation

AbstractDb resource models in Adobe Commerce provide methods for database operations like load(), save(), and delete(), acting as the persistence layer between models and the database.

Q23 Hard

In Adobe Commerce, how do you programmatically add a product to a customer's cart?

  • A Call the Customer model's addToCart() method with the product ID
  • B Use the CartFactory to create a new cart and then add items directly to the cart object
  • C Get the quote from the QuoteRepository, add items using the Cart class, and save the quote ✓ Correct
  • D Directly insert records into the quote_item table using database queries
Explanation

In Adobe Commerce, you should use the QuoteRepository to retrieve or create a quote, then use the Quote model to add items programmatically and persist the changes.

Q24 Easy

What does the 'canReorder' functionality in Adobe Commerce allow customers to do?

  • A Quickly reorder the same products from a previous order with one click ✓ Correct
  • B Cancel and refund existing orders
  • C Create duplicate invoices for accounting purposes
  • D Modify the price of previously ordered items
Explanation

The canReorder feature in Adobe Commerce enables customers to create a new order containing the same products and quantities from a previous order, improving user experience for repeat purchases.

Q25 Medium

How should you extend the product collection with additional custom attributes in Adobe Commerce when loading products?

  • A Modify the core product_attribute table to include the new attributes
  • B Directly access the product database table using custom SQL queries
  • C Create a custom collection class that joins additional tables
  • D Use addAttributeToSelect() method with the attribute code as parameter ✓ Correct
Explanation

The addAttributeToSelect() method on product collections in Adobe Commerce allows you to include specific custom or core attributes in the query results without retrieving all attributes.

Q26 Easy

When creating a custom module in Adobe Commerce, which file is mandatory to define the module and its dependencies?

  • A module.xml ✓ Correct
  • B di.xml
  • C routes.xml
  • D config.xml
Explanation

The module.xml file is the declaration file that defines a module's name, version, dependencies, and other metadata. It must be present in the etc/ directory for the module to be recognized by Adobe Commerce.

Q27 Medium

In Adobe Commerce, what is the primary purpose of the Dependency Injection (DI) container?

  • A To automatically instantiate objects and manage their dependencies based on configuration in di.xml ✓ Correct
  • B To handle user authentication and session management
  • C To cache all module configurations in memory
  • D To manage database connections and query optimization
Explanation

The DI container is responsible for creating instances of classes and injecting their required dependencies as defined in the di.xml configuration file, promoting loose coupling and testability.

Q28 Medium

Which observer event is triggered before a product is saved to the database in Adobe Commerce?

  • A catalog_product_save_before ✓ Correct
  • B catalog_product_validate_before
  • C catalog_product_save_after
  • D catalog_product_prepare_save
Explanation

The catalog_product_save_before event is dispatched before product data is committed to the database, allowing developers to modify or validate product attributes before persistence.

Q29 Medium

In Adobe Commerce GraphQL, what is the purpose of a resolver?

  • A It authenticates API requests and manages access tokens for GraphQL queries
  • B It fetches data from data sources and returns it to fulfill a GraphQL field query ✓ Correct
  • C It validates and formats input arguments before they reach the query handler
  • D It defines the GraphQL schema structure and field types for API responses
Explanation

A resolver is a function that handles the actual data retrieval for a specific GraphQL field. When a field is queried, its resolver executes the logic needed to fetch and return the appropriate data.

Q30 Medium

What is the correct way to add a custom attribute to the product entity in Adobe Commerce?

  • A Use the Admin panel to create attributes and export the configuration
  • B Modify the product XML configuration file in app/etc/catalog/product.xml
  • C Add a column directly to the catalog_product_entity table using ALTER TABLE
  • D Create an InstallData script that uses addAttribute() method on the EavSetup class ✓ Correct
Explanation

The recommended approach is to use an InstallData script with EavSetup to properly create product attributes with all necessary EAV tables and configurations. Direct database modifications bypass the attribute system and are not maintainable.

Q31 Easy

In Adobe Commerce, what does the 'virtual' product type represent?

  • A A product that exists only in a staging environment and cannot be purchased
  • B A product that does not require shipping, such as services or digital downloads ✓ Correct
  • C A product type that is not yet fully configured and is hidden from customers
  • D A product that is stored in an external database and synchronized periodically
Explanation

Virtual products are intangible items that do not require shipping. They are used for services, memberships, warranties, and digital goods where physical delivery is not applicable.

Q32 Medium

Which Adobe Commerce component is responsible for translating customer-facing strings into different languages?

  • A The i18n (Internationalization) system using CSV translation files ✓ Correct
  • B The Locale Provider service configured in system.xml
  • C The Translation API endpoint in the REST framework
  • D The Language Manager module
Explanation

Adobe Commerce uses CSV translation files stored in i18n directories to manage translations. These files map English strings to translations for specific locales and are loaded based on the store's language setting.

Q33 Medium

What is the primary function of a layout XML file in Adobe Commerce?

  • A To configure server-side caching strategies for page fragments
  • B To manage CSS and JavaScript loading priorities for frontend optimization
  • C To define database table structures and relationships
  • D To define which blocks are rendered on a page and their positioning within the page structure ✓ Correct
Explanation

Layout XML files define the page structure by specifying which blocks should be rendered, their placement within containers, and their argument configuration. They are the blueprint for page construction.

Q34 Medium

In Adobe Commerce, when using the Collection class to retrieve products, what method is used to add a filter condition?

  • A filterByAttribute()
  • B addFilter() or addFieldToFilter() ✓ Correct
  • C setCondition()
  • D addWhere()
Explanation

The addFieldToFilter() method (or the chainable addFilter() method in GraphQL contexts) is used to add WHERE conditions to a collection query in Adobe Commerce, accepting field name and condition as parameters.

Q35 Hard

What is the purpose of the registry pattern in Adobe Commerce?

  • A To register custom event observers with the event dispatcher
  • B To provide a global storage mechanism for shared data within a request lifecycle ✓ Correct
  • C To cache database queries and reduce the number of database round trips
  • D To maintain a list of all installed modules and their versions
Explanation

The registry (Registry class) is used to store and retrieve objects globally within a single request. It prevents multiple instantiations of the same object and facilitates data sharing between components.

Q36 Medium

In Adobe Commerce, what does the term 'rewrite' refer to in the context of URL management?

  • A A redirect that permanently changes the customer's browser URL to a new address
  • B A process that rewrites database queries to optimize performance
  • C A technique used to compress URLs and reduce their character length for mobile devices
  • D A server-side mapping that allows custom URLs to point to catalog products, categories, or CMS pages without changing the actual URL structure ✓ Correct
Explanation

URL rewrites are mappings that allow customer-friendly URLs to be associated with products, categories, and CMS pages. The actual URL displayed to customers may differ from the internal routing structure.

Q37 Medium

Which of the following best describes the purpose of Adobe Commerce's quote management system?

  • A To manage the shopping cart contents and related data for both guest and registered customers during the checkout process ✓ Correct
  • B To track inventory quotes and manage stock reservations across warehouses
  • C To generate price estimates based on customer location and shipping method
  • D To store historical pricing quotes for reference and auditing purposes
Explanation

The quote system represents a customer's shopping cart and its associated data. It stores cart items, addresses, shipping methods, and totals. A quote becomes an order once checkout is completed.

Q38 Medium

In Adobe Commerce plugin architecture, what is the correct syntax for defining a before plugin (interceptor)?

  • A pluginBefore in the method name followed by the target method in CamelCase
  • B beforeInterceptMethod() as an argument in the __construct() method
  • C beforeMethodName() in the plugin class corresponding to the intercepted method ✓ Correct
  • D beforeClassName_MethodName() in the di.xml configuration
Explanation

A before plugin is a method in the plugin class named 'before' + the target method name in CamelCase (e.g., beforeSave()). It executes before the original method and can modify arguments.

Q39 Medium

What is the relationship between a source model and an attribute in Adobe Commerce?

  • A A source model is a database table that stores attribute values for all products
  • B A source model is used to import attribute definitions from external systems
  • C A source model provides the list of possible values for a dropdown or multiselect attribute ✓ Correct
  • D A source model defines the validation rules that attribute values must conform to
Explanation

A source model is a class that implements the OptionSourceInterface and provides an array of options (label-value pairs) for select-type attributes. It allows dynamic population of dropdown lists.

Q40 Hard

In Adobe Commerce, what does the 'staged' content concept refer to?

  • A Content that is temporarily stored in staging tables during database migrations and optimization
  • B Content that is prepared and scheduled to be published at a specific date and time through the Staging extension ✓ Correct
  • C Content that appears only in the production environment after passing quality assurance tests
  • D Content that is cached in the staging layer before being served to customers
Explanation

Content staging in Adobe Commerce allows merchants to schedule changes to product prices, inventory, attributes, and promotions to take effect at a future date and time without immediate publication.

Q41 Hard

Which mechanism in Adobe Commerce prevents two concurrent requests from modifying the same resource simultaneously?

  • A Resource locking using pessimistic locks on database rows
  • B Request queuing that serializes all write operations to the database
  • C Mutex tokens that expire after a fixed time duration
  • D Optimistic locking using version increments and conflict detection ✓ Correct
Explanation

Adobe Commerce primarily uses optimistic locking by storing version numbers. When saving, it checks if the version hasn't changed since loading; if it has, a conflict is detected and the save is rejected.

Q42 Hard

In Adobe Commerce, what is the purpose of the SetupInterface in module install/upgrade scripts?

  • A To schedule automated maintenance tasks and database cleanup operations
  • B To configure environment-specific settings such as API keys and database credentials
  • C To validate module dependencies before installation on a production server
  • D To define the database schema changes needed to upgrade the module to a new version ✓ Correct
Explanation

SetupInterface is implemented by setup classes used in InstallSchema and UpgradeSchema scripts to execute DDL operations like creating tables, adding columns, and modifying indexes.

Q43 Medium

What is the correct way to programmatically create a customer in Adobe Commerce?

  • A Insert customer data directly into the customer_entity database table
  • B Use the CustomerRepositoryInterface to execute the save() method with a CustomerInterface object ✓ Correct
  • C Instantiate the Customer model directly and save it using the save() method
  • D Call the createCustomer() method on the CustomerFactory class with customer data
Explanation

The CustomerRepositoryInterface is the service contract for customer operations. It provides the save() method which accepts a CustomerInterface object and persists the customer to the database.

Q44 Medium

In Adobe Commerce GraphQL, what does a custom query type allow developers to do?

  • A Create custom entry points in the GraphQL API to fetch data in a structured format ✓ Correct
  • B Define custom database queries that bypass the ORM for improved performance
  • C Configure authentication rules for different GraphQL endpoints
  • D Modify existing GraphQL queries to filter results based on customer roles
Explanation

Custom query types extend the GraphQL schema to provide new entry points for data retrieval. They define the structure of data returned and the arguments accepted for flexible API design.

Q45 Medium

What is the primary benefit of using Adobe Commerce's service contracts (interfaces)?

  • A They provide a stable, versioned API for module-to-module communication and third-party integrations ✓ Correct
  • B They enable automatic translation of API responses into multiple languages
  • C They reduce the file size of module code and improve server performance
  • D They automatically generate database migrations when module code changes
Explanation

Service contracts define clear interfaces (data interfaces and service interfaces) that create a stable API boundary. This allows modules to communicate reliably and enables backward compatibility across versions.

Q46 Easy

In Adobe Commerce, what is the difference between a simple product and a configurable product?

  • A A simple product is used for digital goods, while a configurable product is for physical items only
  • B A configurable product is always discounted more than a simple product
  • C A simple product can only be purchased online, while a configurable product supports both online and in-store purchases
  • D A simple product has a single SKU and inventory tracking, while a configurable product contains multiple simple products with different options ✓ Correct
Explanation

A simple product is a standalone item with one SKU. A configurable product is a parent product that has multiple associated simple products (children) representing different option combinations (size, color, etc.).

Q47 Medium

Which Adobe Commerce configuration scope is used to apply settings to a specific website within a multi-website setup?

  • A Global scope
  • B Store Group scope
  • C Store scope
  • D Website scope ✓ Correct
Explanation

Website scope applies configuration to an entire website. Website scope is higher than store scope but lower than global. Each website can have multiple store groups and stores.

Q48 Medium

In Adobe Commerce, what does the reindex process accomplish?

  • A It creates backup copies of database tables before major operations
  • B It optimizes database queries by creating new database indexes for faster retrieval
  • C It rebuilds search indices, catalog indices, and other system indices to ensure data consistency and search accuracy ✓ Correct
  • D It rearranges product order in categories to match customer search patterns
Explanation

Reindexing rebuilds the Elasticsearch or database indices used for catalog search, layered navigation, and other features. It ensures that search results reflect current product data and attributes.

Q49 Medium

What is the purpose of the events.xml configuration file in an Adobe Commerce module?

  • A To configure cron jobs and scheduled tasks for automated operations
  • B To manage event logging and monitoring for debugging purposes
  • C To define custom events that the module dispatches and observers that listen to events ✓ Correct
  • D To specify which database events trigger module functionality
Explanation

The events.xml file allows a module to declare custom events it will dispatch and to register observers that listen to events from other modules. This enables loose coupling between modules through event-driven architecture.

Q50 Hard

In Adobe Commerce development, what is the primary purpose of the around plugin (interceptor)?

  • A To prevent a method from executing if certain conditions are met
  • B To log all method calls for debugging and performance monitoring
  • C To replace method code entirely without calling the original method at all
  • D To execute code both before and after a method, with the ability to modify arguments, the method itself, and the result ✓ Correct
Explanation

An around plugin receives a callable to the original method (proceed). It can execute code before calling proceed(), modify arguments, call proceed(), and then modify the returned result, providing complete control.

Q51 Medium

You need to create a custom product attribute that should be displayed in the product edit form. Which interface must your attribute model implement to ensure proper attribute handling in the admin panel?

  • A Magento\Catalog\Model\ResourceModel\Product\Attribute
  • B Magento\Eav\Api\AttributeRepositoryInterface
  • C Magento\Eav\Model\Entity\Attribute\AbstractAttribute ✓ Correct
  • D Magento\Framework\Model\AbstractModel
Explanation

The AbstractAttribute class provides the foundation for attribute models and ensures proper handling in the admin panel. This is the standard approach for creating custom product attributes in Adobe Commerce.

Q52 Medium

When working with GraphQL in Adobe Commerce, what is the purpose of the 'products' query resolver and how does it typically interact with the product collection factory?

  • A It fetches product data from the database using the collection factory and applies filters, sorting, and pagination based on query arguments ✓ Correct
  • B It manages user authentication tokens and session persistence across requests
  • C It validates GraphQL syntax before execution and caches query results indefinitely
  • D It converts product data to XML format for legacy system compatibility
Explanation

GraphQL query resolvers retrieve data using appropriate factories and apply the requested filters, sorting, and pagination logic. This is the standard pattern for implementing GraphQL endpoints in Adobe Commerce.

Q53 Medium

Your custom module needs to modify product prices dynamically before they are displayed in the storefront. Which observer event would be most appropriate to use for this functionality?

  • A checkout_cart_update_items_before
  • B customer_login
  • C catalog_product_get_final_price ✓ Correct
  • D sales_order_place_before
Explanation

The 'catalog_product_get_final_price' event is fired when product final prices are being calculated, making it the ideal hook for dynamically modifying prices before display.

Q54 Medium

You are implementing a custom shipping method. What must be implemented to ensure proper integration with Adobe Commerce's shipping system?

  • A Use only the Magento\Quote\Api\ShipmentEstimateInterface to calculate shipping costs dynamically
  • B Extend Magento\Shipping\Model\Carrier\AbstractCarrier and implement getAllowedMethods(), collectRates(), and required configuration fields ✓ Correct
  • C Create a simple PHP class that returns a static array of shipping options without extending any core classes
  • D Implement the Magento\Sales\Api\ShipmentRepositoryInterface and override all repository methods
Explanation

Custom shipping carriers must extend AbstractCarrier and implement specific methods like getAllowedMethods() and collectRates() to properly integrate with Adobe Commerce's shipping calculation engine.

Q55 Medium

When creating an extension attribute for a product, which file type is required to define and persist the attribute data mapping?

  • A attribute_metadata.json in the var/cache directory
  • B extension_config.sql in the setup scripts directory
  • C product_attributes.php in the config folder
  • D extension_attributes.xml in the etc directory of your module ✓ Correct
Explanation

Extension attributes are defined in the extension_attributes.xml file located in the module's etc directory. This XML configuration specifies how extension attributes are mapped to product entities.

Q56 Medium

You need to create a database migration script that adds a new column to an existing custom table. Which approach aligns with Adobe Commerce best practices?

  • A Write raw SQL directly in a module's setup script without using the declarative schema approach
  • B Create a custom CLI command that executes ALTER TABLE statements directly against the database
  • C Manually run MySQL commands on the production database before deploying code changes
  • D Use InstallSchema or UpgradeSchema classes with the SchemaSetupInterface to define table changes declaratively ✓ Correct
Explanation

Adobe Commerce recommends using InstallSchema/UpgradeSchema classes with SchemaSetupInterface for database migrations, which ensures version control and proper rollback capabilities.

Q57 Hard

What is the primary advantage of using Magento's Layout XML system instead of directly outputting HTML in a controller or template?

  • A It reduces the file size of templates and improves browser rendering performance significantly
  • B Layout XML allows for modular block definitions, easy reordering of page elements, and clean separation between template logic and page structure, enabling better extensibility and maintainability ✓ Correct
  • C HTML output in controllers is faster but Layout XML provides documentation features that are required for certification
  • D The system automatically converts Layout XML to pure HTML and caches it for unlimited performance gains
Explanation

Layout XML provides a declarative, modular approach to page composition that enables developers to reorder, remove, or modify page elements without touching template files, supporting better extensibility.

Q58 Hard

In Adobe Commerce, when should you use a preference to override a class versus using an observer or plugin?

  • A Preferences should be used sparingly for core functionality overrides when observers and plugins cannot achieve the required behavior modification, as they replace entire class implementations ✓ Correct
  • B Use preferences only for backward compatibility with Magento 1 extensions that need to be migrated
  • C Preferences and plugins are identical in functionality, so choose whichever sounds better for your use case
  • D Always use preferences because they are faster and more efficient than plugins and observers in all scenarios
Explanation

Preferences replace entire class implementations and should be used judiciously. Plugins and observers are preferred for most use cases as they're less invasive and more maintainable. Preferences are appropriate only when other extension mechanisms cannot achieve the required behavior.

Q59 Hard

You are debugging a custom module that implements a plugin for product saving. The plugin's beforeSave() method is not being invoked. What is the most likely cause?

  • A The beforeSave() method requires three parameters: the subject, first argument, and second argument, exactly in that order
  • B Plugins automatically disable themselves when the database is too large
  • C Adobe Commerce only supports afterSave() plugins and beforeSave() plugins were deprecated in version 2.3
  • D The plugin is declared in di.xml with incorrect type name, instance name, or method that does not exist on the target class ✓ Correct
Explanation

Plugin invocation failures are typically caused by incorrect di.xml configuration, mismatched type names, instance names, or referencing methods that don't exist. Verify the plugin declaration matches the actual class and method names.

Q60 Hard

When implementing a custom API endpoint using WebAPI, what is the correct way to define return types and ensure proper serialization of complex objects?

  • A Define return types using PHP interfaces in the webapi.xml file with proper @api annotations, and ensure objects implement the appropriate data interfaces for serialization ✓ Correct
  • B Manually json_encode all return data in your service methods to guarantee proper API response formatting
  • C Use only scalar return types like string, integer, and boolean to avoid serialization issues with objects and arrays
  • D Return raw array data from your API service and let the framework automatically convert it to JSON without any type definitions
Explanation

WebAPI requires proper type definitions in webapi.xml and data objects should implement appropriate interfaces to ensure correct serialization. The framework handles JSON conversion automatically when types are properly defined.

Ready to test your knowledge?

You've reviewed all 60 questions. Take the interactive practice exam to simulate the real test environment.

▶ Start Practice Exam — Free