PageFly
PageFly can be used to create custom pages on a Shopify store.
Integration
By default, a custom page will not load some of the "context" required by Discount Ninja.
Read this section to test if the context is already available on a page
Read this section to add the context and enable Discount Ninja on a page
Advanced tips for using Discount Ninja on PageFly pages
Test
To test if Discount Ninja has all the information it needs:
- Open the custom page in a browser
- Open the console of the browser
- In the console, type
discountNinja.Core.Version
(case sensitive) and hit enter - The type
discountNinjaContext.Cart
(case sensitive) and hit enter - Both these tests should pass without issues
- If you see an error message, the app does not have the context it needs:
Enable Discount Ninja
Step 1: Edit your custom page
Step 2: Add an HTML/Liquid widget
On the regular page:
- Click + (Add Element)
- Select HTML/Liquid
- Drag an "HTML5 / Liquid" element on your page (can be anywhere, recommended to put at the bottom)
Step 3: Edit the widget
Select the widget:
Then, on the right, click "Open Code Editor":
Replace the content of the editor with:
{% include 'limoniapps-discountninja-body' %}
It should look as follows:
Optionally, select the section and set the visibility to hidden, to avoid white space:
Step 4: Publish the page
Then save and publish the page.
Advanced tips for using Discount Ninja on PageFly pages
Tip 1: previewing an unpublished page is not supported
Discount Ninja expects a custom page to be published under the /pages/ section of your app. When a page is not published this is not the case and promotions will not trigger.
Tip 2: using a sticky bar
When using a sticky bar on a PageFly page, the sticky bar should automatically push down the content.
If this is not supported by your theme, the bar may overlap content. To avoid this:
- Edit the topmost section of the page
- Find the "Attributes" settings in the panel on the right
- Set the following class (if one or more classes are already present, make sure to add a space between those classes and the new one you're adding):
limoniapps-discountninja-topmargin
Tip 3: support Dynamic Pricing
To show discounted prices using Dynamic Pricing, you'll need to update the attributes of each price section on the page.
- Select the price section
- Find the "Attributes" settings in the panel on the right
- Set the following class (if one or more classes are already present, make sure to add a space between those classes and the new one you're adding):
limoniapps-discountninja-productprice
- Optionally add another class (always separate classes with a space) to center the content:
limoniapps-discountninja-align-center
- Next, click the "More Settings" button and add an entry in the "Custom Attributes".
- Set the key to:
data-limoniapps-discountninja-product-handle
- Set the value to the handle of the product. If you don't know the handle of your product, simply browse to the product and find the section of the URL that comes after https://myshop.myshopify.com/products/this-is-the-handle.