Shopify -- Algoria to integrate with Bold Custom Pricing app

We are currently using Algoria for our search and really happy with the results and ease-of-use for our customers.

We also have the Bold Custom Pricing app in use on our store to give customers a discount if they are registered under one of our representatives.

The Bold Custom Pricing app is working on our store, but we have yet to integrate this with the Algoria instant search page and the autocomplete price.

I tried putting the standard {{ bold_price }} within the algoria_instant_search_product.hogan.liquid file but that doesn’t come up with any input.

I also tried to get the price of each search item and put it in a separate <p> tag with the option of the discount applied if the customer has a tag, but every time I try this method I keep getting all the prices in the <p> tag.

Can Algoria integrate with this app? If not, are there any work-arounds I can use to make sure signed in customers with a specific tag see a lower price than the standard price?

Thanks!

Hi James,

Thanks for reaching us.

Our front-end file does not have access to this variables because it is defined in the other plugin. This is why it is not working. I am not sure about what you said for the p tag. Could you send me the relevant liquid code ?

If you want to achieve that, you’ll have to check if the configuration of the plugin contain the bold price in a public variable available in the front-end. Then the idea is to apply some custom logic into algolia_instant_search.js in the transformData function to define the bold_price variable (exactly like the can_order variable of algolia) which then should be available on Algolia’s file.

Thanks,

Alex

Thank you for your help with this. I did find a work-around for this involving some liquid and JS.

Basically the liquid will put an extra class into the product price container on the instant search page. This is based on if the customer is logged in and if they have a specific tag.

The JS will then find that extra class, extract the product price and then give the appropriate discount based on the tag (“Professional” or “Platinum”).

The Bold custom price app requires that the {{ product.price }} tag is replaced with {{ bold_price }} within all the theme files. It also requires a number of other tags be replaced as well. I understand what you are saying about defining the {{ bold_price }} variable within the transformData function, but I’m not sure if it will work 100%. The work-around we have for now is simple enough and effective, so we will roll with that unless there is another issue.

Thank you for your help.

1 Like