title: JS error when trying to update price on options select for bundled products in Magento
body: <p>Since upgrading a Magento website from 1.8 to 1.9 and switching them onto the RWD theme, the price is not updating when selecting product options for bundled products.</p>
  <p>The console returns the following error when you select an option:-</p>
  <blockquote>
  <p>Uncaught TypeError: Cannot read property 'update' of null</p>
  </blockquote>
  <p>This occurs at line 83 of <code>bundle.js</code> which is <code>tierPriceElement.update(tierPriceHtml);</code>.</p>
  <p>This is part of the <code>changeSelection</code> method which in it's entirety, is included below:-</p>
  <pre><code>changeSelection: function(selection){
      var parts = selection.id.split('-');
      if (this.config['options'][parts[2]].isMulti) {
          selected = new Array();
          if (selection.tagName == 'SELECT') {
              for (var i = 0; i &lt; selection.options.length; i++) {
                  if (selection.options[i].selected &amp;&amp; selection.options[i].value != '') {
                      selected.push(selection.options[i].value);
                  }
              }
          } else if (selection.tagName == 'INPUT') {
              selector = parts[0]+'-'+parts[1]+'-'+parts[2];
              selections = $$('.'+selector);
              for (var i = 0; i &lt; selections.length; i++) {
                  if (selections[i].checked &amp;&amp; selections[i].value != '') {
                      selected.push(selections[i].value);
                  }
              }
          }
          this.config.selected[parts[2]] = selected;
      } else {
          if (selection.value != '') {
              this.config.selected[parts[2]] = new Array(selection.value);
          } else {
              this.config.selected[parts[2]] = new Array();
          }
          this.populateQty(parts[2], selection.value);
          var tierPriceElement = $('bundle-option-' + parts[2] + '-tier-prices'),
              tierPriceHtml = '';
          if (selection.value != '' &amp;&amp; this.config.options[parts[2]].selections[selection.value].customQty == 1) {
              tierPriceHtml = this.config.options[parts[2]].selections[selection.value].tierPriceHtml;
          }
          tierPriceElement.update(tierPriceHtml);
      }
      this.reloadPrice();
  },
  </code></pre>
  <p>I can see that the exact same issue <a href="http://www.appframework.org/index.php/jquery/4655-magento-bundle-can-t-not-update-price-because-of-javascript-bug-of-the-theme" rel="nofollow noreferrer">used to exist</a> on here but it has since been deleted.</p>
  <p>Given this is the code that is packaged with the Magento 1.9, it is strange this is not working as expected... I did force the theme to fallback onto the template files for the <code>base</code> theme and the same error was triggered when trying to change the options on a bundled product.</p>
  <p>JavaScript certainly isn't my speciality (nor debugging it), is there something not right with the above snippet? Or any suggestions on how I can find the cause of this?</p>
  <h2>Edit</h2>
  <p>It appears it is something in the theme after all as I reverted to the default RWD theme and the prices were updating - perhaps an extension or something else being called in the layout XML.</p>