Price
Location
Place the la-dn-price
attribute on the HTML element that spans all of the following:
The section of the theme that renders the standard price of the variant when the variant is not on sale (i.e. the variant does not have a compare-at price in Shopify)
The section of the theme that renders the discounted price of the variant when the variant is on sale (i.e. the variant has a compare-at price in Shopify)
And, if applicable:
The “Sold out” text displayed if the variant is out of stock
The “Sale” badges displayed if the variant has a compare at price
Ensure the attribute class is not placed on a section that renders HTML that is not related to the price, such as:
Review widgets
Installments
since all content in the section with the above attribute is replaced with the discounted price when the variant is discounted through Discount Ninja.
Snippet
Use the following snippet to add the data attribute in a Liquid template:
Example
Style
The style (font, color, size) as well as the format (strikethrough or not, price first or compare-at price first...) can be configured in the app.
In the menu go to Settings > Dynamic Pricing > Price format.
Subscription apps
The attributes described in this section will be supported as of November 2024
Some subscription apps show multiple prices for the selected product variant on the PDP. Specifically, they allow for showing:
The price of a one-time purchase
The price of a recurring purchase (subscription)
To support this:
mark the price of the one-time purchase with the attribute
data-la-dn-price-inline
as well as an attributedata-la-dn-price-onetime
and the price of the recurring purchase with the attribute
data-la-dn-price-inline
as well as the attributedata-la-dn-price-subscription
. Finally, add an attribute that indicates the id of the selected selling plan:data-la-dn-price-subscription-sellingplan-id
Example
Multiple variants
To display the price of multiple variants of the same product on the PDP, users can use the markup used for products on the PLP in combination with the data-la-dn-product-variant
attribute as explained here.
Installments
The app automatically integrates with a number of installment apps, listed here.
To mark HTML elements as installment prices, you can add CSS selectors in the app. These settings are available from the Settings > General > Advanced menu in the Advanced tab.
Last updated