19/10/2012, 14:33
|
| | Fecha de Ingreso: marzo-2012
Mensajes: 2
Antigüedad: 12 años, 8 meses Puntos: 0 | |
Respuesta: Tabla con datos de simpleCart (javascript) Men debes colocar "table" en el parametro cartStyle! aqui esta como yo lo estoy tratando de usa y me funciona, pero yo quiero poder agragarle un codigo de producto, porque mi tienda es dinamica no estatica, por lo tanto los producto ya tiene sus codigos, y no encuentro la clase para que me tome ese codigo.... -.-'
Código:
<script>
simpleCart({
// array representing the format and columns of the cart, see
// the cart columns documentation
cartColumns: [
{ attr: "name" , label: "Nombre" } ,
{ attr: "price" , label: "Precio", view: 'currency' } ,
{ view: "decrement" , label: false , text: "-" } ,
{ attr: "quantity" , label: "N°" } ,
{ view: "increment" , label: false , text: "+" } ,
{ attr: "total" , label: "SubTotal", view: 'currency' } ,
{ view: "remove" , text: "x" , label: false }
],
// "div" or "table" - builds the cart as a table or collection of divs
cartStyle: "table",
// how simpleCart should checkout, see the checkout reference for more info
checkout: {
type: "SendForm" ,
url:"http://localhost/pedidos/2.php?control=maestro_pedido&comprar=1",
// http method for form, "POST" or "GET", default is "POST"
method: "POST" ,
success: "2.php" ,
// url to return to on cancelled checkout, default is null
cancel: "index.php" ,
},
// set the currency, see the currency reference for more info
currency: "BSF",
// collection of arbitrary data you may want to store with the cart,
// such as customer info
data: {},
// set the cart langauge (may be used for checkout)
language: "english-us",
// array of item fields that will not be sent to checkout
excludeFromCheckout: [],
// custom function to add shipping cost
shippingCustom: null,
// flat rate shipping option
shippingFlatRate: 0,
// added shipping based on this value multiplied by the cart quantity
shippingQuantityRate: 0,
// added shipping based on this value multiplied by the cart subtotal
shippingTotalRate: 0,
// tax rate applied to cart subtotal
taxRate: 9,
// true if tax should be applied to shipping
taxShipping: true,
// event callbacks
beforeAdd : null,
afterAdd : null,
load : null,
beforeSave : null,
afterSave : null,
update : null,
ready : null,
checkoutSuccess : null,
checkoutFail : null,
beforeCheckout : null
});
</script>
|