Take a look at the effect chart first.
This plug-in uses the new special effects of HTML5: storage, is the function of the browser database, this with the data in the cookie inside the principle is met, the advantage is that users refresh the page, the data is still, and do not need to interact with the backend data.
Create_storage_cart:function () {
for (var t = this, E = T.storage_get (), a = 0, n = e.items.length; n > A; a++) {
var i = e.items[a].id,
R = E.items[a].name,
s = E.items[a].price,
c = e.items[a].input;
T.cart.append (' <li class= "animated ' + t.settings.animation + '" data-id= ' + i + "><span class=" + T.settings.car T + "-name>" + R + "</span><span class=" + T.settings.cart + "-price>" + S + ' </span><input type= ' Number "min=" 1 "value=" ' + C + ' "class= ' + T.settings.cart +"-input><button class= "+ T.settings.cart +"-REMOVE&G T;x</button></li> ")
}
},
Need to be compatible with the old version of the browser, you need to modify the above. The following is the configuration file for the plug-in
s = {
Currency: "$",
Currency_after_number: "false",
Permanent_cart_buttons: "false",
Display_total_value: "True",
Permanent_total_value: "false",
Animation: "FadeIn",
Empty_disable: "false",
Empty_text: "Your cart is empty",
PayPal: {
Business: "office@createit.pl",
Currency_code: "USD",
LC: "EN",
Cpp_cart_border_color: "",
Cpp_payflow_color: "",
No_note: "0",
No_shipping: "0",
"Return": "",
Cancel_return: ""
},
lang:{//My new attributes are mainly used to support multiple languages
Clear: ' Empty ',
Checked: ' Settlement '
},
};
Instantiation of
$ (' body '). Ctshop ({
Currency: ' $ ',
PayPal: {
Currency_code: ' RMB '
},
Empty_text: ' You dare to believe, your shopping cart incredibly is empty! ',
});
It's very simple.