The JQueryClone template is used to display product information. You can modify the td in the template to determine how many items are displayed in each row. The product information is simulated using JSON data.
If you click the same product multiple times, you will not add it again. Instead, the number of existing products is + 1,
You can also manually enter the number of items. If you enter 0, the item will be automatically deleted from the shopping cart (when you click the minus sign to less than 1, the system will also prompt whether to delete the item information from the shopping cart)
The price and total price of each product are calculated dynamically based on the addition and deletion operations.
Download link:/201112/yuanma/jquery_gouwuche.rar
All basic functions have been implemented. We recommend that you use IE to run it. Other browsers are not tested.
HTML code:
The Code is as follows:
Untitled document
Item List
No.: 000001
Name: aa
Price: 2.5
Description: aaaaa
|
No.: 000001
Name: aa
Price: 2.5
Description: aaaaa
|
No.: 000001
Name: aa
Price: 2.5
Description: aaaaa
|
No.: 000001
Name: aa
Price: 2.5
Description: aaaaa
|
Shopping Cart
| Serial number |
No. |
Name |
Description |
Quantity |
Unit Price |
Total price |
Delete |
| 1 |
000001 |
Aa |
Aaaaa |
|
0 |
0 |
|
JS Code
The Code is as follows: