<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom"
    xmlns:fh="http://purl.org/syndication/history/1.0"
    xmlns:at="http://purl.org/atompub/tombstones/1.0">

    <title>Sockpuppet: Blog</title>
    
    <subtitle><![CDATA[Updates, articles, and behind-the-scenes content.]]></subtitle>
    
    <link href="https://sockpuppet.band/blog/feed?id=1087&amp;tag=pricing" rel="self" />
    
    <link href="https://sockpuppet.band/blog/feed?tag=pricing" rel="current" />
    <fh:archive/>
    

    <link href="https://busybee.superfeedr.com" rel="hub" />
    
    
    <link href="https://sockpuppet.band/blog/" />
    <id>tag:sockpuppet.band,2026-05-14:blog</id>
    <updated>2025-04-26T19:42:06-07:00</updated>

    

    <entry>
        
        <title>Bulk-editing Bandcamp per-track pricing</title>
        <link href="https://sockpuppet.band/blog/1087-Bulk-editing-Bandcamp-per-track-pricing" rel="alternate" type="text/html" />
        <published>2025-04-26T19:42:06-07:00</published>
        <updated>2025-04-26T19:42:06-07:00</updated>
        <id>urn:uuid:57b94f47-2c3f-539a-b479-e7395576f9d1</id>
        <author><name>fluffy</name></author>
        <summary type="html"><![CDATA[<p>Bandcamp recently rolled out <a href="https://get.bandcamp.help/hc/en-us/articles/31667693315735-How-do-I-use-the-Bulk-Edit-feature">bulk editing for albums</a>, but unfortunately it only lets you bulk-edit album prices, rather than the prices of individual tracks within an album. Fortunately, it isn&rsquo;t too difficult to do this with a little Javascript.</p>]]></summary>
        <content type="html"><![CDATA[

		

        



        <p>Bandcamp recently rolled out <a href="https://get.bandcamp.help/hc/en-us/articles/31667693315735-How-do-I-use-the-Bulk-Edit-feature">bulk editing for albums</a>, but unfortunately it only lets you bulk-edit album prices, rather than the prices of individual tracks within an album. Fortunately, it isn&rsquo;t too difficult to do this with a little Javascript.</p><p>For each album that you want to change the prices on:</p>
<ol>
<li><p>Open up your album&rsquo;s editor</p></li>
<li><p>Open up your browser&rsquo;s Javascript console (usually using <kbd>ctrl-alt-I</kbd> on a PC, or <kbd>cmd-alt-I</kbd> on a Mac)</p></li>
<li><p>Paste in this bit of code (assuming you want to set the price to 1.50 per track in your local currency; change the <code>&#39;1.50&#39;</code> to whatever value you want it to be otherwise) and press <kbd>Enter</kbd>:</p><figure class="blockcode"><pre class="highlight" data-language="javascript" data-line-numbers><span class="line" id="e1087cb1L1"><a class="line-number" href="https://sockpuppet.band/blog/1087-Bulk-editing-Bandcamp-per-track-pricing#e1087cb1L1"></a><span class="line-content"><span class="nb">document</span><span class="p">.</span><span class="nx">querySelectorAll</span><span class="p">(</span><span class="s1">&#39;input.price[name^=&quot;track.price&quot;]&#39;</span><span class="p">)</span></span></span>
<span class="line" id="e1087cb1L2"><a class="line-number" href="https://sockpuppet.band/blog/1087-Bulk-editing-Bandcamp-per-track-pricing#e1087cb1L2"></a><span class="line-content"><span class="w">    </span><span class="p">.</span><span class="nx">forEach</span><span class="p">(</span><span class="nx">e</span><span class="p">=&gt;{</span><span class="nx">e</span><span class="p">.</span><span class="nx">value</span><span class="o">=</span><span class="s1">&#39;1.50&#39;</span><span class="p">;</span><span class="nx">e</span><span class="p">.</span><span class="nx">dispatchEvent</span><span class="p">(</span><span class="ow">new</span><span class="w"> </span><span class="nx">Event</span><span class="p">(</span><span class="s1">&#39;change&#39;</span><span class="p">))})</span></span></span>
</pre></figure></li>
<li><p>Verify that the prices are the way you want them and then click &ldquo;update album&rdquo;</p></li>
</ol>


        
            <p>Note that copy-pasting random Javascript from the web is generally unsafe to do, so I&rsquo;ll explain exactly what this code does:</p>
<ol>
<li><code>document.querySelectorAll</code> asks the browser to give a list of items on a webpage; in this case, the query <code>input.price[name^=&quot;track.price&quot;]</code> asks for all of the text inputs which have a <code>class</code> of <code>price</code> and a <code>name</code> starting with <code>track.price</code>, which is how Bandcamp marks a text input as being a track price</li>
<li><code>forEach</code> runs a function on each of the text inputs; in this case, for each one, it

<ol>
<li>sets the <code>value</code> attribute (which is the text in the box) to <code>1.50</code></li>
<li>notifies the browser that the value has changed (which is necessary because Bandcamp is using custom validation and data binding logic)</li>
</ol></li>
</ol>
<p>Anyway. This is still not <em>great</em>, process-wise, but it&rsquo;s a lot easier than having to edit every single track manually.</p>
            

            

        
        <a rel="tag" href="https://sockpuppet.band/blog/?tag=bandcamp">#Bandcamp</a>
        
        <a rel="tag" href="https://sockpuppet.band/blog/?tag=pricing">#Pricing</a>
        

        ]]>



        </content>
        <category term="Blog" label="Blog" />
        
        
        <category term="Bandcamp" label="bandcamp" />
        
        <category term="Pricing" label="pricing" />
        

        

    </entry>
    

    
</feed>