Bold Discounts V1 Code Uninstall Instructions

Overview

Bold Discounts has moved to a new version of the app. In order for this version to work correctly, any of Bold Discount's previously-installed code must be removed from your theme code.

Note: This uninstallation is only necessary if you've previously had the duplicate & hide code installed on your theme.

To remove Discounts' code from your site, please follow these steps:

 Caution

This step is only required if you have code installed for one of the following apps:

  • Bold Discounts 
  • Custom Pricing V1 or V2 (Draft Orders Method) 
  • Product Options (all versions)
  • Bold Bundles V1 or V2 (Draft Orders Method)

If you do not have one of these apps' code installed, please skip this step and proceed to the next.

Overview

Updates may need to be done on all theme files that output product prices on the site. The number and name of these files will vary from theme to theme. Generally, three to five files will need to be updated. These control the price fields on the product, collection, search, related products, and home pages. It's important that each theme file that outputs a price be modified. This is to ensure all of the older code is removed.

Note: This will require you to go back and edit multiple files within your theme coding. To access your theme files on Shopify, select Online Store from your Shopify admin.

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


List of Theme Files to Update:

  • Templates: All themes should contain these files. If your theme is using "Sections", these files will be located within the "Sections" folder as *-template.liquid files.
    • product.liquid
    • index.liquid
    • collection.liquid
    • search.liquid
  • Snippets: Any given theme should typically have several of these files.
    • 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

Bold Pricing Code vs. Original Pricing Code:

This is the code snippet that needs to be replaced, and the code to replace it:

Look for each of these... ...and replace all instances with this code

bold_price

product.price or item.price

  1. Duplicate themes, to create a backup copy.
  2. From Shopify's admin, select Online Store.
  3. Select Actions.
  4. Select Edit code.
  5. Under "Templates", select cart.liquid

    Note: If your theme contains sections, you may find this code within cart-template.liquid under "Sections" instead.

  6. Find each instance of this code and delete it:
    {%- include 'bold-cart-item' with item -%}

    Paste include cart item

  7. Look for a line that starts with <input containing value="{{ item.quantity }}" and delete the following code from this line:

    Note: Visit Can't find this code? for more information on the different ways this may display in your theme.

    {{ bold_qty_attr }}

    Find Bold QTY Attr

  8. Right before the />, remove this code as well:

    {% if product.metafields.inventory.ShappifyHidden %} readonly {% endif %}
  9. Select Save.

Continuing within the theme files, complete the following steps:

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

    Note: If your theme contains sections, you may find this code within product-template.liquid under "Sections" instead.

  2. Remove the following lines of code at the top of the file:
    {% if product.metafields.inventory.ShappifyHidden %}{% break %}{% endif %}
    {%- include 'bold-product' with product, hide_action: 'break', output: 'none' -%}

    Remove product code

    Remove code top of product.liquid

  3. Find these line of code and remove both lines: 
    {% render 'shappify-sales-icon-product' %}
    {% render 'shappify-sales-clock' %} 

    Render_product_icons

    Render_sales_clock

  4. Select Save.
  5. Under "Layout", select theme.liquid.
  6. Find the following lines of code and delete both lines: 
    {%- include 'bold-product' with product, hide_action: 'header' -%}
    {% if product.metafields.inventory.ShappifyHidden == "true" %} <meta name="robots" content="noindex"> {% endif %}

    Find theme.liquid loop

    remove head code
  7. Select Save.

Continuing within the theme files, complete the following steps:

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

    Note: If your theme contains sections, you may find this code within collection-template.liquid under "Sections" instead.

  2. Find each instance of this code and delete it:
    {%- include 'bold-product' with product, hide_action: 'skip' -%}

    Remove product loop

  3. Find each instance of this code and delete it:
    {% if product.metafields.inventory.ShappifyHidden %}{% continue %}{% endif %}

    Paste for product collection code

  4. Find the following line of code and delete it:
    {% render 'shappify-sales-icon-collection' %}

    Remove sales icon collection

  5. Select Save.
  6. Complete these steps in index.liquid and related-products.liquid if the code exists within them. If it doesn't exist, continue with Step 5.

Continuing within the theme files, complete the following steps:

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

    Note: If your theme contains sections, you may find this code within search-template.liquid under "Sections" instead.

  2. Find each instance of this code and delete it:
    {%- include 'bold-product' with item, hide_action: 'skip' -%}

    Remove for item loop code

  3. Find each instance of this code and delete it:
    {% if item.metafields.inventory.ShappifyHidden %}{% continue %}{% endif %}

    Paste for item search code

  4. Select Save.

Continuing within the theme files, complete the following steps:

  1. Under "Snippets", find these files:
    • bold-cart-item.liquid
    • bold-product.liquid
    • bold-variant.liquid
    • shappify-sales-icon-product
    • shappify-sales-icon-collection
    • shappify-sales-clock.liquid
  2. Select the respective file name.
  3. Select Delete file.
  4. Select Delete file again.
  5. Repeat Steps 2 - 4 until all of these snippet files are deleted.
Was this article helpful?
0 out of 0 found this helpful