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

Jira/waf 775 - TO DELETE OR CLOSE #36

Draft
wants to merge 237 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
237 commits
Select commit Hold shift + click to select a range
adad825
Add urlKey parameter to route config
herzog31 Jan 29, 2024
e3ce857
Add image optimization feature
herzog31 Jan 30, 2024
c1b2596
Merge branch 'issue/8' of github.com:herzog31/storefront-product-list…
herzog31 Jan 30, 2024
659ced8
Merge branch 'issue/10' of github.com:herzog31/storefront-product-lis…
herzog31 Jan 30, 2024
862a029
new plp features
kathleentynan Feb 8, 2024
930fad2
new features plp
kathleentynan Feb 8, 2024
2420917
elsie base design
kathleentynan Feb 8, 2024
c5c227d
add elsie base design
kathleentynan Feb 12, 2024
719a2d6
Replace MSE SDK with direct access to ACDL
herzog31 Mar 11, 2024
54b9f34
Add missing categoryContext
herzog31 Mar 14, 2024
5fd944d
Add categoryIds filter
herzog31 Mar 14, 2024
b15d5de
Add categoryContext to PLP
herzog31 Mar 14, 2024
c4b7cbd
set wilson connection details. Temp fix for images
chicharr Mar 22, 2024
be8ff6d
feat: plp implementation wip
catalan-adobe Mar 28, 2024
12bbcb8
fix: background image in product item tile
catalan-adobe Apr 5, 2024
f5fb75b
style: column gap between product item tiles
catalan-adobe Apr 5, 2024
f80944f
feat: add "add to cart" button on product item tile
catalan-adobe Apr 5, 2024
625c343
chore: cleanup
catalan-adobe Apr 5, 2024
4fccd32
Merge pull request #1 from chicharr/wilsonplp
chicharr Apr 5, 2024
949ca52
Use categoryPath for filtering
herzog31 May 16, 2024
9d3a2db
Merge pull request #1 from wilson-ecommerce/wilson-pdp
chicharr May 29, 2024
caed3de
WIP filters
johnnyung91 Jun 10, 2024
1fcaecc
WIP styling filters
johnnyung91 Jun 11, 2024
de3d4d2
style changes
johnnyung91 Jun 11, 2024
3b0d48b
extracted filter selections
johnnyung91 Jun 18, 2024
f26d9ee
Add fatsly image optimiser settings
yugandhar02 Jun 20, 2024
83b1699
extracted title from filter selections
johnnyung91 Jun 20, 2024
dbbda28
rearranged filtered results
johnnyung91 Jun 20, 2024
6fd41b7
Merge pull request #2 from wilson-ecommerce/image-settings
yugandhar02 Jun 21, 2024
f8592ba
relocated sort
johnnyung91 Jun 21, 2024
cb38011
filter drop down styling
johnnyung91 Jun 21, 2024
3e91bfd
added test for new components
johnnyung91 Jun 21, 2024
9021017
commented out
johnnyung91 Jun 24, 2024
bd5deb8
added mobile filter button changes
johnnyung91 Jun 24, 2024
fd6919c
added uppercase class
johnnyung91 Jun 24, 2024
e131e54
Add size swatch support in product item
yugandhar02 Jun 24, 2024
5ed78f9
Add necessary meta tags
yugandhar02 Jun 24, 2024
c7c5aee
Make image hover transition faster
yugandhar02 Jun 24, 2024
7d98b8e
Handle addToCart for complex product type and hide size swatches on m…
yugandhar02 Jun 25, 2024
8e1d95e
Prevent page navigation on swatch or quick add button click
yugandhar02 Jun 25, 2024
9156c8a
mobile facet structure
johnnyung91 Jun 25, 2024
1df11a7
WIP mobile filters
johnnyung91 Jun 25, 2024
69629ff
working drawer
johnnyung91 Jun 25, 2024
31f47a6
remove scroll from body when drawer is open
johnnyung91 Jun 25, 2024
b805000
reorganized global styles
johnnyung91 Jun 25, 2024
68a882f
Merge pull request #3 from wilson-ecommerce/plp-page
yugandhar02 Jun 26, 2024
daedc0d
Fix pagination css
yugandhar02 Jun 25, 2024
f82215b
Fix button state css
yugandhar02 Jun 26, 2024
01735c5
Fix computation error
yugandhar02 Jun 27, 2024
626c3e4
Merge pull request #5 from wilson-ecommerce/pagination
yugandhar02 Jun 27, 2024
e18cf02
tailwind build
johnnyung91 Jun 27, 2024
c3b3e05
more tailwind config
johnnyung91 Jun 27, 2024
a46a055
Merge branch 'main' into waf-19/plp-filters-
johnnyung91 Jun 27, 2024
004d738
Get image urls from product search query instead of refined product q…
yugandhar02 Jun 28, 2024
4d43e10
Resolve code review comments
yugandhar02 Jul 2, 2024
5b5b090
Merge pull request #6 from wilson-ecommerce/waf-38
yugandhar02 Jul 2, 2024
bbc65ab
Fix previous button text and underline button text on hover
yugandhar02 Jul 10, 2024
0cabe0c
Merge pull request #7 from wilson-ecommerce/pagination-fix
yugandhar02 Jul 10, 2024
927ea21
added - icon logic
johnnyung91 Jul 10, 2024
acbff6c
clean up
johnnyung91 Jul 10, 2024
2fbc410
cleanup
johnnyung91 Jul 11, 2024
0ac962b
Merge pull request #4 from wilson-ecommerce/waf-19/plp-filters-
johnnyung91 Jul 11, 2024
c085245
desktop sort options
johnnyung91 Jul 12, 2024
9a152ac
mobile sort
johnnyung91 Jul 12, 2024
76d9208
Make size option button smaller in smaller screens
yugandhar02 Jul 10, 2024
31bcbf0
Resolve code review comments
yugandhar02 Jul 16, 2024
0042d2c
Fix lint errors
yugandhar02 Jul 16, 2024
fa6f2ab
Merge branch 'main' of github.com:adobe/storefront-product-listing-page
herzog31 Jul 17, 2024
cd167ac
Merge branch 'main' of github.com:herzog31/storefront-product-listing…
herzog31 Jul 17, 2024
e035027
Respect redirect route in storefront events
herzog31 Jul 17, 2024
5deb71a
Merge pull request #8 from wilson-ecommerce/waf-120-fixes
yugandhar02 Jul 18, 2024
d856191
WAF-287: Add colorway swaches
yugandhar02 Jul 16, 2024
7e1c235
Compute visible swatches
yugandhar02 Jul 27, 2024
4dacb2e
Remove unnecessary changes
yugandhar02 Jul 27, 2024
2b6e154
Use resize observer instead on window resize
yugandhar02 Jul 27, 2024
4d5b54d
Fix failing test
yugandhar02 Jul 27, 2024
796d0a9
WAF-104 - Adder containers for eds promos
Jul 29, 2024
b9bb4d4
Use default image for swatches
yugandhar02 Jul 29, 2024
e2d3ba1
Merge pull request #11 from wilson-ecommerce/waf-287
chicharr Jul 29, 2024
17cfb04
Remove swatch hover functionality from PLP swatches
yugandhar02 Jul 30, 2024
21a3351
Merge pull request #12 from wilson-ecommerce/waf-287-fixes
chicharr Jul 31, 2024
127ed74
Fix swatch image quality
yugandhar02 Jul 31, 2024
f318329
Use placeholder image instead of first swatch image as fallback
yugandhar02 Jul 31, 2024
fbfa7fb
Merge pull request #14 from wilson-ecommerce/waf-344
yugandhar02 Aug 2, 2024
b647cec
Merge pull request #13 from wilson-ecommerce/waf-104-plp-enrichment-c…
rhudea Aug 7, 2024
6aa1000
[WIL] PLP - Product Graveyard
ravverma Aug 8, 2024
15c5596
Add necessary PLP schema
rhudea Aug 8, 2024
f590759
Add more schema details
rhudea Aug 9, 2024
8f9e52b
Merge pull request #17 from wilson-ecommerce/plp-schema
rhudea Aug 12, 2024
52849fc
PLP price
ravverma Aug 12, 2024
0d0a055
Merge pull request #19 from ravverma/plp-price
ravverma Aug 12, 2024
b3a81dc
Price styling on PLP
ravverma Aug 13, 2024
2f942b2
fixing alignment
ravverma Aug 13, 2024
b3af843
fixing alignment
ravverma Aug 13, 2024
dc15c48
Merge pull request #20 from wilson-ecommerce/price-styling
ravverma Aug 14, 2024
5662897
WAF-120: Add attribute check for quick add button (#18)
yugandhar02 Aug 14, 2024
2b5c783
Display category as links
rhudea Aug 14, 2024
72b4d82
Checkbox should still be there for search
rhudea Aug 14, 2024
7630a47
Merge remote-tracking branch 'origin/main' into category-filters
rhudea Aug 14, 2024
f436d0e
Make npm run dev work
rhudea Aug 14, 2024
4fc995a
Fix quotes
rhudea Aug 14, 2024
c705a95
Merge pull request #23 from wilson-ecommerce/category-filters
rhudea Aug 14, 2024
adb5922
WAF-146: Advanced search page interface and No search results page (#22)
yugandhar02 Aug 14, 2024
b93aee7
WAF-41 - prechecked filters for custom category
chicharr Aug 19, 2024
8b9d796
initial franchises implementation
hannessolo Aug 19, 2024
bf0b39c
Merge pull request #16 from ravverma/product-graveyard
ravverma Aug 20, 2024
5a53eba
fix types and hide franchises if filtered
hannessolo Aug 20, 2024
7cf856d
add load more
hannessolo Aug 20, 2024
ac592b7
Merge pull request #24 from wilson-ecommerce/prechecked-filters
chicharr Aug 21, 2024
c8d66d6
Filter swatches by categoryId and eds segmentation
chicharr Aug 21, 2024
ed464f8
Use categoryPath for filtering
herzog31 May 16, 2024
0b0b1f3
Merge latest acdl fork
chicharr Aug 21, 2024
940f79c
add franchise view toggle
hannessolo Aug 21, 2024
a976bc9
fix add to cart button
hannessolo Aug 21, 2024
c2fa486
Merge remote-tracking branch 'origin/main' into franchises
hannessolo Aug 21, 2024
a67534d
fix toggle franchise
hannessolo Aug 21, 2024
35be308
WAF-186: Master switch to disable all purchases - implemented
mikeweis Aug 21, 2024
089c095
Merge branch 'main' into waf-113-plp-sort
johnnyung91 Aug 21, 2024
2d02635
changes to merge latest acdl branch
chicharr Aug 21, 2024
e449b6c
Merge branch 'main' into update-widget
chicharr Aug 21, 2024
ee13270
Merge pull request #26 from wilson-ecommerce/update-widget
chicharr Aug 21, 2024
e2cd6c1
Merge pull request #9 from wilson-ecommerce/waf-113-plp-sort
johnnyung91 Aug 21, 2024
9856d2d
Merge pull request #25 from wilson-ecommerce/franchises
chicharr Aug 21, 2024
562ff93
Merge branch 'main' into waf-186-disable-all-purchases
mikeweis Aug 21, 2024
696b634
Merge pull request #28 from wilson-ecommerce/waf-186-disable-all-purc…
chicharr Aug 22, 2024
6d0e439
update latest main
chicharr Aug 22, 2024
1f4178b
Fix lint and build errors
yugandhar02 Aug 22, 2024
c0520c2
Merge pull request #29 from wilson-ecommerce/fix-build-errors
chicharr Aug 22, 2024
7b52f7b
Merge branch 'main' into swatch-filtering
chicharr Aug 22, 2024
ec8ae4a
Allow Swatch filtering (segmentation) in category PLP
chicharr Aug 22, 2024
fb8796a
Merge pull request #30 from wilson-ecommerce/swatch-filtering
chicharr Aug 22, 2024
07db1c3
WAF-145: Address feedback points (#31)
yugandhar02 Aug 22, 2024
9b6a38e
Fix franchise pagination
yugandhar02 Aug 23, 2024
1e46723
added additional data for plp-events
miakobchuk Aug 23, 2024
07172b2
Merge pull request #32 from wilson-ecommerce/waf-145
chicharr Aug 26, 2024
5b83918
Merge remote-tracking branch 'origin/main' into plp-events
miakobchuk Aug 26, 2024
3b09a51
searchRequest data was replaced with specific attributes data
miakobchuk Aug 26, 2024
4752559
WAF-296 - Added centering containers and styling
Aug 12, 2024
bbf87fe
WAF-296 - Changes after Erika request
Aug 14, 2024
95308af
WAF-296 - Changes for plp blocks
Aug 15, 2024
c7b5b1c
WAF-296 - Tailwind review fix
Aug 23, 2024
2e0dac1
Merge pull request #33 from wilson-ecommerce/plp-events
miakobchuk Aug 27, 2024
9dfaef9
Merge pull request #27 from wilson-ecommerce/waf-296_centering-contai…
jerseyAdmin Aug 29, 2024
6aa14a6
WAF-116 - fix for team specific PLP
chicharr Aug 29, 2024
bd5032d
Merge pull request #34 from wilson-ecommerce/fix-team-plp
chicharr Aug 29, 2024
fb529ce
WAF-296 - Fix for facets css
Aug 30, 2024
dc53f0b
Merge pull request #35 from wilson-ecommerce/waf-296_centering-contai…
chicharr Aug 30, 2024
83d005d
Fix weird hover effect and category filter display
yugandhar02 Sep 2, 2024
574cba4
Merge pull request #36 from wilson-ecommerce/plp-fixes
chicharr Sep 2, 2024
58e1b46
Fix main image for team specific PLP
chicharr Sep 3, 2024
0e2fe86
Merge pull request #37 from wilson-ecommerce/fix2-team-plp
chicharr Sep 3, 2024
dd1303f
WAF-116 - return option id instead of option object
chicharr Sep 5, 2024
7d89eb4
Merge pull request #38 from wilson-ecommerce/fix-team-plp3
chicharr Sep 5, 2024
50d2116
Add swatches for sportswear PLP
yugandhar02 Sep 6, 2024
6e39868
Fix sportwear PDP navigation from PLP and non-sportswear swatch selec…
yugandhar02 Sep 11, 2024
72367a4
Fix teams PLP
yugandhar02 Sep 12, 2024
a6635b6
Merge pull request #39 from wilson-ecommerce/waf-394
chicharr Sep 12, 2024
b5d6b4e
Fix PLP page performance
yugandhar02 Sep 12, 2024
a07713b
Merge pull request #40 from wilson-ecommerce/waf-394
chicharr Sep 12, 2024
7573dc3
Fix null pointer exception when some search results doesn't have colo…
yugandhar02 Sep 16, 2024
f11614f
Merge pull request #41 from wilson-ecommerce/fix-search
chicharr Sep 16, 2024
9fef2d1
WAF:434: Fix product cards with invalid secondary images
yugandhar02 Sep 26, 2024
8e07462
Merge pull request #43 from wilson-ecommerce/WAF-434
chicharr Sep 26, 2024
da38b6b
WAF-396 - Filters
Sep 5, 2024
e5f7df6
WAF-396 - Filters cleanup work
Oct 11, 2024
610d177
WAF-396 - Code reformat
Oct 13, 2024
43c8c50
WAF-396 - Lint fixes
Oct 13, 2024
e554aa2
WAF-396 - Fixed linters and removed unneccssary code
Oct 14, 2024
0a8508f
WAF-396 - Erika requests
Oct 14, 2024
7cc04da
WAF-396 - Error switch fix
Oct 14, 2024
ab38a7e
Merge pull request #44 from wilson-ecommerce/waf-396_filters
jerseyAdmin Oct 14, 2024
41aae90
WAF-396 - Fix and changes requested at code review
Oct 16, 2024
b1d4a04
Merge pull request #45 from wilson-ecommerce/waf-396_filters-2
chicharr Oct 17, 2024
95d84f5
WAF-498 - Franchise header changes
Oct 23, 2024
238c957
WAF-498 - Requested changes
Oct 25, 2024
c708d64
waf-406 article and model ccde fix
ravverma Oct 29, 2024
4b0b4c1
Merge pull request #46 from wilson-ecommerce/origin/waf-406-fix
chicharr Oct 29, 2024
6cd51c4
WAF-396 - Range filter work
Oct 21, 2024
b764fec
WAF-396 - Fixes and changes
Oct 23, 2024
18d6a2c
WAF-396 - Changes for styling
Oct 28, 2024
8242e41
WAF-396 - Fioxes
Oct 29, 2024
669013b
WAF-396 - Fix
Oct 29, 2024
46bec5f
WAF-396 - Fix 2
Oct 29, 2024
c32f5c7
WAF-396 - Price range lable change
Oct 29, 2024
3b499e7
Merge pull request #47 from wilson-ecommerce/waf-396_filters-2
chicharr Oct 30, 2024
7981ed9
waf-526 - disable salability filter for slugger
chicharr Oct 30, 2024
1dc7215
waf-526 - remove console
chicharr Oct 30, 2024
2fa5672
Merge pull request #48 from wilson-ecommerce/disable-salability-filter
chicharr Oct 30, 2024
45c768e
First Commit for in grid promo
ravverma Nov 4, 2024
ea15e60
WAF-545 - Franchise selector for mobile change
Nov 5, 2024
04dc658
WAF-518 - Changing stroke weight on pagination
Nov 6, 2024
55191a6
removing merchandise file
ravverma Nov 8, 2024
076e867
WAF-507 - Keyboard navigation for filters
Nov 11, 2024
6d5e0a8
Merge pull request #50 from wilson-ecommerce/waf-422
chicharr Nov 19, 2024
a0cc908
WAF-580 - Replacing ASCI with sign
Nov 27, 2024
c008fc2
WAF-473 - filter side bar visibility change
jkf276 Nov 27, 2024
c04286b
Merge pull request #56 from wilson-ecommerce/jira/WAF-473
chicharr Nov 28, 2024
3691dee
WAF-633 - Sort franchise based on categoryExtraInfo order
rhudea Dec 2, 2024
29c37c9
Merge pull request #57 from wilson-ecommerce/jira/WAF-633
rhudea Dec 2, 2024
743c2fb
Merge pull request #55 from wilson-ecommerce/jira/WAF-580
jerseyAdmin Dec 5, 2024
848a893
Merge pull request #53 from wilson-ecommerce/jira/WAF-507_Keyboard-na…
jerseyAdmin Dec 5, 2024
38d59af
Merge pull request #52 from wilson-ecommerce/waf-518
jerseyAdmin Dec 5, 2024
c322ec0
Merge pull request #51 from wilson-ecommerce/waf-545
jerseyAdmin Dec 5, 2024
69c5608
Merge pull request #49 from wilson-ecommerce/waf-498-font-size-changes
jerseyAdmin Dec 5, 2024
c246814
WAF-552 - Solving slice issue of facets at Slugger and also removing …
Nov 12, 2024
1bf181c
WAF-552 - Included code review fixes from PR 47
Nov 12, 2024
0de6f3f
WAF-552 - Code review change
Dec 4, 2024
285c1bb
WAF-552 - Code review change v2
Dec 5, 2024
ed6ef77
Merge pull request #54 from wilson-ecommerce/jira/WAF-552_Slugger-sli…
jerseyAdmin Dec 5, 2024
aab0165
WAF-628 - Update search and remove error js when no color options
Dec 5, 2024
6d38a2c
WAF-628 - Update after review
Dec 5, 2024
4c82029
WAF-587 - Spinner instead of shimmer for plp
Dec 9, 2024
5d6dfc5
WAF-587 - Spinner instead of shimmer for plp missed check fix
Dec 9, 2024
768fce0
Merge pull request #59 from wilson-ecommerce/jira/WAF-628-Update-search
pecaudt Dec 9, 2024
8b5ae59
Merge pull request #60 from wilson-ecommerce/jira/WAF-587
jerseyAdmin Dec 12, 2024
68afbb5
WAF-653 - Mobile filter pills return
Dec 12, 2024
69fab4e
WAF-713 - Added filter bar for no results and modified texts
Dec 12, 2024
952f37f
WAF-518 - Stroke change
Dec 13, 2024
f3a105d
remove below-title enrichment
hannessolo Dec 13, 2024
889a873
Merge pull request #63 from wilson-ecommerce/jira/WAF-713
jerseyAdmin Dec 16, 2024
ce1f382
Merge pull request #65 from wilson-ecommerce/jira/waf-700
chicharr Dec 17, 2024
8ca483b
WAF-720 - Fix error js
Dec 18, 2024
0a9b985
Merge pull request #66 from wilson-ecommerce/jira/WAF-720
pecaudt Dec 18, 2024
7676e5c
WAF-649 - Fix for tablet/mobile look
Dec 9, 2024
7f41f8a
WAF-649 - Sneaking in keyboard nav fix
Dec 10, 2024
11888ce
Merge pull request #61 from wilson-ecommerce/jira/WAF-649
jerseyAdmin Dec 18, 2024
8fe151a
Merge pull request #62 from wilson-ecommerce/jira/WAF-653
jerseyAdmin Dec 18, 2024
edb04f4
Merge pull request #64 from wilson-ecommerce/waf-518
jerseyAdmin Dec 18, 2024
3a8abef
WAF-518 - QuickFix for missed classname template error
Dec 18, 2024
9ebb0b8
Merge pull request #67 from wilson-ecommerce/waf-518
jerseyAdmin Dec 18, 2024
c752cd1
WAF-653 - Double franchise fix
Dec 19, 2024
c461825
WAF-355 - spacing fix
johnnyung-wilson Jan 7, 2025
8e06494
Merge pull request #68 from wilson-ecommerce/jira/WAF-653
jerseyAdmin Jan 8, 2025
8dced0d
Merge pull request #69 from wilson-ecommerce/jira/WAF-355
johnnyung-wilson Jan 8, 2025
24a295d
Add size sorting
rhudea Jan 9, 2025
1215cad
Merge pull request #70 from wilson-ecommerce/jira/WAF-657
rhudea Jan 10, 2025
da6ecdd
WAF-775 - Search result page title
Jan 13, 2025
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
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ const storeDetails = {
displayOutOfStock: true,
allowAllProducts: false,
currentCategoryUrlPath?: string;
currentCategoryId?: string;
categoryName: '', // name of category to display
categoryConfig: {} // Custom category config
displaySearchBox: false, // display search box
displayOutOfStock: '', // "1" will return from php escapeJs and boolean is returned if called from data-service-graphql
displayMode: '', // "" for search || "PAGE" for category search
Expand All @@ -133,6 +135,7 @@ const storeDetails = {
listview: false; //add listview as an option - EXPERIMENTAL, default is false
optimizeImages: true, // optimize images with Fastly
imageBaseWidth: 200,
imageBackgroundColor: #fff // Background color for PLP product images
resolveCartId?: resolveCartId // Luma specific addToCart method. Enabled with the extension
refreshCart?: refreshCart // Luma specific addToCart method. Enabled with the extension
addToCart?: (sku, options, quantity)=>{} // custom add to cart callback function. Called on addToCart action
Expand Down Expand Up @@ -187,8 +190,8 @@ Let's say as if I want to style an element with the theme's primary color. Norma
Using Tailwind the following produces the exact same result:

```
<div class="text-primary">
Yippee I am a primary color!
<div class="text-brand-700">
Yippee I am a brand color!
</div>

```
Expand Down Expand Up @@ -266,7 +269,7 @@ export const ProductItem: FunctionComponent<ProductProps> = ({
<div className="ds-sdk-product-item group relative flex flex-col max-w-sm justify-between h-full">
...
<div className="flex flex-col">
<div className="ds-sdk-product-item__product-name mt-md text-sm text-primary">
<div className="ds-sdk-product-item__product-name mt-md text-sm text-brand-700">
{htmlStringDecode(productView.name)}
</div>
<ProductPrice
Expand Down
149 changes: 99 additions & 50 deletions dev-template.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
<!DOCTYPE html>

<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Live Search PLP</title>

<!-- reset css -->
Expand All @@ -13,6 +16,11 @@
referrerpolicy="no-referrer"
/>

<script
type="text/javascript"
src="https://unpkg.com/@adobe/[email protected]/dist/adobe-client-data-layer.min.js"
></script>

<script
type="text/javascript"
src="https://unpkg.com/@adobe/magento-storefront-events-sdk@qa/dist/index.js"
Expand All @@ -31,8 +39,8 @@
body {
margin: 0 auto;
max-width: 1280px;
padding-left: 20px;
padding-right: 20px;
/* padding-left: 20px;
padding-right: 20px; */
font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-style: normal;
font-weight: 400;
Expand All @@ -42,20 +50,20 @@
--color-primary: black;
}

.ds-sdk-product-item__product-name {
/* .ds-sdk-product-item__product-name {
text-transform: uppercase;
}
} */
</style>

<script type="text/javascript" src="search.js"></script>

<script type="text/javascript">
const root = document.querySelector('div.search-plp-root');
const storeDetails = {
environmentId: '',
websiteCode: '',
storeCode: '',
storeViewCode: '',
environmentId: '331e4848-1413-4428-8e26-75924f47a8b8',
websiteCode: 'wil_us',
storeCode: 'wil_us',
storeViewCode: 'wil_us_en',
config: {
minQueryLength: '2',
pageSize: 8,
Expand All @@ -68,8 +76,57 @@
displaySearchBox: true, // display search box
displayOutOfStock: true,
allowAllProducts: false,
// currentCategoryUrlPath?: '', // current category url path
// categoryName: '', // name of category to display
currentCategoryUrlPath: 'sportswear/women', // current category url path, please prefer using currentCategoryId
currentCategoryId: '488', // current category id

/** FRANCHISE VIEW SETTINGS **/
// currentCategoryUrlPath: 'baseball', // current category url path, please prefer using currentCategoryId
// currentCategoryId: '107', // current category id
// categoryConfig: { 'pcm_display_by_franchise': '1' },
// categoriesExtraInfo: [
// {
// "url": "baseball/baseball-gloves",
// "id": "677",
// },
// {
// "url": "baseball/limited-edition",
// "id": "5704",
// },
// {
// "url": "baseball/baseball-gear-bags",
// "id": "3134",
// },
// {
// "url": "baseball/baseballs",
// "id": "674",
// },
// {
// "url": "baseball/baseball-protective-gear",
// "id": "680",
// },
// {
// "url": "baseball/baseball-apparel",
// "id": "665",
// },
// {
// "url": "baseball/stock-uniforms",
// "id": "668",
// },
//
// {
// "url": "baseball/baseball-accessories",
// "id": "671",
// },
// ],
/** END FRANCHISE VIEW SETTINGS **/

/** TEAM SPECIFIC PLP SETTINGS **/
// currentCategoryUrlPath: 'basketball/basketballs/chicago-bulls',
// currentCategoryId: '3197', // current category id
/** END TEAM SPECIFIC PLP **/

// preCheckedFilters: [{key: 'pim_axis_article_techspec_hand_code_pim_20786' , value: 'Right-hand throw'}],
// categoryName: 'Baseball', // name of category to display
// displaySearchBox: false, // display search box
// displayOutOfStock: '', // "1" will return from php escapeJs and boolean is returned if called from data-service-graphql
// displayMode: '', // "" for search || "PAGE" for category search
Expand All @@ -82,11 +139,14 @@
// resolveCartId?: resolveCartId, // Luma specific addToCart method. Enabled with the extension
// refreshCart?: refreshCart, // Luma specific addToCart method. Enabled with the extension
// addToCart?: (sku, options, quantity)=>{} // custom add to cart callback function. Called on addToCart action
onCategoryChange: (category) => {
document.title = category;
},
},
context: {
customerGroup: '',
customerGroup: '0',
},
apiKey: '',
apiKey: '95689dc242b0433da022462d27547b30',
environmentType: '',
// searchQuery: 'search_query', // Optional: providing searchQuery will override 'q' query param
// route: ({ sku, urlKey }) => {
Expand All @@ -102,44 +162,33 @@
// Will result to `http://localhost:8081/v1/MT11`
};

const mse = window.magentoStorefrontEvents;

mse.context.setMagentoExtension({
magentoExtensionVersion: '1.0.0',
});
mse.context.setSearchExtension({
version: '2.0.3',
});
mse.context.setShopper({ shopperId: 'logged-in' });

mse.context.setPage({
pageType: 'plp',
maxXOffset: 0,
maxYOffset: 0,
minXOffset: 0,
minYOffset: 0,
ping_interval: 5,
pings: 1,
});

mse.context.setStorefrontInstance({
environmentId: '',
instanceId: 'bbbbbb',
environment: 'ccccccc',
storeUrl: '',
websiteId: 123456,
websiteCode: '',
storeId: 123456,
storeCode: '',
storeViewId: 123456,
storeViewCode: '',
websiteName: '',
storeName: '',
storeViewName: '',
baseCurrencyCode: 'USD',
storeViewCurrencyCode: 'USD',
catalogExtensionVersion: '1.0.0',
});
window.adobeDataLayer = window.adobeDataLayer || [];
window.adobeDataLayer.push(
{ 'magentoExtensionContext': { magentoExtensionVersion: '1.0.0' } },
{ 'searchExtensionContext': { version: '2.0.3'} },
{ 'shopperContext': { shopperId: 'logged-in' } },
{ 'pageContext': { pageType: 'plp', maxXOffset: 0, maxYOffset: 0, minXOffset: 0, minYOffset: 0, ping_interval: 5, pings: 1 } },
{
'storefrontInstanceContext': {
environmentId: '',
instanceId: 'bbbbbb',
environment: 'ccccccc',
storeUrl: '',
websiteId: 123456,
websiteCode: '',
storeId: 123456,
storeCode: '',
storeViewId: 123456,
storeViewCode: '',
websiteName: '',
storeName: '',
storeViewName: '',
baseCurrencyCode: 'USD',
storeViewCurrencyCode: 'USD',
catalogExtensionVersion: '1.0.0',
}
}
);

setTimeout(async () => {
while (typeof window.LiveSearchPLP !== 'function') {
Expand Down
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
"lint:fix": "eslint '*/**/*.{ts,tsx}' --fix",
"prettier:fix": "prettier 'src/**/*.{ts,tsx,json,md}' --write",
"test": "jest --passWithNoTests --color --silent",
"cleanup": "rimraf dist"
"cleanup": "rimraf dist",
"copy-build-search": "cp -r dist/search.js"
},
"dependencies": {
"@headlessui/react": "^1.7.17",
Expand Down
7 changes: 7 additions & 0 deletions src/api/fragments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ const ProductView = `
inStock
url
urlKey
attributes(roles: ["visible_in_plp"]) {
label
name
roles
value
}
images {
label
url
Expand Down Expand Up @@ -84,6 +90,7 @@ const ProductView = `
id
title
values {
id
title
... on ProductViewOptionValueSwatch {
id
Expand Down
61 changes: 52 additions & 9 deletions src/api/queries.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,15 @@ const QUICK_SEARCH_QUERY = `
${Product}
`;

const PRODUCT_SEARCH_QUERY = `
query productSearch(
$phrase: String!
$pageSize: Int
$currentPage: Int = 1
$filter: [SearchClauseInput!]
$sort: [ProductSearchSortInput!]
$context: QueryContextInput
) {
export const FranchiseQueryFragment = `
fragment FRANCHISE_QUERY on ProductSearchItem {
...Product
...ProductView
}
`;

const ProductSearchQueryFragment = `
fragment PRODUCT_SEARCH on Query {
productSearch(
phrase: $phrase
page_size: $pageSize
Expand Down Expand Up @@ -96,9 +96,46 @@ const PRODUCT_SEARCH_QUERY = `
}
}
}
`;

const PRODUCT_SEARCH_QUERY = `
query productSearch(
$phrase: String!
$pageSize: Int
$currentPage: Int = 1
$filter: [SearchClauseInput!]
$sort: [ProductSearchSortInput!]
$context: QueryContextInput
) {
...PRODUCT_SEARCH
}
${Product}
${ProductView}
${Facet}
${ProductSearchQueryFragment}
`;

const CATEGORY_QUERY = `
query categoryQuery(
$categoryId: String!
$phrase: String!
$pageSize: Int
$currentPage: Int = 1
$filter: [SearchClauseInput!]
$sort: [ProductSearchSortInput!]
$context: QueryContextInput
) {
categories(ids: [$categoryId]) {
name
urlKey
urlPath
}
...PRODUCT_SEARCH
}
${Product}
${ProductView}
${Facet}
${ProductSearchQueryFragment}
`;

const REFINE_PRODUCT_QUERY = `
Expand Down Expand Up @@ -144,6 +181,11 @@ const REFINE_PRODUCT_QUERY = `
values {
id
title
... on ProductViewOptionValueSwatch {
inStock
type
value
}
}
}
priceRange {
Expand Down Expand Up @@ -199,4 +241,5 @@ export {
PRODUCT_SEARCH_QUERY,
QUICK_SEARCH_QUERY,
REFINE_PRODUCT_QUERY,
CATEGORY_QUERY,
};
Loading