Top

Customer Specific Pricing Install Instructions

Warning!

This article requires technical knowledge and prior experience with liquid code. If you are not comfortable with this, Email our Support Wizards for help.

Before you begin, review Notes Before Installing Apps. This article can help get you prepared and answers many common questions.

Select each step below to view the instructions.

  1. From "Shopify Admin", select Apps.

    Select Apps 

  2. Select Visit Shopify App Store.

    select visit shopify app store 

  3. Enter Customer Pricing in the "Search Bar".

    enter customer specific pricing in the search bar 

  4. Select Customer Pricing (Wholesale & VIP Pricing).

    select customer pricing 

  5. Select Get.

    select get 

  6. Select Install app.

    select install app 

  7. Select Approve Charge.

     select approve charge

At this point you are presented with three options:

  • Liquid Installation Guide - This presents this page for you and walks you through completing the install yourself, continue with Step 2: Add Snippet Files below.
  • Automatic Liquid Install (BETA) - This will automatically complete the install for you. If you do this, you can skip to Step 11: Test the Install.
  • Installation Support - This will send an install request to have our Support Wizards complete the install for you. Doing this will also make the remaining steps in this article unnecessary.

 Install Options

  1. Duplicate themes, to create a backup copy.

    duplicate themes 

  2. From "Shopify Admin", select Online Store.

    select online store 

  3. Select Actions.

    Actions 

  4. Select Edit code.

    Edit code 

  5. Under "Snippets", find these five files:
    • bold-common.liquid
    • bold-product.liquid
    • bold-variant.liquid
    • bold-cart.liquid
    • bold-cart-item.liquid
    • bold-csp-metafield-variant.liquid

    look for bold-product.liquid 

  6. For any that don't exist:
    1. Select Add a new snippet.

      add a new snippet 

    2. Enter the correct Snippet name.

      enter 

    3. Select Create snippet.

      select create snippet 

    4. Copy and paste the code found in each of these links into their respective files:

      copy and paste the code  

    5. Select Save.

      select save 

    6. Repeat steps 6a – d for each missing snippet file.
  1. From "Shopify Admin", select Online Store.

    select online store 

  2. Select Actions.

    Actions

  3. Select Edit code.

    Edit code 

  4. Under "Layout", select theme.liquid.

    select theme.liquid 

  5. Copy and paste this code directly above the </body> tag:

    <!-- Bold: CSP Step 1 (theme) -->
    <script type="text/javascript" charset="utf-8">
    var shappify_customer_tags ={{ customer.tags|json }}
    </script>
    <!-- // end bold code -->

    copy and paste the code 

  6. Select Save.

    select save 

  1. From "Shopify Admin", select Online Store.

    select online store 

  2. Select Actions.

    Actions 

  3. Select Edit code.

    Edit code 

  4. Under "Templates", select collection.liquid.

    Note: If your template contains sections, you will need to select the collection-template.liquid section instead.

    select collection.liquid 

  5. Find:

    {% for product in collection.products %}

    Note: This line may appear more than once in the file, you will need to add the line of code for each instance. Can't find this code?

    find this line 

  6. Copy and paste this code directly below each instance:

    {% include 'bold-product' with product, hide_action: 'skip' %}

    copy and paste this code below 

  7. Select Save.

    select save 

  1. From "Shopify Admin", select Online Store.

    select online store 

  2. Select Actions.

    Actions 

  3. Select Edit code.

    Edit code 

  4. Under "Templates", select index.liquid.

    select index.liquid 

  5. Find:

    {% for product in collection.products %}

    Note: This line may appear more than once in the file, you will need to add the line of code for each instance. Can't find this code?

    find this code 

  6. Copy and paste this code directly below each instance:

    {% include 'bold-product' with product, hide_action: 'skip' %}

    copy and paste this code above 

  7. Select Save.

    select save 

  1. From "Shopify Admin", select Online Store.

    select online store 

  2. Select Actions.

    Actions 

  3. Select Edit code.

    Edit code 

  4. Under "Snippets", select related-product.liquid.

    select related-product.liquid 

  5. Find:

    {% for product in collection.products %}

    Note: This line may appear more than once in the file, you will need to add the line of code for each instance. Can't find this code?

    find this code 

  6. Copy and paste this code directly below each instance:

    {% include 'bold-product' with product, hide_action: 'skip' %}

    copy and paste this code below 

  7. Select Save.

    select save 

  1. From "Shopify Admin", select Online Store.

    select online store 

  2. Select Actions.

    Actions 

  3. Select Edit code.

    Edit code 

  4. Under "Templates", select search.liquid.

    Note: You may find this code in a similarly titled file instead.

    select search.liquid 

  5. Find:

    {% for item in search.results %}

    Note: This line may appear more than once in the file, you will need to add the line of code for each instance.

     find this code

  6. Copy and paste this code directly below each instance:

    {% include 'bold-product' with item, hide_action: 'skip' %}

    copy and paste this code below 

  7. Select Save.

    select save 

  1. From "Shopify Admin", select Online Store.

    select online store 

  2. Select Actions.

    Actions 

  3. Select Edit code.

    Edit code 

  4. Under "Templates", select product.liquid.

    Note: If your template contains sections, you will need to select the product-template.liquid section instead.

    select product.liquid 

  5. Paste this code to the top of the file:

    {% include 'bold-product' with product, hide_action: 'break' %}{% if bold_hidden_product %}{% break %}{%endif %}

    paste this code 

  6. Find:

    {% for variant in product.variants %}

    Note: This line may appear more than once in the file, you will need to add the line of code for each instance.

    find this code 

  7. Copy and paste this code directly below each instance:

    {% include 'bold-variant' with variant, hide_action: 'skip'  %}

    copy and paste this code 

  8. Find:

    {%- assign variant = product.selected_or_first_available_variant -%}

    Note: The variable within this line could be current_variant, pr_variant, etc. Ensure the variable in the line you add is the same.

    If this line exists, copy and paste this code below it:

    {%- include 'bold-variant' with variant, output: 'none' -%}

    If this line doesn't exist, do nothing.

    copy and paste this code 

  9. Find:

    product.variants.size

    Note: This line may appear more than once in the file, you will need to replace the code for each instance.

    find products.variants.size 

  10. Replace with:

    bold_variants_size

    replace with bold_variants_size 

  11. Find:

    {{ product | json }}

    Note: This line may appear more than once in the file, you will need to add the line of code for each instance.

    find product | json 

  12. Replace with:

    {% include 'bold-product',  output: 'json' %}

    replace with this code 

  13. Select Save.

    select save 

