Setting up messaging
Learn how to set up your messaging in the Shopify App.
This process involves inspecting the various elements on your product, collection, and cart pages.
How to inspect the element
To inspect an element, such as your product price, simply right-click on the desired element and select Inspect from the dropdown menu.
This opens the inspector and highlights the particular element you have selected in your site’s source code. In the product price example below, you will see that when inspecting the price on the page, the text content within your source code is surrounded by an element with the class
product-price - this class name is what we are looking for.
|Highlight the element||Inspect the element|
The fields within the app will require either a class or an ID. IDs can be found using the same approach. In this case, you will look for an instance of
id=”...” rather than
How to format the settings
1. Inspect the element
For these steps, you will need to use the method above to inspect various elements on the page.
2. Find the Message Element class or ID:
The Message Element determines the location of the promotional message on the page. Locate where you want to place the message and inspect the nearest element on the page; it is usually the price or your add to cart button. Determine the
ID for this element and add it to the Message Element field using the formatting detailed in the section above.
3. Find the Form Element class or ID
The Form Element ensures the promo price updates when your product variants change. Hover your mouse over your product variant options and open the inspector. Here, you will look for a specific type of element with the
<form … > tag. This Form Element will have a
ID as well - this is what you will input into the app fields using the same formatting as before.
4. Add to Settings
If the element has an
ID, use the hashtag (#) before the name. You can find an example below.
If the element has a
class, use the period (.) before the name. You can find an example below.
Using the Advanced Settings
If the Form and Message Elements do not seem to be working, you can use the advanced settings to configure your promotional messaging as well.
|Price||Inspect the price on your page and identify the nearest class or ID. This will generally be within the same element as the price (like in the above example) or in the element just above it.|
|Price Change||This field ensures the promo price updates when your product variant is changed. Inspect the price and scroll up the source code until you locate the nearest ID to the price element. The Price Change Element requires an ID so remember to format with the ‘#’ as noted in the steps above.|
|Sales Price||Sometimes when an item is on sale, a separate class is used to identify the sales price. Locate a sale item on your site and inspect the sale price. If a class is present within the price element that does not appear when the item is at full price, add this class to the Sales Price Element field. Otherwise, this field should be left blank.|
|Compare Prices||If no unique sale price class is present, you can check this box to ensure the app targets the correct price when an item is on sale. Do not use this feature if your price displays a percent discount or ‘amount saved’ message.|
|Add Cents||This is used when using the price element and the price does not already have the cents displayed.|
|Shopify||This is used to confine a message to a specific page type in Shopify. You can find the page type by using |
Updated 3 months ago