View Single Post
  #4  
Old 07-31-2012, 01:57 PM
Maya's Avatar
Maya Maya is offline
Ecwid Team
 
Join Date: Feb 2010
Location: Ecwid headquarter
Posts: 5,876
Default

Quote:
Originally Posted by Redwood View Post
Thank you for responding Maya. Here is the link to the site.
I have checked your site and found out that script, which should hide zero prices has been inserted incorrectly. This thing is that "&" symbol has been changed to "&" for some reason.

Please, replace current script with this one:
Code:
(function() {
  var __indexOf = [].indexOf || function(item) { for (var i = 0, l = this.length; i <l; i++) { if (i in this && this[i] === item) return i; } return -1; };
  var categories;
  /* if you need to have the zero price generally visible in the store and hide them only in some categories, you can put those categories' IDs, comma separated, into categories array below */
  categories = [3204099, 3204100];
  /* like
 categories = [2222333, 44455555];
 */
  Ecwid.OnAPILoaded.add(function() {
    var zeroval;
    zeroval = Ecwid.formatCurrency(0);
    Ecwid.OnPageLoaded.add(function(page) {
      var $, _ref;
      $ = window.jQuery;
      if (page.type === 'PRODUCT' && ((_ref = page.categoryId, __indexOf.call(categories, _ref) >= 0) || categories.length === 0)) {
        $('div.ecwid-productBrowser-price:contains("'+zeroval+'")').css({
          display: 'none'
        });
      }
    });
  });
})();
and make sure that it has been saved correctly.

Once you insert this script properly, everything will work as expected.
__________________
Maya N., Ecwid Team

------------------
Welcome to our new Help Center!
The Following User Says Thank You to Maya For This Useful Post:
Redwood (07-31-2012)