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
  #1  
Old 12-11-2012, 07:07 PM
mendocinotim's Avatar
mendocinotim is offline
Junior Member
 
Join Date: Apr 2010
Posts: 17
Default

Display a message when an option is selected by a customer?


Please have a look at this screenshot..


With this product, the customer chooses between two options.
In one case, for $30 more, they can have me ship them our complete library on a 64GB USB Flash Drive (that we provide). While in the other case, they must send us a storage unit for us to load the library on to - and in this case I wanted a way to display a message; preferably that would open beneath the options drop-down.

The message would say something like - "We must receive this from you before we can ship your order".

Is there a way to accomplish this please?
  #2  
Old 12-13-2012, 01:30 PM
Maya's Avatar
Maya Maya is offline
Ecwid Team
 
Join Date: Feb 2010
Location: Ecwid headquarter
Posts: 5,876
Default

Yes, sure.

It is possible using following script:
Code:
Ecwid.OnPageLoaded.add(function(page){
      if ((page.type == "PRODUCT") && (page.productId == 18098611)) {
          $("select.ecwid-productBrowser-details-optionSelectBox").change(function(){              
           var select_val = $("select.ecwid-productBrowser-details-optionSelectBox").val();   
            if (select_val =="a 60GB (or greater) USB device that I will send to you")  {
              $(".ecwid-productBrowser-details-optionsPanel").append("<div class='note'>We must receive this from you before we can ship your order</div>");
            } else {
                $("div.note").remove();
            };
       });                         
    };    
})​
This script will work for this product only: http://swing-thing.com/store/#!/~/pr...73&id=18098611. However, you can change it as you needed.

Please, refer to this page for example: http://jsfiddle.net/RnL9B/

If any questions will appear, please, feel free to ask.
__________________
Maya N., Ecwid Team

------------------
Welcome to our new Help Center!
  #3  
Old 12-13-2012, 08:05 PM
mendocinotim's Avatar
mendocinotim mendocinotim is offline
Junior Member
 
Join Date: Apr 2010
Posts: 17
Default

Maya,

Please see the following screen capture movie (about 5min), where I will show you that even after correcting the problem where some ascii chars in the JS you sent me were being converted into special chars by the WP editor, the code is still not producing the desired results.

In the movie, I also discuss the other JS code you sent me, per this other forum topic..
http://www.ecwid.com/forums/showthread.php?t=16791
Here's the movie link..

http://www.screencast.com/t/LKT5A9fO8kRQ
  #4  
Old 12-13-2012, 08:14 PM
mendocinotim's Avatar
mendocinotim mendocinotim is offline
Junior Member
 
Join Date: Apr 2010
Posts: 17
Default

PS..

I just installed the "Raw HTML Capability" plugin, and tried it with that one instead.
Same result.. It's not working still.
  #5  
Old 12-14-2012, 10:50 AM
Maya's Avatar
Maya Maya is offline
Ecwid Team
 
Join Date: Feb 2010
Location: Ecwid headquarter
Posts: 5,876
Default

Quote:
Originally Posted by mendocinotim View Post
PS..

I just installed the "Raw HTML Capability" plugin, and tried it with that one instead.
Same result.. It's not working still.
Thank you for the screencast.

I'm sorry for this, but I wasn't able to check it on your live store to make sure that is work properly. I have merged two scripts into one and they work properly here: http://jsfiddle.net/7RD2y/

Please, try to place following script instead of previos ones on the source page of your site after Ecwid integration code:
Code:
<script type="text/javascript">
Ecwid.OnPageLoaded.add(function(page){
    if ((page.type == "CATEGORY") || (page.type == "CART")) {
        $("div.ecwid-productBrowser-price").each(function(){
            if ($(this).text() == "$0.00") {
            $(this).text("Free Item");
        }
        });       
    };
      if (page.type == "PRODUCT" && $("div.ecwid-productBrowser-price").text() == "$0.00") { 
            $("div.ecwid-productBrowser-price").text("Free Item");             
    } else if ((page.type == "PRODUCT") && (page.productId == 18098611)) {
         $("select.ecwid-productBrowser-details-optionSelectBox").change(function(){              
          var select_val = $("select.ecwid-productBrowser-details-optionSelectBox").val();   
           if (select_val =="a 60GB (or greater) USB device that I will send to you")  {
             $(".ecwid-productBrowser-details-optionsPanel").append("<div class='note'>We must receive this from you before we can ship your order</div>");
           } else {
               $("div.note").remove();
           };
      });                         
   };  
})​
</script>
Hopefully, it solve the problem. Please, try and let me know about results.
__________________
Maya N., Ecwid Team

------------------
Welcome to our new Help Center!
  #6  
Old 12-14-2012, 06:30 PM
mendocinotim's Avatar
mendocinotim mendocinotim is offline
Junior Member
 
Join Date: Apr 2010
Posts: 17
Default Still not working..

Maya,

Thanks, but even with the new code you sent, it still does't work.
Here's the code as I have it now..



After replacing the code, I again tested it - with the same result.
I will see if I can figure out how to send you a private message from this forum, and will give you an admin login so you can look a little deeper.
  #7  
Old 12-14-2012, 06:38 PM
mendocinotim's Avatar
mendocinotim mendocinotim is offline
Junior Member
 
Join Date: Apr 2010
Posts: 17
Default

I just sent a test Private Message to you - please reply to it, and I will then send you the login information.

Thanks.
-Tim
  #8  
Old 12-18-2012, 09:51 AM
Maya's Avatar
Maya Maya is offline
Ecwid Team
 
Join Date: Feb 2010
Location: Ecwid headquarter
Posts: 5,876
Default

Quote:
Originally Posted by mendocinotim View Post
I just sent a test Private Message to you - please reply to it, and I will then send you the login information.

Thanks.
-Tim
Thank you for your login information.

I have made some changes with my script, which can cause the problem. Th reason, why script is not working on your site is the conflict between the script and one of your Wordpress plugin. In order to detect which plugin cause the problem, I suggest you to switch off all plugins on your site, except Ecwid shopping cart and "Raw HTML" plugins.

Once you do this, you will be able to see that script work properly. After that you should enable plugins one by one and check which causes the problem.

Unfortunately, I am not able to detect this plugin as it is required to change settings of your site. Please, try and let me know about results.
__________________
Maya N., Ecwid Team

------------------
Welcome to our new Help Center!
  #9  
Old 12-18-2012, 07:05 PM
mendocinotim's Avatar
mendocinotim mendocinotim is offline
Junior Member
 
Join Date: Apr 2010
Posts: 17
Thumbs up

Quote:
Originally Posted by Maya View Post
Thank you for your login information.

I have made some changes with my script, which can cause the problem. Th reason, why script is not working on your site is the conflict between the script and one of your Wordpress plugin. In order to detect which plugin cause the problem, I suggest you to switch off all plugins on your site, except Ecwid shopping cart and "Raw HTML" plugins.

Once you do this, you will be able to see that script work properly. After that you should enable plugins one by one and check which causes the problem.

Unfortunately, I am not able to detect this plugin as it is required to change settings of your site. Please, try and let me know about results.
Maya,

Ahhh, yes!
The plugin causing the problem was "PTM AJAX Comments" by Peter Michael.

I've disabled that one, and as you thought 'it's now working fine.
I'll see if I can find a replacement AJAX-based user comments plugin to replace it with.

Many thanks for all your kind help on this.
And Merry Christmas!
 
The information in this thread might be outdated
If the solution did not help, please, check our Help Portal or contact Ecwid Team.

Tags
message, option

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 05:58 AM.
Powered by vBulletin® Version 3.8.11. Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.