Skip to content

Commit

Permalink
Merge pull request #141 from gurveenbagga/shopify-product-inv-changes…
Browse files Browse the repository at this point in the history
…-for-v1-3-5

Shopify product inv changes for v1.3.5
  • Loading branch information
gurveenbagga authored Apr 23, 2024
2 parents 46c441a + 8050600 commit fb9a78b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 16 deletions.
2 changes: 1 addition & 1 deletion component.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ under the License.
-->

<component xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://moqui.org/xsd/moqui-conf-3.xsd"
name="ofbiz-oms-udm" version="1.3.3">
name="ofbiz-oms-udm" version="1.3.5">
<!-- no dependencies -->
</component>
41 changes: 26 additions & 15 deletions entity/OmsShopifyViewEntities.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ under the License.

<!-- NOTE: The products that have been deleted from Shopify will not appear in the view as their record in ShopifyShopProduct is also deleted.
Hence no extra handling is required. -->
<!-- The ShopifyProductInventory view has the support to fetch the inventory for multi channel inventory scenario.
If there is a requirement to fetch the inventory for the specific channel i.e. Shopify, it will be a separate Facility Group, and so a parameter 'facilityGroupId' is added to the corresponding service
to fetch the inventory to be sent to Shopify. -->

<view-entity entity-name="ShopifyProductInventory" package="co.hotwax.shopify" group="ofbiz_transactional">
<description>
View entity for Product Inventory details for Shopify in HotWax.
Expand Down Expand Up @@ -81,24 +85,10 @@ under the License.
have been turned off for inventory sharing i.e. where thruDate is set.
If we keep the date-filter in the view, the expired records of FacilityGroupMember will not come in the view,
and so the inventory change due to turned off facilities will not be identified, hence the updated inventory
will not be pushed to Shopify.. -->
<!-- 1. Condition added to include inventory for Online Facility Group -->
<!-- 2. OR with Condition added to include facilityTypeId='CONFIGURATION' for the below scenario,
As part of initial implementation, the only condition added was to include members of
only Online group and CONFIGURATION type facility is not member of it.
Due to this, if threshold is updated for a product, the feed will not pick it up as a change
since that record is not included in the view, And so updated inventory does not get pushed to
Shopify. -->
will not be pushed to Shopify. -->
<alias entity-alias="PT" name="productTypeId"/>
<alias entity-alias="PT" name="isPhysical"/>
<alias entity-alias="PT" name="isDigital"/>

<entity-condition>
<econditions combine="or">
<econdition field-name="facilityGroupTypeId" value="SHOPIFY_GROUP_FAC"/>
<econdition field-name="facilityTypeId" value="CONFIGURATION"/>
</econditions>
</entity-condition>
</view-entity>

<view-entity entity-name="ProductFacilityAndType" package="co.hotwax.product.facility" group="ofbiz_transactional">
Expand Down Expand Up @@ -147,4 +137,25 @@ under the License.
<date-filter from-field-name="productStoreFacilityFromDate" thru-field-name="productStoreFacilityThruDate"/>
</entity-condition>
</view-entity>

<view-entity entity-name="FacilityGroupAndMember" package="co.hotwax.facility" group="ofbiz_transactional">
<description>
View entity for Facility and Facility Group Member details.
</description>
<member-entity entity-alias="FG" entity-name="org.apache.ofbiz.product.facility.FacilityGroup"/>
<member-entity entity-alias="FGM" entity-name="org.apache.ofbiz.product.facility.FacilityGroupMember" join-from-alias="FG">
<key-map field-name="facilityGroupId"/>
</member-entity>
<member-entity entity-alias="F" entity-name="org.apache.ofbiz.product.facility.Facility" join-from-alias="FGM">
<key-map field-name="facilityId"/>
</member-entity>
<alias-all entity-alias="FG"/>
<alias-all entity-alias="FGM">
<exclude field="facilityGroupId"/>
</alias-all>
<alias-all entity-alias="F">
<exclude field="facilityId"/>
<exclude field="description"/>
</alias-all>
</view-entity>
</entities>

0 comments on commit fb9a78b

Please sign in to comment.