ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 15 - AD0-E722 discussion

Report
Export

An Adobe Commerce Architect designs a data flow that contains a new product type with its own custom pricing logic to meet a merchant requirement. Which three steps are required when adding a product type with custom pricing? (Choose three.)

A.
Content of the etc/product_types.xml file
Answers
A.
Content of the etc/product_types.xml file
B.
Data patch to register the new product type
Answers
B.
Data patch to register the new product type
C.
Hydrator for attributes belonging to the new product type
Answers
C.
Hydrator for attributes belonging to the new product type
D.
New price model extending \Magento\Catalog\Model\Product\Type\Price
Answers
D.
New price model extending \Magento\Catalog\Model\Product\Type\Price
E.
Custom type model extended from the abstract Product Type model
Answers
E.
Custom type model extended from the abstract Product Type model
F.
A new class with custom pricing logic, extending the abstract Product model class
Answers
F.
A new class with custom pricing logic, extending the abstract Product model class
Suggested answer: A, D, E

Explanation:

To add a product type with custom pricing, the Architect needs to do the following steps:

Create a content of the etc/product_types.xml file that defines the new product type, its label, model, index priority, and price model.This file is used to register the new product type and its associated classes in Magento1.

Create a new price model that extends \Magento\Catalog\Model\Product\Type\Price and implements the custom pricing logic for the new product type.The price model is responsible for calculating the final price of the product based on various factors, such as special price, tier price, catalog price rules, etc2.

Create a custom type model that extends from the abstract Product Type model (\Magento\Catalog\Model\Product\Type\AbstractType) and overrides the methods related to the product type behavior, such as prepareForCart, getAssociatedProducts, etc.The type model defines how the product type interacts with other components, such as quote, order, cart, etc3.Reference:

How to add a new product type in Magento 2? (MageStackDay mystery question 1) - Magento Stack Exchange

Magento 2: How to create custom product types - BelVG Blog

Magento 2: How to create custom product types - BelVG Blog

asked 02/10/2024
Ludovic HEZON
41 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first