Hi, I'm creating a shoping cart and I'm using DCAJAXPaypalCart but the data is not added for every spoc class I find.
DCAJAXPaypalCart Here's where the shoping cart example is
$(function () {
var cart = $('#cart').DCAJAXPaypalCart({
width: 800,
openNewCheckOutWindow: true,
//themeColor:'#333',
//themeDarkColor:'#FFF',
header: 'AJAX Cart Demo',
footer: 'We accpet paypal, visa and master card. (This is a customizable footer)',
paypalOptions: {
business: '[email protected]',
}
});
$('.spoc').each(function (index, element) {
alert($(this).attr('data-id') + " " + $(this).attr('data-name') + " " + $(this).attr('data-price') + " " + $(this).attr('data-image'));
cart.addBuyButton('#' + $(this).attr('data-id'), {
id: $(this).attr('data-id'),
name: $(this).attr('data-name'), // Item name appear on the cart
thumbnail: 'imgs/llantas_menu/' + $(this).attr('data-image'), // Thumbnail path of the item (Optional)
price: $(this).attr('data-price') // Cost of the item
// Shipping cost for the item (Optional)
});
return cart;
});
});