Skip to content

Commit

Permalink
Merge branch 'main' into wilson-customs
Browse files Browse the repository at this point in the history
  • Loading branch information
maxakuru committed Dec 11, 2024
2 parents 249eb42 + fa15ccb commit 23c6e3b
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 13 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [1.11.1](https://github.com/adobe-rnd/helix-commerce-api/compare/v1.11.0...v1.11.1) (2024-12-11)


### Bug Fixes

* force deploy ([ed845bd](https://github.com/adobe-rnd/helix-commerce-api/commit/ed845bda0badb01e362fc63263637b0ae3749143))

# [1.11.0](https://github.com/adobe-rnd/helix-commerce-api/compare/v1.10.0...v1.11.0) (2024-12-11)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "helix-commerce-api",
"version": "1.11.0",
"version": "1.11.1",
"private": true,
"description": "API for markup content and a commerce graphql commerce proxy",
"main": "src/index.js",
Expand Down
1 change: 1 addition & 0 deletions src/content/queries/cs-product.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ export const adapter = (config, productData) => {
label: value.title,
inStock: value.inStock,
type: value.type,
value: value.value,
product: value.product
? {
sku: value.product.sku,
Expand Down
3 changes: 2 additions & 1 deletion src/templates/html/HTMLTemplate.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ ${HTMLTemplate.metaProperty('product:price.currency', product.prices?.final?.cur
*/
renderJSONLD() {
return /* html */ `\
<script type="application/ld+json">
<script type="application/ld+json" data-name="product">
${this.jsonTemplate.render()}
</script>`;
}
Expand Down Expand Up @@ -228,6 +228,7 @@ ${attributes.map((attr) => /* html */`\
<div>${item.value ?? ''}</div>
<div>${item.selected ? 'selected' : ''}</div>
<div>${item.inStock ? 'inStock' : ''}</div>
<div>${item.type}</div>
</div>`).join('\n');
}

Expand Down
1 change: 1 addition & 0 deletions src/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ declare global {
inStock: boolean;
value: string;
selected: boolean;
type: string;
product?: {
name: string;
sku: string;
Expand Down
26 changes: 17 additions & 9 deletions test/fixtures/post-deploy/bella-tank.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<script src="/scripts/aem.js" type="module"></script>
<script src="/scripts/scripts.js" type="module"></script>
<link rel="stylesheet" href="/styles/styles.css">
<script type="application/ld+json">
<script type="application/ld+json" data-name="product">
{
"@context": "http://schema.org",
"@type": "Product",
Expand Down Expand Up @@ -276,41 +276,46 @@ <h1>Bella Tank</h1>
<div>option</div>
<div>Y29uZmlndXJhYmxlLzU1Ni81MjM=</div>
<div>XS</div>
<div></div>
<div>XS</div>
<div></div>
<div>inStock</div>
<div>TEXT</div>
</div>
<div>
<div>option</div>
<div>Y29uZmlndXJhYmxlLzU1Ni81MjY=</div>
<div>S</div>
<div></div>
<div>S</div>
<div></div>
<div>inStock</div>
<div>TEXT</div>
</div>
<div>
<div>option</div>
<div>Y29uZmlndXJhYmxlLzU1Ni81Mjk=</div>
<div>M</div>
<div></div>
<div>M</div>
<div></div>
<div>inStock</div>
<div>TEXT</div>
</div>
<div>
<div>option</div>
<div>Y29uZmlndXJhYmxlLzU1Ni81MzI=</div>
<div>L</div>
<div></div>
<div>L</div>
<div></div>
<div>inStock</div>
<div>TEXT</div>
</div>
<div>
<div>option</div>
<div>Y29uZmlndXJhYmxlLzU1Ni81MzU=</div>
<div>XL</div>
<div></div>
<div>XL</div>
<div></div>
<div>inStock</div>
<div>TEXT</div>
</div>
<div>
<div>color</div>
Expand All @@ -324,25 +329,28 @@ <h1>Bella Tank</h1>
<div>option</div>
<div>Y29uZmlndXJhYmxlLzI3Ny8xNzI=</div>
<div>Black</div>
<div></div>
<div>#000000</div>
<div></div>
<div>inStock</div>
<div>COLOR_HEX</div>
</div>
<div>
<div>option</div>
<div>Y29uZmlndXJhYmxlLzI3Ny8xNzU=</div>
<div>Blue</div>
<div></div>
<div>#1857f7</div>
<div></div>
<div>inStock</div>
<div>COLOR_HEX</div>
</div>
<div>
<div>option</div>
<div>Y29uZmlndXJhYmxlLzI3Ny8xOTM=</div>
<div>Orange</div>
<div></div>
<div>#eb6703</div>
<div></div>
<div>inStock</div>
<div>COLOR_HEX</div>
</div>
</div>
<div class="product-variants">
Expand Down

0 comments on commit 23c6e3b

Please sign in to comment.