一次添加多个产品并为所有产品分配属性
我发誓这可能是有史以来最复杂的 magento 购物车。但这是客户的要求。
我们正在创建一个网络应用程序,允许客户输入一些字母。这些字母出现在图片中,就好像它是一个标志一样。
每个词代表一个产品。单词的大小会改变定价。定制者还可以在图片中添加徽标,这也是价格
说完之后,产品将被发送到购物车。
我的问题是,字母是具有属性(小、中、大装饰颜色)的产品,而徽标具有属性(小、中、大、装饰颜色)。如果每个字母都可以有自己的尺寸、颜色和装饰以及徽标。我该如何立即将所有这些发送到购物车。
我认为如果我能弄清楚如何在一次调用中发送多个产品及其属性,将对我有所帮助。
I swear this probably might the most complicated magento cart ever. But this is what the client request.
We are creating a web application that allows the customer to type in some letters. These letters appear on in a picture as if it was a sign.
Each word represents a products. The size of the word changes pricing. Also the custom can add a logo to the picture as well which are also prices
After its all said and done the product is sent to the shopping cart.
My problem is that the letters are products with attributes (small, medium, large trim color) and the logo's have attributes (small medium large, trim color). If each letter can have its own size , color and trim as well as the logo's. How am I suppose to send all that to the cart at once.
I think what will help me is if I can figure how to send multiple products and their attributes all in a single call.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
听起来使用起来很混乱:/
根据有多少不同的基础产品,您可能可以主要使用产品选项来完成此操作,这会降低一些复杂性。否则,也许可以将每个选项分成一个简单的产品并将它们作为捆绑包发送?这两种解决方案都将“选择”显示为一行,但枚举了所有选项,并且应该可以在代码中实现。
Sounds confusing to use :/
Depending on how many different base products there are, you might be able to do this mostly with product options, which would reduce some of the complexity. Otherwise, perhaps split each of the options into a simple product and send them as a bundle? Both of those solutions will display the "selection" as a single line but with all the options enumerated, and should be possible in code.