Note: If any of this code already exists, you can skip the step.

  1. From "Shopify Admin", select Online Store.

    Online Store 

  2. Select Actions.

    Actions 

  3. Select Edit code.

    Edit code 

  4. Under "Templates", select cart.liquid.

    Note: If your theme contains sections, you may have to look for this code under "Sections" in cart-template.liquid instead.

    select cart.liquid

  5. On the first line paste:

    {% include 'bold-cart' %}

    add code 

  6. Find:

    {% for item in cart.items %}

    and add this code directly after:

    {% include 'bold-cart-item' with item %}

    add code 

  7. Replace any instances of item.price with:

    bold_item_price

    replace code 

  8. Replace any instances of item.line_price with:

    bold_item_line_price

    replace code 

  9. Replace any instances of cart.total_price with:

    bold_cart_total_price

    Note: Some themes also show the total price somewhere in the theme's header. If the cart total price is shown in the header as well, add {% include 'bold-cart' %} at the beginning of the file that prints the price, then change cart.total_price to bold_cart_total_price

    replace code 

  10. Select Save.

    select save 

Note: If any of these files or code already exists, you can skip the step.

  1. Duplicate themes, to create a backup copy.
  2. From "Shopify Admin", select Online Store.

    Online Store 

  3. Select Actions.

    Actions 

  4. Select Edit code.

    Edit code 

  5. Under "Snippets", select bold-common.liquid.

    select bold-common.liquid 

  6. Copy and paste this code in the bottom of the file.
    {{ 'https://cp.boldapps.net/js/csp.js' | script_tag }}

    copy and paste this code 

  7. Select Save.

    select save 

Updates need to be done on all theme files that output product prices on the site. The number and name of the files will vary from theme to theme. Usually, 3-5 files will need to be updated, which will control the price fields on the product, collection, search, related-products (on the product page) and homepage pages. It's important that each theme file that outputs a price be modified, to ensure the correct pricing always shows.

When you're ready to proceed, select the "Files to Update" tab.

Go through the list of files, one file at a time, and then reference your theme's files to see if that particular file exists in the theme. Not all of these will appear in a given theme.

