Skip to main content

ProFind - “Where to Buy” button to your Shopify product pages

Product first search using a custom button on your product page

RP ProFind Setup Guide

Add a “Where to Buy” button to your Shopify product pages

Help shoppers move directly from a product page to your RP ProFind product locator, with the current product automatically selected.

This guide explains two ways to add a configurable Where to Buy button to an existing Shopify product template. The button includes a shopping-cart icon and sends the product code to your locator using the product URL parameter.

Where to Buy

Before you begin: Install and configure RP ProFind, publish your product-locator page, and confirm that the product identifiers in RP ProFind match the value you plan to send from Shopify—normally the product handle or variant SKU.

How the button works

The snippet starts with your locator page URL and adds the current product as a query parameter. For example:

https://www.yourname.com/pages/product-locator?product=example-product

In this example, example-product is the Shopify product handle. Replace www.yourname.com with your Shopify store's domain. RP ProFind can use the product value to open the locator with the appropriate product selected or filtered.

Choose your installation method

Method

Best for

Theme Editor controls

Option A: Native theme block

Newer Shopify themes whose product section supports theme blocks

Yes—all settings appear in the block panel

Option B: Snippet + Custom Liquid

Reusable installation for most Online Store 2.0 themes

Settings are edited in the render code

Option C: All-in-one Custom Liquid

The quickest setup, with no snippet or /blocks folder

Settings are edited at the top of the pasted code

Start with Option A if your product-information section accepts custom theme blocks. If RP ProFind button does not appear in the Add block menu, use Option B.

Option A: Install the native RP ProFind theme block

  1. Download and unzip rp-profind-native-theme-block.zip. (link at bottom)

  2. In Shopify admin, go to Online Store → Themes.

  3. Duplicate your live theme so you can test safely.

  4. On the duplicate theme, select … → Edit code.

  5. Open the blocks folder and select Add a new block.

  6. Name it rp-profind-where-to-buy.

  7. Copy the complete contents of blocks/rp-profind-where-to-buy.liquid into the new block and save.

  8. Open Customize, select the applicable product template, and choose Add block inside the product-information area.

  9. Select RP ProFind button, configure its settings, and save.

The native block provides visual controls for the locator URL, product-code source, button text, colors, cart icon, new-tab behavior, width, alignment, spacing, and corner radius.

Block not listed? The product section may use older section-local blocks rather than Shopify theme blocks. Nothing is broken—continue with Option B below. Shopify does not allow a section to mix section-local blocks and theme blocks.

Option B: Install the snippet

  1. Download and unzip rp-where-to-buy-shopify.zip. (link at bottom)

  2. In Shopify admin, go to Online Store → Themes.

  3. Duplicate your live theme so you can test safely.

  4. On the duplicate theme, select … → Edit code.

  5. In the Snippets folder, select Add a new snippet.

  6. Name the snippet rp-where-to-buy.

  7. Open snippets/rp-where-to-buy.liquid from the downloadable setup package, paste its complete contents into the new Shopify snippet, and save.

Add the snippet button to the product page

  1. Open Online Store → Themes → Customize.

  2. Use the template selector to open the product template where the button should appear.

  3. Inside Product information, add a Custom liquid block.

  4. Paste the code below into the block.

{% render 'rp-where-to-buy',   locator_url: '/pages/product-locator',   button_text: 'Where to Buy',   button_color: '#A4118D',   button_text_color: '#FFFFFF',   product_code: product.handle,   show_icon: true %}

Drag the block to the desired location—typically below the product title, price, variant selector, or Add to Cart controls—and save.

No Custom liquid block? Open the product section in the theme code—commonly sections/main-product.liquid—and paste the same render call where the button should appear. Theme filenames vary, so contact your theme developer or Rose Perl support if you are unsure. Shopify may label the snippet “not referenced” when the render call is stored in a Custom Liquid setting; this warning can be ignored if the button displays correctly.

Option C: Paste the complete button into Custom Liquid

This is the easiest approach for Shopify's Refresh theme and other themes that provide a Custom liquid product block. It requires no snippet and no /blocks folder.

  1. Download and unzip rp-where-to-buy-shopify-all-in-one.zip. (link at bottom)

  2. Open custom-liquid-all-in-one.liquid in a text editor and copy the entire file.

  3. In Shopify, open Online Store → Themes → Customize.

  4. Select the applicable product template.

  5. Under Product information, choose Add block → Custom liquid.

  6. Paste the complete code into the Custom Liquid field.

  7. Edit the configuration values at the top of the code if needed, then save.

assign rp_locator_url = '/pages/product-locator' assign rp_button_text = 'Where to Buy' assign rp_button_color = '#A4118D' assign rp_button_text_color = '#FFFFFF' assign rp_show_icon = true assign rp_product_code = product.handle

To match RP ProFind records by variant SKU instead, change the final line above to:

assign rp_product_code = product.selected_or_first_available_variant.sku

Why choose Option C? All Liquid, HTML, SVG, and CSS are stored together in the product template's Custom Liquid block. There is no separate file for Shopify to report as unreferenced. The tradeoff is that changes must be repeated if you paste separate copies into multiple product templates.

Configure the button

Setting

What it controls

Example

locator_url

The RP ProFind locator page

/pages/product-locator

button_text

The customer-facing label

Where to Buy

button_color

Button background and border

#A4118D

button_text_color

Button text and icon color

#FFFFFF

product_code

The identifier passed to RP ProFind

product.handle

show_icon

Shows or hides the cart icon

true or false

Choose the correct product identifier

Use the same identifier stored in your RP ProFind data:

  • Product handle: Use product.handle. This is usually the simplest option and produces values such as example-product.

  • Selected variant SKU: Use product.selected_or_first_available_variant.sku when RP ProFind records are matched by SKU.

product_code: product.selected_or_first_available_variant.sku

If no explicit product code is supplied, the snippet automatically tries the selected or first available variant SKU and then falls back to the product handle.

Test before publishing

  1. Preview the duplicate theme and open several products.

  2. Confirm that the button appears in the intended location on desktop and mobile.

  3. Select the button and verify that the locator opens.

  4. Check that the URL includes ?product= followed by the correct handle or SKU.

  5. Confirm that RP ProFind displays or filters to the expected product.

  6. Test products with spaces or special characters in their SKUs; the snippet URL-encodes the value automatically.

  7. Check that the button colors have sufficient contrast and match your storefront.

  8. Publish the duplicate theme only after testing is complete.

Troubleshooting

The button does not appear

Confirm that the snippet is named exactly rp-where-to-buy.liquid, that the render call uses 'rp-where-to-buy', and that you edited the product template assigned to the product you are viewing.

The locator opens but does not select the product

Compare the value after ?product= with the product identifier in RP ProFind. If RP ProFind uses SKUs, change the render call from product.handle to product.selected_or_first_available_variant.sku.

The URL already contains another query parameter

No change is required. The snippet detects an existing question mark and appends the product code with &product=.

The SKU changes when a shopper selects another variant

The Liquid value is generated when the page loads. If the locator must follow live variant changes without reloading the page, your theme will need a small JavaScript enhancement tied to its variant-change event.

Need help?

Visit help.roseperl.com for RP ProFind guidance or contact Rose Perl Technology through live chat for setup assistance.

Did this answer your question?