简体   繁体   English

magento可配置的产品行为

[英]magento configurable product behaviour

I am having the following issue with my magento, custom unfortunately, development. 我的magento遇到以下问题,不幸的是,自定义开发。 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. 场景是客户希望使用涉及乘法的特定公式来计算可配置产品的价格,而magento仅具有总和。 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. 但是,当我最后去“添加到购物车”时,我拥有的价格不是最终产品之一,而是一个magento计算的价格。

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) 价格 :基本价值+ (宝石数量) x (宝石材料价格)

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. Magento,出于某种可能是合理的但又不失刺激性的原因,将在每次加载页面时重新计算商品的价格。

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

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM