Dawn Theme - Snippet Injection to Display Wholesale Price for Logged-in Customers
Add this in liquid part in price.liquid file:
if customer and customer.metafields.netwise.segment.value != 'draft' assign segment_price = product.selected_or_first_available_variant.metafields.netwise.catalog_price.value[customer.metafields.netwise.segment.value] if segment_price assign compare_at_price = product.price assign segment_price = segment_price.price | times: 100 assign money_price = segment_price | times: shop.metafields.netwise.forex.value[shop.currency] assign money_price = money_price | divided_by: shop.metafields.netwise.forex.value[cart.currency.iso_code] if settings.currency_code_enabled assign money_price = money_price | money_with_currency else assign money_price = money_price | money endif endif endif
For show the strikeout price - use this instead of the price--on-sale class name condition
{%- if segment_price < price or compare_at_price > price %} price--on-sale {% endif -%}