-
Notifications
You must be signed in to change notification settings - Fork 22
[Draft] Product override #17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@magento run all tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm still going through some of the more detailed pieces of the query builder/processor, but it looks good so far. Very interesting. I do have some comments/questions regarding usage of query xml vs in code queries and what exactly defines a "legacy feed"
|
||
## Release notes | ||
|
||
*Magento_DataExporter* module |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick: module name copied over here
<filter glue="and"> | ||
<condition attribute="entity_id" operator="in" type="placeholder">entityIds</condition> | ||
</filter> | ||
<link-source name="store_website"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the equivalent of
select cpip.entity_id, ..., sw.code as websiteCode from catalog_product_index_price cpip inner join store_website sw on sw.website_id = cpip.website_id
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
true, join behavior can be changed through the instruction link type
/** | ||
* Product export feed indexer class | ||
*/ | ||
class LegacyFeedIndexer implements IndexerActionInterface, MviewActionInterface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What makes a feed "legacy"? Is it because the queries are in code vs in XML?
If so, could it be possible to use either XML query or an in code query? There may be cases where XML is more limiting and a more complex query is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have trouble finding a proper name, this particular class coupled to products and can not be reused, but in the future, I do want to have it at all. for now, removing could cause unnecessary refactoring ...
<attribute name="final_price" alias="finalPrice"/> | ||
<attribute name="min_price"/> | ||
<filter glue="and"> | ||
<condition attribute="entity_id" operator="in" type="placeholder">entityIds</condition> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little confused on how these get populated. How is the placeholder actually used in calling this?
public function get(array $values): array | ||
{ | ||
foreach ($values as $value) { | ||
$queryArguments['entityIds'][] = $value['productId']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the injection of placeholders
in the query XML?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not exactly, it rather preparation of arguments that will be passed
<attribute name="tax_class_id"/> | ||
<attribute name="price" alias="regularPrice"/> | ||
<attribute name="final_price" alias="finalPrice"/> | ||
<attribute name="min_price"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do JSON parsing selects here like feed_data->'$.prices.maximumPrice.finalPrice'
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not now, but it is easy to add.
…e-data-export-16 [Imported] CatalogExportApi auto-generation
MDEE-40: change primary key
Description (*)
Related Pull Requests
Fixed Issues (if relevant)
Questions or comments
Code Review Checklist (*)