是否可以一次将多个产品添加到购物车? [英] is it possible to add multiple products to cart at once?

查看:125
本文介绍了是否可以一次将多个产品添加到购物车?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


      我需要在单个按钮单击中添加多个产品到购物车而不循环。是否存在接受产品集合的API或商业查询?


问候,


Kumudha.D

解决方案

您好,


您通常会将LineItem对象添加到LineItemCollection中。   LineItem有一个Quantity成员。


如果您想添加多个产品,UI中通常没有问题可以一键添加多个行项目。


不确定你对代码中的循环有什么。


但是以另一种方式回答你的问题,商务服务器没有OOB方式来处理一组产品作为必须立即购买的捆绑包,但正如我们上面提到的,在UI中实现这一点并不困难。


 


 


Hi,

       I would require to add multiple products to cart in single button click without looping. Is there an API or commerce query which accepts collection of products?

Regards,

Kumudha.D

解决方案

Hi,

You normally add a LineItem object to the LineItemCollection.  The LineItem has a Quantity member.

There would normally be no problem in the UI to add multiple Line Items in one click if you wanted to add multiple products.

Not sure what you have against a loop in code.

But to answer your question another way, there is no OOB way with Commerce Server to treat a group of products as a bundle that must be bought at once, however as we mentioned above it is not difficult to implement this in the UI.

 

 


这篇关于是否可以一次将多个产品添加到购物车?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