Hi all,
Is there a way to add “VAT excluded” on product cards?
With our store we have to keep prices exclusive of VAT as the main product prices because of our internal systems (can’t be changed at the moment) so we want to keep it as transparent as we can that it’s excluding VAT.
We have the statement on the product pages, it’s just the featured collection and general collections product cards that is the issue.
Buy Our UK Designed And Manufactured Aluminium Ramps, Including Car Ramps, Folding And Rest On Van Ramps, Truck Ramps, Loading Ramps, Removal Ramps And Container Ramps. Buy Now On Our Online Store.
namphan
September 12, 2023, 1:05pm
2
Hi @AlloyRamps ,
Do you want to display like this
Hi @namphan
Yes please! That’s what I’m looking for
namphan
September 12, 2023, 2:52pm
4
Hi @AlloyRamps ,
Please go to Actions > Edit code > snippets > card-product.liquid file and add code here:
Code:
VAT excluded
Perfect, thank you so much
1 Like
namphan
September 12, 2023, 5:18pm
6
Hi @AlloyRamps ,
If you have any further questions, you can contact me.
Happy to help you.
Hi Namphan
Looked like a great solution, I tried this but it didn’t work fo rme in the Dawn theme, any thoughts to what I may be doing wrong
Thanks in advance
Hi @Stevesham ,
You want it to show for all products on the product card?
Please explain more about it, I will check it
Hi Namphan
Exactly that, the price I add to the products excludes VAT and I need the customers to be aware of this so there are no hidden surprises when the tax is added at the checkout
Really appreciate your reply, thank you
Steve
Hi @Stevesham ,
Please send me the code of card-product.liquid file, I will check and guide it
Hi Namphan
Thank you, is the attached okay to look at
Cheers
Steve
Hi @Stevesham ,
Please change all code:
{% comment %}
Renders a product card
Accepts:
- card_product: {Object} Product Liquid object (optional)
- media_aspect_ratio: {String} Size of the product image card. Values are "square" and "portrait". Default is "square" (optional)
- image_shape: {String} Image mask to apply to the product image card. Values are "arch", "blob", "chevronleft", "chevronright", "diamond", "parallelogram", and "round". (optional)
- show_secondary_image: {Boolean} Show the secondary image on hover. Default: false (optional)
- show_vendor: {Boolean} Show the product vendor. Default: false
- show_rating: {Boolean} Show the product rating. Default: false
- extend_height: {Boolean} Card height extends to available container space. Default: true (optional)
- lazy_load: {Boolean} Image should be lazy loaded. Default: true (optional)
- skip_styles: {Boolean} Don't include component styles. Useful when rendering multiple product cards in a loop. Default: false (optional)
- quick_add: {Boolean} Show the quick add button.
- section_id: {String} The ID of the section that contains this card.
- horizontal_class: {Boolean} Add a card--horizontal class if set to true. Default: false (optional)
- horizontal_quick_add: {Boolean} Changes the quick add button styles when set to true. Default: false (optional)
- placeholder_image: {String} The placeholder image to use when no product exists. Default: 'product-apparel-2' (optional)
Usage:
{% render 'card-product', show_vendor: section.settings.show_vendor %}
{% endcomment %}
{%- unless skip_styles -%}
{{ 'component-rating.css' | asset_url | stylesheet_tag }}
{{ 'component-volume-pricing.css' | asset_url | stylesheet_tag }}
{{ 'component-price.css' | asset_url | stylesheet_tag }}
{{ 'quick-order-list.css' | asset_url | stylesheet_tag }}
{{ 'quantity-popover.css' | asset_url | stylesheet_tag }}
{%- endunless -%}
{%- if card_product and card_product != empty -%}
{%- liquid
assign ratio = 1
if card_product.featured_media and media_aspect_ratio == 'portrait'
assign ratio = 0.8
elsif card_product.featured_media and media_aspect_ratio == 'adapt'
assign ratio = card_product.featured_media.aspect_ratio
endif
if ratio == 0 or ratio == null
assign ratio = 1
endif
-%}
{%- if card_product.featured_media -%}
{% comment %}theme-check-disable ImgLazyLoading{% endcomment %}
{% comment %}theme-check-enable ImgLazyLoading{% endcomment %}
{%- if card_product.media[1] != null and show_secondary_image -%}
{%- endif -%}
{%- endif -%}
###
{{ card_product.title | escape }}
{%- if card_product.available == false -%}
{{- 'products.product.sold_out' | t -}}
{%- elsif card_product.compare_at_price > card_product.price and card_product.available -%}
{{- 'products.product.on_sale' | t -}}
{%- endif -%}
###
{{ card_product.title | escape }}
{%- if show_vendor -%}
{{ 'accessibility.vendor' | t }}
{{ card_product.vendor }}
{%- endif -%}
{{ block.settings.description | escape }}
{%- if show_rating and card_product.metafields.reviews.rating.value != blank -%}
{% liquid
assign rating_decimal = 0
assign decimal = card_product.metafields.reviews.rating.value.rating | modulo: 1
if decimal >= 0.3 and decimal <= 0.7
assign rating_decimal = 0.5
elsif decimal > 0.7
assign rating_decimal = 1
endif
%}
{{- card_product.metafields.reviews.rating.value }} /
{{ card_product.metafields.reviews.rating.value.scale_max -}}
({{ card_product.metafields.reviews.rating_count }})
{{- card_product.metafields.reviews.rating_count }}
{{ 'accessibility.total_reviews' | t -}}
{%- endif -%}
{% render 'price', product: card_product, price_class: '', show_compare_at_price: true %}
VAT excluded
{%- if card_product.quantity_price_breaks_configured? -%}
{% if card_product.variants.size == 1 and quick_add == 'bulk' %}
{% liquid
assign quantity_rule = card_product.selected_or_first_available_variant.quantity_rule
assign has_qty_rules = false
if quantity_rule.increment > 1 or quantity_rule.min > 1 or quantity_rule.max != null
assign has_qty_rules = true
endif
%}
{% endif %}
{%- endif -%}
{% assign product_form_id = 'quick-add-' | append: section_id | append: card_product.id %}
{% if quick_add == 'standard' %}
{%- liquid
assign qty_rules = false
if card_product.selected_or_first_available_variant.quantity_rule.min > 1 or card_product.selected_or_first_available_variant.quantity_rule.max != null or card_product.selected_or_first_available_variant.quantity_rule.increment > 1
assign qty_rules = true
endif
-%}
{%- if card_product.variants.size > 1 or qty_rules -%}
{%- else -%}
{%- endif -%}
{% elsif quick_add == 'bulk' %}
{% if card_product.variants.size == 1 %}
{% else %}
{%- liquid
assign product_form_id = 'quick-add-' | append: section_id | append: card_product.id
assign qty_rules = false
if card_product.selected_or_first_available_variant.quantity_rule.min > 1 or card_product.selected_or_first_available_variant.quantity_rule.max != null or card_product.selected_or_first_available_variant.quantity_rule.increment > 1
assign qty_rules = true
endif
-%}
{% endif %}
{% endif %}
{%- if card_product.available == false -%}
{{- 'products.product.sold_out' | t -}}
{%- elsif card_product.compare_at_price > card_product.price and card_product.available -%}
{{- 'products.product.on_sale' | t -}}
{%- endif -%}
{%- else -%}
{%- liquid
assign ratio = 1
assign placeholder = true
if media_aspect_ratio == 'portrait'
assign ratio = 0.8
endif
-%}
{%- if placeholder_image -%}
{{ placeholder_image | placeholder_svg_tag: 'placeholder-svg' }}
{%- else -%}
{{ 'product-apparel-2' | placeholder_svg_tag: 'placeholder-svg' }}
{% endif %}
###
{{ 'onboarding.product_title' | t }}
{%- if show_vendor -%}
{{ 'accessibility.vendor' | t }}
{{ 'products.product.vendor' | t }}
{%- endif -%}
{% render 'price', placeholder: placeholder, show_compare_at_price: true %}
{%- endif -%}
Hi Namphan
You are a genius , thank you worked like a charm thank you, now all I have to do is copy this to the new live site I am starting on Tuesday, job done!
Really appreciate you taking the time out to help
All the best
Steve
Hi @Stevesham ,
If you have any questions, you can contact me directly.
Nice to meet you
Thank you Namphan
You are saved in my favourites, not often you come across such genuine help so may need to take you up on your offer in the future
All the best
Steve
namphan
August 24, 2024, 12:21pm
16
Hi @Stevesham ,
So happy about that. I have note email through signature, you can contact it, I will check faster
Morning Namphan
I have added your email to my list and while I was on, I also noticed and bought you a coffee
Cheers
Steve
1 Like
Hi Namphan
Hope you are keeping well
Just wondering if you could help or point me in the right direction
I have submitted my site to google console using sitemap.xml and status is success, but no pages or products are indexed and when I look further it goes on about robots.txt file £blocked by robots.txt, or page with redirect or redirect error.
As far as I know I am using the Dawn template and no changes to code any pointers would be welcomed
All the best
Steve
namphan
October 15, 2024, 12:45pm
20
Hi @Stevesham ,
please send me the store link again, I will check it