Subversion Repositories SmartDukaan

Rev

Rev 2810 | Rev 2921 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2810 Rev 2811
Line 25... Line 25...
25
	
25
	
26
$(function() {
26
$(function() {
27
	  $('.add-to-cart-icon').live('click', function() {
27
	  $('.add-to-cart-icon').live('click', function() {
28
	    var items = this.id;
28
	    var items = this.id;
29
	    var itemsarray = items.split('-');
29
	    var itemsarray = items.split('-');
30
	    var catalogid = $(this).attr('catalogid');
-
 
31
	    addToCart(itemsarray[1], itemsarray[0], catalogid);
30
	    addToCart(itemsarray[1], itemsarray[0]);
32
	    return false;
31
	    return false;
33
	  });
32
	  });
34
	  
33
	  
35
	$("a.addtocart").live('click', function() {
34
	$("a.addtocart").live('click', function() {
36
		var catalogid = $(this).attr('catalogid');
35
		var catalogid = $(this).attr('catalogid');
Line 56... Line 55...
56
	
55
	
57
});
56
});
58
 
57
 
59
 
58
 
60
 
59
 
61
function addToCart(refdivid,reqtype, catalogid){
60
function addToCart(refdivid,reqtype){
62
     var seldata="";
61
     var seldata="";
63
     var tot=0;
62
     var tot=0;
64
     var saprt="";
63
     var saprt="";
65
     if(reqtype == "multi"){
64
     if(reqtype == "multi"){
66
          var containerdiv = "#" + refdivid;
65
          var containerdiv = "#" + refdivid;
Line 117... Line 116...
117
 
116
 
118
function selectColor(){
117
function selectColor(){
119
	var selected = $(".colorSelLightBoxColor .content input[name='radColorSel']:checked");
118
	var selected = $(".colorSelLightBoxColor .content input[name='radColorSel']:checked");
120
	var itemid = selected.val();
119
	var itemid = selected.val();
121
	
120
	
122
	var catalogid = $(".colorSelLightBoxColor .content #selected_catalog_id").val();
-
 
123
	trackEventWithGA('Order', 'Select Product Color', itemid);
121
	trackEventWithGA('Order', 'Select Product Color', itemid);
124
	
122
	
125
	if(itemid == undefined)	{
123
	if(itemid == undefined)	{
126
		alert('Please select a color.');
124
		alert('Please select a color.');
127
	} else	{
125
	} else	{
128
		addToCart(itemid,'list', catalogid);
126
		addToCart(itemid,'list');
129
	}
127
	}
130
}
128
}
131
 
129
 
132
 
130
 
133
function displayRelatedProducts(message){
131
function displayRelatedProducts(message){