Hide Fixed cost column of pricing table - xmpie-users/uStore-js GitHub Wiki

When you choose to show the pricing table, and don't define any Fixed Cost prices, it seems odd to show this column in the pricing table.

Alt

It is very easy to hide the column with two lines of JavaScript:

<script type="text/javascript"> 
  $(document).ready(function() { 
    $('table#ctl00_cphMainContent_ucPricingTable_ucPricingTablePricingTableUI_DGProductPricing_ctl00 thead th:nth-child(3)').hide();
    $('table#ctl00_cphMainContent_ucPricingTable_ucPricingTablePricingTableUI_DGProductPricing_ctl00 tbody td:nth-child(3)').hide();
  });
</script>

Further: If you also want to hide the Fixed Price row from the summary table when the Fixed price is $0.00:

Alt

You can use this script:

<script type="text/javascript"> 
  $(document).ready(function() { 
    var fp = $('tr#OrderFinalStep_PriceReview_PriceTag td:nth-child(3)').text();
    if (fp == '$0.00') {
      $('tr#OrderFinalStep_PriceReview_PriceTag').hide();

      //you can uncomment the following the two lines to also hide the table column as described earlier.
      //$('table#ctl00_cphMainContent_ucPricingTable_ucPricingTablePricingTableUI_DGProductPricing_ctl00 thead th:nth-child(3)').hide();
      //$('table#ctl00_cphMainContent_ucPricingTable_ucPricingTablePricingTableUI_DGProductPricing_ctl00 tbody td:nth-child(3)').hide();
    }
  });
</script>

For information on how to add JavaScript to your store: How to add JavaScript to a storefront.

⚠️ **GitHub.com Fallback** ⚠️