In a Shopify project, I'm attempting to edit the default price block in a custom product page template named product.branded-product.json. Below is the block settings.
"ppPrice": {
"type": "brandedProductPagePrice",
"settings": {
"noMargin": false,
"color": "#7b3353",
"newPriceColor": "#cea67e",
"oldPriceColor": "#666666",
"fontFamily": "base",
"fontSize": "medium",
"saleType": "percent"
}
},
brandedProductPagePrice is a type referenced in get_block.liquid file which is below.
when 'productPageTitle'
render 'block__product-page--title', block: block, product: product
when 'productPagePrice'
render 'block__product-page--price', block: block, product: product
when 'brandedProductPagePrice'
render 'block__branded-product-page--price', block: block, product: product
when 'productPageDescription'
render 'block__product-page--description', block: block, product: product
when 'productPageCountdown'
render 'block__product-page--countdown', block: block, product: product, view: view
when 'productPageATC'
block__branded-product-page--price.liquid is as below and same as the original file block__product-page--price.liquid which is below.
{% assign current_variant = product.selected_or_first_available_variant %}
{% assign s_type = block.settings.saleType | default: 'percent' %}
<div
class="product__price--holder product__price--{{block.id}}
font__family--{{-block.settings.fontFamily}} font__size--{{-block.settings.fontSize}}
{% if block.settings.noMargin or noMargin %}margin__bottom--reduced{%endif-%}" {{block.shopify_attributes}}>
{% if product.compare_at_price_min > 0 %}
{% assign sale = true %}
{% if current_variant.compare_at_price > 0 %}
{% assign currsale = true %}
{% else %}
{% assign currsale = false %}
{% endif %}
{% else %}
{% assign sale = false %}
{% assign currsale = false %}
{% endif %}
<span data-product-price="{{product.id}}" class="product__price {% if currsale %}product__price--sale{% endif %} jsPrice">{{ current_variant.price | money | strip_html }}</span>
<span data-product-price-sale="{{product.id}}" class="product__price--old jsPrice">{% if currsale %}{{ current_variant.compare_at_price | money | strip_html }}{% endif %}</span>
{% if sale %}
{%- unless s_type == 'none' or sale == false %}
<span data-tag-product="{{product.id}}" data-tag-type="{{s_type}}" class="tag tag--sale {% unless currsale %}hide{% endunless %} {% if s_type == 'amount' %}jsPrice{% endif %}">
{% if currsale %}
{%- case s_type %}
{% when 'percent' %}
{{ current_variant.price | minus: current_variant.compare_at_price | times: 100 | divided_by: current_variant.compare_at_price }}% {{'general.tags.off'|t}}
{% when 'amount' %}
{{ current_variant.compare_at_price | minus: current_variant.price | money | strip_html }}
{% when 'text' %}
{{'general.tags.sale' | t}}
{%- endcase -%}
{% endif %}
</span>
{%- endunless -%}
{% endif %}
</div>
<div>Test</div>
{% comment %}
{% blockdef %}
{% endblockdef %}
{% endcomment %}
I don't understand what schema this error is talking about. Please help me fix this.