Top

Order Manager Liquid Install Instructions

Once you have added the following code to your theme, you will be able to have the Order Manager app create copies of products that are not visible in the store.  These products will still be able to be purchased by customers who have received the special link.

Getting Started

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

Difficulty: Easy
Time Required: 10 to 20 minutes

Quick Tip!

If you have installed code for Product Options (Premium), or Product Discount (Duplicate & Hide) on the current theme, you may already have the Order Manager code added.

Section 1: Edit the product.liquid

In this section, liquid code is added to the product pages to hide the product from displaying, in the event the customer stumbles upon the duplicate product.

1

On the first line of the product.liquid, copy and paste this line

<!-- Bold: Order Manager-->
{% if product.metafields.inventory.ShappifyHidden == "true" %}
Product is not available
{% else %}

And at the bottom of the same file, on the very last line, copy and paste this code:

<!-- Bold: Order Manager--> {% endif %}

Once complete, save your changes.

Section 2: Edit the collection.liquid

Similar to the above section, liquid code is added to the collection pages, hiding the duplicate product from appearing.

2

Find the line {% for product in collection.products %}.
Below this line, add the highlighted code.

{% for product in collection.products %}
<!-- Bold: Order Manager -->
{% if product.metafields.inventory.ShappifyHidden == "true" %}

{% else %}

If there is an {% else %} before the {% endfor %} and there is no {% endif %} between them, before the {% else %} add:

{% endif %} <!-- Bold: Order Manager -->
{% else %}

Otherwise, before the {% endfor %} add:

{% endif %} <!-- Bold: Order Manager -->
{% endfor %}
In some themes, rather than {% for product in collection.products %}, look for: {% for product in products limit: limit %} or {% for product in collection.products limit: settings.pagination_limit %}

Save your changes.

Section 3: Edit the search.liquid

Lastly, here we add code to the search template to hide the product from appearing in the search results.

3

Find the line {% for item in search.results %}.
Below that line, add the highlighted code. It should now look like this:

{% for item in search.results %}
{% if item.metafields.inventory.ShappifyHidden == "true" %}{% else %}
...
{% endif %}
{% endfor %}

If there is an {% else %} before the {% endfor %} and there is no {% endif %} between them, before the {% else %} add:

{% endif %} <!-- Bold Order Manager -->
{% else %}

Otherwise, before the {% endfor %} add:

{% endif %} <!-- Bold Order Manager -->
{% endfor %}

Once complete, save the file.

Part 4: Edit the cart.liquid

Code is added in the cart page to stop a customer from changing the item quantity on the duplicate product within the cart.

4-1

In the cart.liquid, locate the line where the quantity is displayed. The line of code may look similar to this:

<input type="text" size="4" name="updates[{{item.id}}]" id="updates_{{item.id}}" value="{{ item.quantity }}" />

Specifically, look for the line that contains item.quantity:

4-2

Before the closing tag (/>), add this line:

{% if item.product.metafields.inventory.ShappifyHidden == "true" %} readonly="readonly" {% endif %}

It should now look something like:

<input type="text" size="4" name="updates[{{item.id}}]" id="updates_{{item.id}}" value="{{ item.quantity }}" {% if item.product.metafields.inventory.ShappifyHidden == "true" %} readonly="readonly" {% endif %} />

Save the file once complete.

Part 5: Theme.liquid (optional)

5

In the theme.liquid, anywhere within the head tags (<head> ... </head/>), copy and paste these lines.

It says optional. Is this step really important?

It's optional, as it is not necessary for the designed functionality of the Duplicate & Hide feature.
Having said that, it is recommended to complete this step.

By default, search engines are greedy. They want to index as much content as they can, and will assume they can crawl everything, unless you tell them otherwise.

As the Duplicate & Hide name suggests, a copy of the product will be created in the store, creating a crawlable, indexable page that becomes listed in your sitemap. Google along with other search engines use this sitemap to navigate your website, indexing pages into their results. Duplicate pages can hurt your SEO, negatively affecting your ranking within search engines.

By using the robots noindex tag, this tells the search engine not to include the useless blank page.

Troubleshooting & Known Issues

  • Hidden product appearing? Code may be missing, theme changed, or product copied.

Step 6: Custom Product Delete (optional)

Now that you've entered this code when you create custom products with the Custom Order app it creates hidden products in your store that are just used for orders with this app. After a while they can build up and it's nice to delete them to keep things neat and tidy. 

To do this head over to your Products section:

Then enter in the search bar:  bold\-quick\-order*  and save that search as "Custom Order Products":

Now you can come back anytime and click on that saved search tab above and quick remove all the extra hidden products used by the app. 

Wanna leave it to the professionals? If you get stuck we can help :-) Head over to the LIQUID INSTALLATION PAGE then click the big blue button and we'll get you set up! (You may need to login again)
Have more questions? Submit a request