Compare at Price - bulk edit

94 0 12

Woudn't it be awesome if you could start and finish a sale in your Shopify store without having to reply on apps that aren't always reliable?

I'm sure it could be done by being able to do a bulk action to change the "compare at price" rather than having to manually change this for each variant. I have requested this feature today from Shopify although I'm sure it will gain more ground if a few more folk ask for the same feature. 

Replies 7 (7)
Shopify Expert
10440 169 2081

The built in bulk editor is not good enough for your needs? You can edit compare at price with that pretty quickly. You can click the first cell, shift click the last cell and just type the amount. It will change all fields in between.

I jump on these forums to help and share some insights. Not looking to be hired, and not looking for work.
Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.
★ ★
New Member
1 0 1

You can quick and easily bulk edit "compare_at" price just with some copy / paste of JavaScript code. You can even adjust the percentage that you need your prices to be modified to.


It's not needed to be dev or tech savvy, just follow the instructions here -

New Member
1 0 0

Same thought!

New Member
2 0 2

I found the snippet on that site didn't work quite right. The selectors were off. Not sure if that's related to the status of the bulk edit screen or what. Here's an updated version if you, too, have trouble:



/* Bulk update prices */

var prices = $('input[name^="product[variants_attributes]"][name$="[price]"]');

var compare_at = $('input[name^="product[variants_attributes]"][name$="[compare_at_price]"]');

var percentage = 0.2;

$.each(prices, function(key, price){



   $(price).val( ($(price).val() - ($(price).val() * percentage)).toFixed(2) );


/* Revert price updates */

var prices = $('input[name^="product[variants_attributes]"][name$="[price]"]');

var compare_at = $('input[name^="product[variants_attributes]"][name$="[compare_at_price]"]');

$.each(compare_at, function(key, value){





New Member
1 0 0

The bulk editor is the quickest way to do this if you're not techie. Group all the elements you want to edit simultaneously, click more actions - bulk editor. Change the first price in compare at then copy and paste the rest easily.

14 0 4

Hi @mirohristov 

I've followed your advice but no changes are happening within my browser unfortunately.


New Member
1 0 0

Thank masn, this is so good!
It's working in 2021 Nov. 12