Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
20bdf9d30d |
@@ -746,8 +746,17 @@
|
|||||||
endif
|
endif
|
||||||
-%}
|
-%}
|
||||||
|
|
||||||
|
<!-- yagi product structured data -->
|
||||||
|
{% liquid
|
||||||
|
assign original_product_price_format = product.selected_or_first_available_variant.price | money_without_currency
|
||||||
|
assign discounted_product_price = product.selected_or_first_available_variant.metafields.app--168074346497.auto_discounted_price.value | default: product.selected_or_first_available_variant.price
|
||||||
|
assign discounted_product_price_format = discounted_product_price | money_without_currency
|
||||||
|
|
||||||
|
assign search_original_string = '"price":"' | append: original_product_price_format | append: '"'
|
||||||
|
assign search_replace_string = '"price":"' | append: discounted_product_price_format | append: '"'
|
||||||
|
%}
|
||||||
<script type="application/ld+json">
|
<script type="application/ld+json">
|
||||||
{{ product | structured_data }}
|
{{ product | structured_data | replace_first: search_original_string, search_replace_string }}
|
||||||
</script>
|
</script>
|
||||||
</div>
|
</div>
|
||||||
</product-component>
|
</product-component>
|
||||||
|
|||||||
Reference in New Issue
Block a user