wojodesign / simplecart-js

A simple javascript shopping cart that easily integrates with your current website.
simplecartjs.org
1.79k stars 490 forks source link

How do I add an item number? #199

Open brakai295 opened 12 years ago

brakai295 commented 12 years ago

I'm trying to add a unique item number to each item in the cart using PayPal's "item_number" variable.

I'm I correct that I can't do this with simplecart? If I specify an item number with a hidden input like so:

<input type="hidden" class="item_number" value="12345" />

...it thinks it's just another option and adds it to the list of options.

How can I assign a unique ID or number to each item that is trackable within PayPal's set of variables?

sunylyons commented 12 years ago

brakai295, did you ever sort this out? i'm trying all sorts of things with the same results.

drewhamlett commented 11 years ago

Any updated on this?

kamgan commented 9 years ago

1) You must add attribute in SimpleCart. / { attr: "number"}, 2) Add <input class="item_number" value="12345" disabled /> in your product panel. But, dont use type="hidden".If you use, number doesnt add in localStorage. 3) You can solve this as add to css settings.For example you can add .item_number{opacity:0;} 4) If you want to show item_number in Cart Columns, you must add label in attibute. / {attr:"number", label: "Product Number"}

Note:When checkout; Paypal show is= Options: number: 12345. It doesnt change paypal item number.