The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.
 
 
Thread Tools Display Modes
  #11  
Old 05-08-2017, 08:10 PM
Joseph Murawski's Avatar
Joseph Murawski is offline
 
Join Date: Apr 2016
Posts: 3
Default


Hey, any changes to ECWID that would cause this script to no longer function?
Quote:
Ecwid.OnPageLoaded.add(function (page) {
"use strict";
if (page.type === "PRODUCT" && page.categoryId != 18530265) {
$(".ecwid-productBrowser-details-outOfStockLabel").text("Price On Request");
} else if (page.type === "CATEGORY" && page.categoryId != 18530265) {
$(".ecwid-BuyNow-outOfStockLabel").text("Price On Request");
}
});
  #12  
Old 05-11-2017, 03:27 PM
Wendy's Avatar
Wendy Wendy is offline
Ecwid Team
 
Join Date: Jun 2014
Posts: 1,123
Default

Quote:
Originally Posted by Joseph Murawski View Post
Hey, any changes to ECWID that would cause this script to no longer function?
Hi Joseph,

This is Wendy from Ecwid customer care team. Thanks a lot for getting in touch with us!

We haven't done any changes that would conflict with this script. As a quick fix, please try to apply the updated script on your site:

Code:
Ecwid.OnPageLoaded.add(function (page) {
  if (page.categoryId != 18530265) {
    if (page.type === "PRODUCT" ) {
      [].slice.apply(document.querySelectorAll(".ecwid-productBrowser-details-outOfStockLabel")).map(function(i){i.textContent = 'Price On Request';});
    } else if (page.type === "CATEGORY") {
      [].slice.apply(document.querySelectorAll(".ecwid-BuyNow-outOfStockLabel")).map(function(i){i.textContent = 'Price On Request';});
    }
  }
});
I hope this will help!
__________________
Wendy
Ecwid Customer Care Team
Help Center


⬇ Please click Thanks if my reply helped you.
  #13  
Old 05-11-2017, 05:50 PM
Joseph Murawski's Avatar
Joseph Murawski Joseph Murawski is offline
 
Join Date: Apr 2016
Posts: 3
Default

No, did not work... but see this error in inspector. Perhaps scripts are being blocked using Google functions in the cloud?:
Quote:
Thu May 11 12:36:33 GMT-500 2017 ru.cdev.gwt.client.Log
SEVERE: Can't call OnPageLoadcom.google.gwt.core.client.JavaScriptExc eption: (TypeError) : $ is not a function
ru.cdev.xnext.frontend.Main-0.js:7613:11334
  #14  
Old 05-11-2017, 06:00 PM
Joseph Murawski's Avatar
Joseph Murawski Joseph Murawski is offline
 
Join Date: Apr 2016
Posts: 3
Default

Okay, i got 1/2 working. However, we had blocked the pricing from appearing if it was entered as $0.00 . It now ways price on request but the ZERO amount is now showing

This script is not working;
Quote:
<script>
Ecwid.OnPageLoad.add(function (page) { "use strict"; if (page.type === "PRODUCT" || page.type === "CATEGORY") { var prices = $(".ecwid-productBrowser-price"); prices.each(function () { if ($(this).text().indexOf("0.00") === 1) { $(this).hide(); } }); } });
</script>
  #15  
Old 07-10-2017, 07:04 PM
Una Q's Avatar
Una Q Una Q is offline
Ecwid Team
 
Join Date: Nov 2016
Posts: 151
Default

Quote:
Originally Posted by Joseph Murawski View Post
Okay, i got 1/2 working. However, we had blocked the pricing from appearing if it was entered as $0.00 . It now ways price on request but the ZERO amount is now showing

This script is not working;
Hello,

Una here, Ecwid Customer Care team. I’m extremely sorry for the delayed answer! Please accept my sincere apologies!

In order to hide zero prices, please try to use this script instead of the script you posted above:

Code:
Ecwid.OnPageLoaded.add(function(page) {
    if (page.type === 'PRODUCT' || page.type === 'CATEGORY') {
        [].slice.apply(document.querySelectorAll('.ecwid-productBrowser-price')).map(function(i) {
            var price = i.textContent;
            if (price.indexOf('0.00') === 1) {
                i.style.display = 'none';
            }
        });
    }    
});
I hope it will fix the issue! If any further questions arise, please feel free to ask. We will be glad to answer and help.

Best regards,
Una Q.,
Ecwid Support Team
 
The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.

Tags
category, category id, script issues, script tag

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:11 AM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.