magento 可配置的产品行为

发布于 2024-09-14 17:44:12 字数 429 浏览 2 评论 0原文

不幸的是,我的 magento 自定义开发遇到以下问题。场景是客户希望使用涉及乘法的特定公式来计算可配置产品的价格,而 magento 只有求和。 例如,属性之一是“材料”,另一个属性是出现次数,因此必须将这两个属性相乘。

我通过为每种可能的组合编写新产品的脚本来进行编程和创建,并将它们分配给可配置的。但是当我最后“添加到购物车”时,我得到的价格不是最终产品的价格,而是magento计算的价格。

有人遇到过类似的情况吗?有什么可能的解决方案吗?

因为我可能太抽象了,所以我也会写我的用法示例:

商店是卖珠宝的。

属性:石头材质

属性:石头数量

价格:基础价值+(石头数量) x(石材价格)

I am having the following issue with my magento, custom unfortunately, development. The scenario is that the client wants the price of a configurable product to be calculated using a specific formula that involves multiplications, while magento has only sums.
for example one of the attributes is "material" and the other one is number of occurrences so these two have to be multiplied.

I have programmed and created through scripting new products for every possible combination and assigned them to a configurable. But when I go to "add to cart" at the end the price that I have is not the one of the final product, but the one magento calculates.

Has any one been across a similar scenario? Any possible solutions?

Because I might have been to abstract, I will also write my usage example:

The store is about selling jewellery.

Attribute: stone material

Attribute: number of stones

Price: Base Value + (number of stones)x(price of stone material)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

活雷疯 2024-09-21 17:44:12

我强烈怀疑您在商品进入购物车时更改了价格。是这样吗? Magento 出于某种可能合理但同样令人恼火的原因,将在每次页面加载时重新计算商品的价格。

这意味着,您必须有效地更改实施方式,以便根据您的需要修改产品的内部价格计算,否则价格将永远不会固定。

希望有帮助。

谢谢!

I have a strong suspicion that you are changing the price as the item goes into the cart. Is that right? Magento, for some reason which is probably justifiable but not less irritating, will recalculate the price of the item on every page load.

This means that, effectively, you must change the implementation so that the product's internal price calculation is modified to your needs, or the price will never stick.

Hope that helps.

Thanks!
Joe

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文