-
Notifications
You must be signed in to change notification settings - Fork 45
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
Implemented: product identifier component in settings page from dxp-components (dxp-178) #237
Implemented: product identifier component in settings page from dxp-components (dxp-178) #237
Conversation
…n cases (dxp/178)
// Get product identification from api using dxp-component and set the state if eComStore is defined | ||
if (this.currentEComStore.productStoreId) { | ||
await useProductIdentificationStore().getIdentificationPref(this.currentEComStore.productStoreId) | ||
.catch((error) => console.error(error)); |
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.
.catch((error) => console.error(error)); | |
.catch((error) => console.error(error)); |
src/store/modules/user/actions.ts
Outdated
if (preferredStoreId){ | ||
await useProductIdentificationStore().getIdentificationPref(preferredStoreId) | ||
.catch((error) => console.error(error)); | ||
} |
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.
We can move this logic above, where we are checking for preferredStoreId.
src/views/orders.vue
Outdated
@@ -120,7 +120,7 @@ | |||
<ShopifyImg :src="getProduct(item.productId).mainImageUrl" size="small"></ShopifyImg> | |||
</ion-thumbnail> | |||
<ion-label> | |||
<h2>{{ item.parentProductName ? item.parentProductName :item.productName }}</h2> | |||
<h2>{{ getProductIdentificationValue(productIdentificationPref.primaryId, item) }}</h2> |
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 if the selected primaryId is not available on the product?
// Get product identification from api using dxp-component and set the state if eComStore is defined | ||
if (payload.eComStore.productStoreId) { | ||
await useProductIdentificationStore().getIdentificationPref(payload.eComStore.productStoreId) | ||
.catch((error) => console.error(error)); |
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.
.catch((error) => console.error(error)); | |
.catch((error) => console.error(error)); |
<h4>{{ getProductIdentificationValue(productIdentificationPref.primaryId, currentVariant) }}</h4> | ||
<p>{{ getProductIdentificationValue(productIdentificationPref.secondaryId, currentVariant) }}</p> |
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.
Please check if these changes are required or not.
…condition (dxp/178)
Implemented: logic to fetch Product identification from Dxp component (#237)
Related Issues
Related Issue: hotwax/dxp-components#178
Short Description and Why It's Useful
Improved the code to use the product identifier component implemented in dxp-components on the settings page.
Testing
The working of this code can be tested with the following pr: hotwax/dxp-components#192
Screenshots of Visual Changes before/after (If There Are Any)
IMPORTANT NOTICE - Remember to update
CHANGELOG.md
with description of your changeContribution and Currently Important Rules Acceptance