Hi, I did a custom php rule with javascipt like this to open the shopping cart on "add to cart" click.

This code works and opens a window:

 drupal_set_message('<script type="text/javascript">window.open ("/cart","mywindow","menubar=1,resizable=1,width=350,height=250");</script>','js-message'); 

But i wat to open the cart in a colorbox with this code:

 drupal_set_message('<script type="text/javascript">
(function ($) {

$(document).ready(function(){
    $.fn.colorbox({href:'/cart', open:true, iframe:true, width:817, height:500,overlayClose: false, escKey:false}
    );
}); 
}(jQuery));
</script>','js-message'); 

Whats wrong?
Is the a other way to get same results maybe without rules??

Comments

frjo’s picture

Category: task » support
Priority: Major » Normal
frjo’s picture

Issue summary: View changes
Status: Active » Closed (outdated)