test
parent
5e32bb0be5
commit
9cb9a32ff5
|
@ -331,11 +331,34 @@
|
|||
template: "{{ template }}",
|
||||
productTitle: "{{ product.title }}",
|
||||
productHandle: "{{ product.handle }}"
|
||||
tags: "{{ product.tags.join(', ') }}"
|
||||
// Add more properties as needed
|
||||
};
|
||||
|
||||
console.log(pageInfo2)
|
||||
|
||||
var productInfo = {
|
||||
title: "{{ product.title }}",
|
||||
handle: "{{ product.handle }}",
|
||||
id: "{{ product.id }}",
|
||||
description: "{{ product.description | strip_newlines | escape }}",
|
||||
type: "{{ product.type }}",
|
||||
vendor: "{{ product.vendor }}",
|
||||
price: "{{ product.price | money }}",
|
||||
price_varies: "{{ product.price_varies }}",
|
||||
compare_at_price: "{{ product.compare_at_price | money }}",
|
||||
available: "{{ product.available }}",
|
||||
tags: {{ product.tags | json }},
|
||||
options: {{ product.options | json }},
|
||||
variants: {{ product.variants | json }},
|
||||
images: {{ product.images | json }},
|
||||
featured_image: "{{ product.featured_image.src }}"
|
||||
};
|
||||
|
||||
for (var key in productInfo) {
|
||||
if (productInfo.hasOwnProperty(key)) {
|
||||
console.log(key + ": " + productInfo[key]);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Render CSS content -->
|
||||
|
|
Loading…
Reference in New Issue