Display the price in the webstore based on the customers subsidiary. If the customers subsidiary is “OX Tools USA” then display the price level “US 50% OFF” in SB webstore. Other vice, the default behavior should work
Dev code
getPrice: function getPrice (quantity, selected_matrix_children)
{
selected_matrix_children = selected_matrix_children || (this.get('_matrixChilds') ? this.get('_matrixChilds').models : []);
quantity = quantity || 1;
var isPromotionItems=this.get('custitem_on_promotion');
var details_object = this.get('_priceDetails') || {};
var profile = ProfileModel.getInstance();
var subsidiary = profile.get('subsidiary');
console.log('this',this);
console.log("detailobject",details_object)
if (subsidiary == "2") {var price=this.get('pricelevel37')
, price_formatted=this.get('pricelevel37_formatted')
, result={};
if(price && price_formatted)
{
result.onlinecustomerprice=price;
result.onlinecustomerprice_formatted=price_formatted;
details_object=result
this.set('_priceDetails',result)
}
}