SED lines to remove Bold customer pricing app from Shopify Theme

The Bold Customer Pricing app for Shopify is a little complex to remove.

You can follow the installation instructions in reverse for removal but you’ll probably also need these lines below to quickly find and replace the lines it has modified in your theme.

The other edits can’t really be automated with ease as each theme is different, but, these should remain the same.

If you’re on Mac, you’ll need to do this first in your terminal.

export LC_CTYPE=C 
export LANG=C

Then, go to the directory with your theme downloaded, probably using the themekit if you’re a regular developer, and execute these commands which will find and replace all instances of bold’s code.

find ./ -type f -exec sed -i -e 's/bold_price/product.price/g' {} \;
find ./ -type f -exec sed -i -e 's/bold_price_min/product.price_min/g' {} \;
find ./ -type f -exec sed -i -e 's/bold_price_max/product.price_max/g' {} \;
find ./ -type f -exec sed -i -e 's/bold_price_varies/product.price_varies/g' {} \;
find ./ -type f -exec sed -i -e 's/bold_compare_at_price/product.compare_at_price/g' {} \;
find ./ -type f -exec sed -i -e 's/bold_compare_at_price_min/product.compare_at_price_min/g' {} \;
find ./ -type f -exec sed -i -e 's/bold_compare_at_price_max/product.compare_at_price_max/g' {} \;
find ./ -type f -exec sed -i -e 's/bold_compare_at_price_varies/product.compare_at_price_varies/g' {} \;
find ./ -type f -exec sed -i -e 's/bold_selected_or_first_available_variant/product.selected_or_first_available_variant/g' {} \;
find ./ -type f -exec sed -i -e 's/bold_selected_or_first_available_variant/product.variants.first/g' {} \;
find ./ -type f -exec sed -i -e 's/bold_selected_or_first_available_variant/product.variants[0]/g' {} \;

Then just make sure you’ve done all the changes mentioned in their installation instructions (in reverse!) and you should be good to go.

Hope this helps someone else too!

No comment yet, add your voice below!


Add a Comment

Your email address will not be published. Required fields are marked *

Comment *

Name *
Email *
Website