Hey all,
What does the != in the follwing function mean.
And the += and &on0= and escape in this one?
Here is the entire function
If you know one or any of these please reply. Thanks
Echo
What does the != in the follwing function mean.
Code:
if (item_id != ' ') {
And the += and &on0= and escape in this one?
Code:
cartUrl += '&on0=' + escape("Size");
Here is the entire function
Code:
function addToCart (qty,item_id,name,price,size,color,shipping,shipping2) {
var cartUrl = paypal_url
+ 'add=1'
+ '&business=' + escape(business)
+ '¤cy_code=' + escape(currencyCode)
+ '&amount=' + escape(price);
if (item_id != '') {
cartUrl += '&item_number=' + escape(item_id);
}
if (name != '') {
cartUrl += '&item_name=' + escape(name);
}
if (size != '') {
cartUrl += '&on0=' + escape("Size");
cartUrl += '&os0=' + escape(size);
}
if (color != '') {
cartUrl += '&on1=' + escape("Color");
cartUrl += '&os1=' + escape(color);
}
if (qty != '' && qty != 0) {
cartUrl += '&quantity=' + escape(qty);
cartUrl += '&undefined_quantity=1';
}
if (shipping != '') {
cartUrl += '&shipping=' + escape(shipping);
}
if (shipping2 != '') {
cartUrl += '&shipping2=' + escape(shipping2);
}
openCartWin(cartUrl);
}
If you know one or any of these please reply. Thanks
Echo