Targeting 'Catalogue Discount' with Liquid markup


is there way target user's 'catalogue discount' (who not wholesaler) similar method target wholesalers? eg. {% if this.globals.user.isloggedin , globals.user.iswholesaler == true , {{retailprice}} > {{saleprice}} %} or similar(?) - along lines of 'globals.user.hasdiscount'

yes.

 

without tax it's {{ saleprice }} vs {{ discountprice }}

with tax it's {{ totalprice }} vs {{ totaldiscountprice }}

 

so, in code translates to:

{% if globals.user.iswholesaler == true , saleprice > discountprice -%}
<p>logged in wholesaler has discount</p>

{% endif -%}

note: applies visitor has applied discount code @ checkout; , browsing store.



More discussions in Developer forum


adobe

Comments

Popular posts from this blog

Extracting portions of an image

shape alpha vs layer alpha in cc library

Photoshop CC 2017 - Ruler Tool - Error 8007...