Skip to content
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

ProductService.xml now returns idCode of features, correct product availability and productFeatureId #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions service/popstore/ProductServices.xml
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ along with this software (see the LICENSE.md file). If not, see
<set field="productAvailability" from="[:]"/>
<iterate list="productAssetSumList" entry="assetSum">
<script>
productAvailability.put(assetSum.productId, assetSum.availableToPromiseTotal>0)
productAvailability.put(assetSum.productId, assetSum.availableToPromiseTotal)
</script>
</iterate>
</actions>
Expand Down Expand Up @@ -391,7 +391,7 @@ along with this software (see the LICENSE.md file). If not, see
<entity-find-one entity-name="mantle.product.feature.ProductFeature" value-field="productFeature" cache="true">
<field-map field-name="productFeatureId" from="variantProductAssoc.productFeatureId"/>
</entity-find-one>
<service-call name="popstore.ProductServices.get#ProductQuantity" out-map="productQuantity" in-map="[productId:variantProductAssoc.toProductId]"/>
<service-call name="popstore.ProductServices.get#ProductQuantity" out-map="productQuantity" in-map="[productId:variantProductAssoc.toProductId]" out-map-add-to-existing="false" />
<entity-find-one entity-name="moqui.basic.Enumeration" value-field="featureType" cache="true">
<field-map field-name="enumId" from="productFeature.productFeatureTypeEnumId"/>
</entity-find-one>
Expand All @@ -416,7 +416,7 @@ along with this software (see the LICENSE.md file). If not, see
if (!featureSet) {
listFeatures.put(content,
[[productFeatureId:productFeature.productFeatureId,
productFeatureTypeEnumId:productFeature.productFeatureTypeEnumId,
productFeatureTypeEnumId:productFeature.productFeatureTypeEnumId, idCode:productFeature.idCode,
description:productFeature.description, abbrev:productFeature.abbrev, price:selectedPrices]])
} else {
boolean isItemInList = false
Expand All @@ -428,17 +428,17 @@ along with this software (see the LICENSE.md file). If not, see
}
if(!isItemInList) {
featureSet.add([productFeatureId:productFeature.productFeatureId,
productFeatureTypeEnumId:productFeature.productFeatureTypeEnumId,
productFeatureTypeEnumId:productFeature.productFeatureTypeEnumId, idCode:productFeature.idCode,
description:productFeature.description, abbrev:productFeature.abbrev, price:selectedPrices])
}
}

def optionSet = variantOptions.get(item)
if (!optionSet) {
variantOptions.put(item, [[productId: variantProductAssoc.toProductId, description:productFeature.description, quantity: productQuantity.productQuantity,
variantOptions.put(item, [[productId: variantProductAssoc.toProductId, description:productFeature.description, quantity: productQuantity.productQuantity, productFeatureId:productFeature.productFeatureId,
prices:selectedPrices, contentList:productContentList]])
} else {
optionSet.add([productId: variantProductAssoc.toProductId, description:productFeature.description, quantity: productQuantity.productQuantity,
optionSet.add([productId: variantProductAssoc.toProductId, description:productFeature.description, quantity: productQuantity.productQuantity, productFeatureId:productFeature.productFeatureId,
prices:selectedPrices, contentList:productContentList])
}
priceSet = null
Expand Down