如何将带有价格的产品选项添加到CodeIgniter购物车

Does anyone know how to add options to products on a CodeIgniter based ecommerce system. I want to be able to add a price to the product option 1. Basic Product --> $10 Add this product as a featured listing --> Add $5 Include this product in monthly newsletter --> Add $5

cart Total = 10 + 5 + 5 => $20 if both options are created.

Please let me know if anyone has tackled this issue and can help me out.

i use codeigniter for e-commerce and its awesome. that said i would urge you to not use the ci cart class.

otherwise would suggest that there is a product SKU or ID, and then separate SKUs for the different options. if the price is different, or if its a different physical product then it should have its own SKU.

for example many e-commerce demos show a T-shirt, and the colors of the t-shirt as 'options'. but in reality each color of t-shirt is its own physical product -- with its own inventory that has to be tracked so you know which colors can be offered for sale.

if its a 'virtual' product then there is no inventory - but if the price is different in the long run it will be much easier to have separate SKUs for the different options.