Wire the tire finder to a product catalogue and add product pages#20
Merged
Conversation
…port Add products.json, a 13-product catalogue captured from the live site with name, category, season, vehicle types, image, description, features, and tire sizes. It is served from the code bus at /products.json. Rewrite the perfect-fit tire finder to search that catalogue. By Tire Size offers cascading width, aspect, and rim menus built from the real sizes, and returns every product available in the chosen size. By Vehicle maps a curated make and model set to a vehicle class and returns the tires that fit it. By Plate recommends the all-weather range. Results render as product cards that link to /tires/<slug>. Add a size-list block that renders authored tire sizes as chips, used by the product pages. Tested: npm test covers size parsing, the cascading option builder, size and vehicle-class matching, the modal, and the size-list block. Live-tested on a local aem up server. By Tire Size 225/35R19 returns ExtremeContact Sport 02, By Vehicle Ford Explorer returns 9 SUV-fitting tires, and a product page renders hero, overview, features, and size chips.
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
Commits
|
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix #21
Capture the product line into a catalogue and make the tire finder use it.
products.json holds 13 products from the live site: name, category, season, vehicle types, image, description, features, and tire sizes. It is served from the code bus at /products.json. Eight products carry real size lists scraped from the source. The rest carry representative sizes for their category, flagged in the data.
The perfect-fit tire finder now searches the catalogue. By Tire Size has cascading width, aspect, and rim menus built from the real sizes, and returns every product available in the chosen size. By Vehicle maps a curated make and model set to a vehicle class and returns the fitting tires. By Plate recommends the all-weather range. Results are product cards linking to /tires/.
A new size-list block renders sizes as chips on the product pages. The product pages were generated from products.json with json2html and carry hero, overview, features, sizes, and page metadata.
Testing: npm test covers size parsing, the option builder, size and vehicle matching, the modal, and size-list. Live-tested on a local aem up server: By Tire Size 225/35R19 returns ExtremeContact Sport 02, By Vehicle Ford Explorer returns 9 SUV tires, and the product page renders correctly.
Test URLs: