Skip to content

Commit

Permalink
BEG-151: Use type instead of virtualType and include subscription_mod…
Browse files Browse the repository at this point in the history
…el in mview.xml #13
  • Loading branch information
mausham-shrestha-aligent committed Mar 18, 2024
1 parent f4e79ba commit 9df04ae
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
9 changes: 1 addition & 8 deletions etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,9 @@
</argument>
</arguments>
</type>
<virtualType name="customStagedProductAttributeSubscription" type="Aligent\Prerender\Model\Mview\View\Attribute\Subscription">
<type name="Aligent\Prerender\Model\Mview\View\Attribute\CatalogProductLinkSubscription">
<arguments>
<argument name="entityInterface" xsi:type="string">Magento\Catalog\Api\Data\ProductInterface</argument>
</arguments>
</virtualType>
<type name="Magento\CatalogStaging\Model\Mview\View\SubscriptionFactory">
<arguments>
<argument name="subscriptionModels" xsi:type="array">
<item name="catalog_product_link" xsi:type="string">customStagedProductAttributeSubscription</item>
</argument>
</arguments>
</type>
</config>
4 changes: 2 additions & 2 deletions etc/mview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<table name="catalog_product_entity_text" entity_column="entity_id" />
<table name="catalog_product_entity_tier_price" entity_column="entity_id" />
<table name="catalog_product_entity_varchar" entity_column="entity_id" />
<table name="catalog_product_link" entity_column="product_id" />
<table name="catalog_product_link" entity_column="product_id" subscription_model="Aligent\Prerender\Model\Mview\View\Attribute\CatalogProductLinkSubscription"/>
<table name="catalogrule_product_price" entity_column="product_id" />
<table name="cataloginventory_stock_item" entity_column="product_id" />
</subscriptions>
Expand All @@ -41,7 +41,7 @@
<table name="catalog_product_entity_text" entity_column="entity_id" />
<table name="catalog_product_entity_tier_price" entity_column="entity_id" />
<table name="catalog_product_entity_varchar" entity_column="entity_id" />
<table name="catalog_product_link" entity_column="product_id" />
<table name="catalog_product_link" entity_column="product_id" subscription_model="Aligent\PrerenderIo\Model\Mview\View\Attribute\CatalogProductLinkSubscription"/>
<table name="catalogrule_product_price" entity_column="product_id" />
<table name="cataloginventory_stock_item" entity_column="product_id" />
<table name="catalog_category_product" entity_column="product_id" />
Expand Down

0 comments on commit 9df04ae

Please sign in to comment.