简体   繁体   English

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

[英]How to Add product options with Prices to CodeIgniter Cart

Does anyone know how to add options to products on a CodeIgniter based ecommerce system. 有谁知道如何在基于CodeIgniter的电子商务系统上向产品添加选项。 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 我希望能够为产品选项1添加价格。基本产品-> $ 10将产品添加为特色商品->添加$ 5将此产品包括在月报中->添加$ 5

cart Total = 10 + 5 + 5 => $20 if both options are created. 如果同时创建了两个选项,则购物车总计= 10 + 5 + 5 => $ 20。

Please let me know if anyone has tackled this issue and can help me out. 请让我知道是否有人解决了这个问题并可以帮助我。

i use codeigniter for e-commerce and its awesome. 我将codeigniter用于电子商务及其出色的功能。 that said i would urge you to not use the ci cart class. 那就是说我敦促您不要使用ci cart类。

otherwise would suggest that there is a product SKU or ID, and then separate SKUs for the different options. 否则,建议您提供一个产品SKU或ID,然后为不同的选项分别设置SKU。 if the price is different, or if its a different physical product then it should have its own SKU. 如果价格不同,或者其物理产品不同,则应具有自己的SKU。

for example many e-commerce demos show a T-shirt, and the colors of the t-shirt as 'options'. 例如,许多电子商务演示都显示了一件T恤,而T恤的颜色则是“选项”。 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. 但实际上,每种颜色的T恤衫都是其自身的实物产品-必须跟踪其自身的库存,以便您知道可以出售哪些颜色。

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. 如果它是“虚拟”产品,那么就没有库存-但是,如果长期来看价格不同,则为不同的选择提供单独的SKU会容易得多。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Codeigniter购物车类-产品选项的额外价格 - Codeigniter Cart Class - additional price for product options 如何将自定义产品添加到magento购物车-请说明这些选项 - How to add a custom product to magento cart - Please explain these options 马杰托。 如何使用自定义选项以编程方式在购物车中添加简单产品 - Magento. How to add simple product in cart programmatically with custom options 如何以编程方式将带有自定义选项的产品添加到Magento中的购物车? - How to programmatically add a product with custom options to cart in Magento? 有条件地删除购物车中的按钮并隐藏产品类别的价格 - Conditionally removing add-to-cart button and hiding prices for product categories 在购物车中添加和删除产品选项 - add and remove product options in shopping cart Magento 2使用自定义选项以编程方式将产品添加到购物车 - Magento 2 add product to cart programmatically with custom options 在购物车Codeigniter中添加并显示列表产品 - Add and show list product in cart codeigniter 如何在Prestashop中添加基于数量的产品价格? - How to add quantity based product prices in Prestashop? Codeigniter - 如果选项不同,请添加具有相同ID的产品 - Codeigniter - Add a product with the same ID if options are different
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM