0
私はItemsKeyMapping.jsで、顧客が製品に保存する割合を計算しようとしています。私はjavascriptには新しく、チュートリアルを使用しています。これは私が持っているものです:Netsuite Suitecommerceの価格水準から割引を計算する
// @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
こんにちはトニー、SCAには膨大な量のコードがあります。何が助けになるでしょうか? このファイルは、バックエンドに、項目レコードのオンライン顧客価格と価格レベル15の値を与えるように指示しています。ここで、テキストフィールドに情報を要求する別のコールの例である:関数(アイテム) \t \t \t { \t: '// @propertyは、ウェブストアの記述フィールドにHTML \t \t、\t _StoreDescriptionをつかむ_StoreDescription \t \t \t返品item.get( 'storedescription') \t \t \t} –