-
Notifications
You must be signed in to change notification settings - Fork 212
@W-19263207 [V4 Migration] Support standard product #3007
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
Merged
sf-jie-dai
merged 7 commits into
feature/standard-product-v4
from
jdai.W-19263207.supportStandardProductV4
Aug 8, 2025
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
a61ff34
feat: support standard product v4
sf-jie-dai 55c5df8
fix: fix skipped unit test
sf-jie-dai cce2757
fix: remove unnecessary test id
sf-jie-dai 789683a
add change log
sf-jie-dai a8973d7
no change log needed when merging into feature branch
sf-jie-dai b41e9f3
fix equalalpha order of product & variant
sf-jie-dai 0e5a383
remove unnecessary product and support empty variant
sf-jie-dai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
113 changes: 113 additions & 0 deletions
113
packages/template-chakra-storefront/mocks/standard-product.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| /* | ||
| * Copyright (c) 2025, Salesforce, Inc. | ||
| * All rights reserved. | ||
| * SPDX-License-Identifier: BSD-3-Clause | ||
| * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause | ||
| */ | ||
|
|
||
| export const mockStandardProductOrderable = { | ||
| currency: 'GBP', | ||
| id: 'a-standard-dress', | ||
| imageGroups: [ | ||
| { | ||
| images: [ | ||
| { | ||
| alt: 'White and Black Tone, , large', | ||
| disBaseLink: | ||
| 'https://edge.disstg.commercecloud.salesforce.com/dw/image/v2/ZZRF_001/on/demandware.static/-/Sites-apparel-m-catalog/default/dw9178fd89/images/large/PG.W20766.IVORYXX.PZ.jpg', | ||
| link: 'https://zzrf-001.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-apparel-m-catalog/default/dw9178fd89/images/large/PG.W20766.IVORYXX.PZ.jpg', | ||
| title: 'White and Black Tone, ' | ||
| } | ||
| ], | ||
| viewType: 'large' | ||
| }, | ||
| { | ||
| images: [ | ||
| { | ||
| alt: 'White and Black Tone, , medium', | ||
| disBaseLink: | ||
| 'https://edge.disstg.commercecloud.salesforce.com/dw/image/v2/ZZRF_001/on/demandware.static/-/Sites-apparel-m-catalog/default/dw9af8c50e/images/medium/PG.W20766.IVORYXX.PZ.jpg', | ||
| link: 'https://zzrf-001.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-apparel-m-catalog/default/dw9af8c50e/images/medium/PG.W20766.IVORYXX.PZ.jpg', | ||
| title: 'White and Black Tone, ' | ||
| } | ||
| ], | ||
| viewType: 'medium' | ||
| }, | ||
| { | ||
| images: [ | ||
| { | ||
| alt: 'White and Black Tone, , small', | ||
| disBaseLink: | ||
| 'https://edge.disstg.commercecloud.salesforce.com/dw/image/v2/ZZRF_001/on/demandware.static/-/Sites-apparel-m-catalog/default/dw58be3274/images/small/PG.W20766.IVORYXX.PZ.jpg', | ||
| link: 'https://zzrf-001.dx.commercecloud.salesforce.com/on/demandware.static/-/Sites-apparel-m-catalog/default/dw58be3274/images/small/PG.W20766.IVORYXX.PZ.jpg', | ||
| title: 'White and Black Tone, ' | ||
| } | ||
| ], | ||
| viewType: 'small' | ||
| } | ||
| ], | ||
| inventory: { | ||
| ats: 999999, | ||
| backorderable: false, | ||
| id: 'inventory_m', | ||
| orderable: true, | ||
| preorderable: false, | ||
| stockLevel: 999999 | ||
| }, | ||
| longDescription: 'A Standard Dress', | ||
| minOrderQuantity: 1, | ||
| name: 'White and Black Tone', | ||
| pageMetaTags: [ | ||
| { | ||
| id: 'description', | ||
| value: 'Buy White and Black Tone at RefArchGlobal.' | ||
| }, | ||
| { | ||
| id: 'robots', | ||
| value: 'index, follow' | ||
| }, | ||
| { | ||
| id: 'og:url', | ||
| value: 'https://zzrf-001.dx.commercecloud.salesforce.com/on/demandware.store/s/RefArchGlobal/dw/shop/v99_9/products/a-standard-dress?currency=GBP&locale=en-GB&expand=availability,promotions,options,images,prices,variations,set_products,bundled_products,page_meta_tags&all_images=true' | ||
| }, | ||
| { | ||
| id: 'title', | ||
| value: 'Buy White and Black Tone for GBP 4.00 | RefArchGlobal' | ||
| } | ||
| ], | ||
| price: 4, | ||
| pricePerUnit: 4, | ||
| primaryCategoryId: 'womens-outfits', | ||
| shortDescription: 'A Standard Dress', | ||
| slugUrl: | ||
| 'https://zzrf-001.dx.commercecloud.salesforce.com/s/RefArchGlobal/en_GB/product/a-standard-dress/a-standard-dress.html', | ||
| stepQuantity: 1, | ||
| type: { | ||
| item: true | ||
| }, | ||
| tieredPrices: [ | ||
| { | ||
| price: 70, | ||
| pricebook: 'gbp-m-list-prices', | ||
| quantity: 1 | ||
| }, | ||
| { | ||
| price: 4, | ||
| pricebook: 'gbp-m-sale-prices', | ||
| quantity: 1 | ||
| } | ||
| ] | ||
| } | ||
|
|
||
| export const mockStandardProductNotOrderable = { | ||
| ...mockStandardProductOrderable, | ||
| id: 'a-standard-dress-not-orderable', | ||
| inventory: { | ||
| ats: 0, | ||
| backorderable: false, | ||
| id: 'inventory_m', | ||
| orderable: false, | ||
| preorderable: false, | ||
| stockLevel: 0 | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.