When you find a file that your theme has, select the "product.price" tab to continue.

  • "Templates" folder (all themes will have these files)
    • product.liquid
    • index.liquid
    • collection.liquid
    • search.liquid
  • "Snippets" folder (any given theme will typically have several of these)
    • product-block.liquid
    • product-card.liquid
    • product-form.liquid
    • product-grid-collage.liquid
    • product-grid-item-category.liquid
    • product-grid-item.liquid
    • product-list-item.liquid
    • product-listing.liquid
    • product-loop.liquid
    • product-single.liquid
    • product-thumbnail.liquid
    • product.liquid
    • related-products.liquid
    • search-result-grid.liquid
    • search-result.liquid
    • search.liquid
    • short-form.liquid
    • snippet-product-item.liquid
  • "Assets" folder (don't change anything in here)

When you've gone through the list, this step will be complete.

Look for each of these ... ... and replace all instances with this code
product.price bold_price
product.price_min bold_price_min
product.price_max bold_price_max
product.price_varies bold_price_varies
product.compare_at_price bold_compare_at_price
product.compare_at_price_min bold_compare_at_price_min
product.compare_at_price_max bold_compare_at_price_max
product.compare_at_price_varies bold_compare_at_price_varies
product.selected_or_first_available_variant bold_selected_or_first_available_variant
product.variants.first bold_selected_or_first_available_variant
product.variants[0] bold_selected_or_first_available_variant

Not all of these will appear in a given file, but the ones that do appear in a file may appear a few times.

If you found and replaced some of the above, then select the "Files to Update" tab and continue down the file list.

If the file has none of these, then select the "item.price" tab.

Look for each of these ... ... and replace all instances with this code
item.price bold_price
item.price_min bold_price_min
item.price_max bold_price_max
item.price_varies bold_price_varies
item.compare_at_price bold_compare_at_price
item.compare_at_price_min bold_compare_at_price_min
item.compare_at_price_max bold_compare_at_price_max
item.compare_at_price_varies bold_compare_at_price_varies
item.selected_or_first_available_variant bold_selected_or_first_available_variant
item.variants.first bold_selected_or_first_available_variant
item.variants[0] bold_selected_or_first_available_variant

Not all of these will appear in a given file, but the ones that do appear in a file may appear a few times.

If you found and replaced some of the above, then select the "File to Update" tab and continue down the file list.

If the file has none of these, then bring up the file editor's search feature (Ctrl+f), and do a search for ".price" (minus the quotes), and continue below.

If nothing is found after the search, or if you find "variant.price","variant.price_min","variant.price_max", or "variant.price_varies", then nothing will need to be done with this file, and you can select the "Files to Update" tab and continue down the file list.

If something is found after the search, take note of what was found, and then select the "Other" tab.

Some files in some themes will use something other than "product" or "item", and you'd need to change our code to work with what the file uses. For example, a file may use "product-detail" instead.

To proceed, substitute * with whatever was before the ".price" when you searched in the previous section, then look for that code in the file and replace what you find with the app's code.  Again, it's not necessary to change anything with "variant" in it, such as "variant.price".

For example, if you found "product-detail.price", then replace "*" with "product-detail" with each item below, and then look for that code in the theme. So, for the first item, you'd look for "product-detail.price", and if found, replace it with "bold_price".

Look for each of these ... ... and replace all instances with this code
*.price bold_price
*.price_min bold_price_min
*.price_max bold_price_max
*.price_varies bold_price_varies
*.compare_at_price bold_compare_at_price
*.compare_at_price_min bold_compare_at_price_min
*.compare_at_price_max bold_compare_at_price_max
*.compare_at_price_varies bold_compare_at_price_varies
*.selected_or_first_available_variant bold_selected_or_first_available_variant
*.variants.first bold_selected_or_first_available_variant
*.variants[0] bold_selected_or_first_available_variant

Not all of these will appear in a given file, but the ones that do appear in a file may appear a few times.

When you're done with this file, select the "File to Update" tab and continue down the file list.

Set up a test in the app

Visit Customer Pricing General Walkthrough for detailed information):

  1. Log into the app admin.
  2. Create a new pricing tier and a tag associated with the new tier.
  3. Create a new Customer Pricing group, assign a small discount for the new tier (e.g., 1%), and select a single product to apply the discount to.
  4. In the Shopify admin, create a customer account and assign the tag associated with your new pricing tier to the account.

Testing the storefront:

  1. On the storefront, navigate to the search page and search for the product that you selected in the app. If the search page shows a price field, check to see if the price is the regular price.
  2. Go to any collection page that has the selected product in and verify that the price shown is the regular product price.
  3. Go to the product page and check the variant drop-down selector to make sure that the app's variants aren't showing there.
  4. While on the product page, check to see if the product page's price is showing the product's regular price.
  5. Log into the customer account that you created earlier, navigate back to the search page and search for the product that you selected in the app. If the search page shows a price field, make sure that the price is the app's discounted price.
  6. Go to any collection page and verify that the price shown is the discounted app pricing.
  7. While on the product page, make sure that the product page's price field is showing the app's discounted price.

That's it!

By default, the Draft Orders method is supplied on new installs of Customer Specific Pricing, for detailed information on the different methods, visit Discount Methods in Customer Specific Pricing. To switch, visit Switch Discount Methods in Customer Specific Pricing.

Next Steps