0
我想在我的ItemsKeyMapping.js中创建一个函数,该函数将计算客户将在产品上保存的百分比。我是JavaScript新手,一直在使用教程。这是我有:从Netsuite Suitecommerce Advanced中的价格水平计算折扣
// @property _DiscountPercent calculates the percentage between customers price and MSRP
, _DiscountPercent: function (item)
{
var attributes = item.get('onlinecustomerprice') || ('pricelevel15');
if ((pricelevel15 != 0) && (onlinecustomerprice != 0))
{
DiscountPercent = (1 - pricelevel15/onlinecustomerprice) * 100;
}
else
{
DiscountPercent = null;
}
return 'DiscountPercent';
}
任何人都在那里熟悉与SCA勃朗峰,可以帮助我完成此?谢谢。
你可以发布更多的代码的上下文? – TonyH
嗨,Tony,SCA中有大量的代码。有什么帮助? 该文件告诉后端在物料记录上给出onelnecustomer价格和价格水平15的值。这里是另一个呼叫请求在文本字段中的信息的一个例子: '// @财产_StoreDescription抢在网上商店描述字段的HTML \t \t,\t _StoreDescription:功能(项目) \t \t \t { \t ('storedescription')\t \t \t}' –