Commit d1ac4d19 by lee

u show price

parent 27c1d371
...@@ -44,9 +44,12 @@ ...@@ -44,9 +44,12 @@
NSArray *variantsArray = product.variantsArray; NSArray *variantsArray = product.variantsArray;
if(variantsArray && variantsArray.count > 0){ if(variantsArray && variantsArray.count > 0){
BUYProductVariant *variant = variantsArray.firstObject; BUYProductVariant *variant = variantsArray.firstObject;
self.lbPrice.text = [KWMStringUtil price:variant.price]; // self.lbPrice.text = [KWMStringUtil price:variant.price];
self.lbSinglePrice.text = [KWMStringUtil price:variant.price]; // self.lbSinglePrice.text = [KWMStringUtil price:variant.price];
self.lbCompareAtPrice.text = [KWMStringUtil price:variant.compareAtPrice]; // self.lbCompareAtPrice.text = [KWMStringUtil price:variant.compareAtPrice];
self.lbPrice.text = variant.price.priceValueFormatted;
self.lbSinglePrice.text = variant.price.priceValueFormatted;
self.lbCompareAtPrice.text = variant.compareAtPrice.priceValueFormatted;
} }
NSString *imageUrl = [KWMImageUtil getProductImageUrl:product ImageSize:SmallImage]; NSString *imageUrl = [KWMImageUtil getProductImageUrl:product ImageSize:SmallImage];
......
...@@ -64,7 +64,8 @@ ...@@ -64,7 +64,8 @@
self.lbName.text = product.title; self.lbName.text = product.title;
if(product.variantsArray.count>0){ if(product.variantsArray.count>0){
BUYProductVariant *variant = product.variantsArray.firstObject; BUYProductVariant *variant = product.variantsArray.firstObject;
self.lbPrice.text = [KWMStringUtil price:variant.price]; // self.lbPrice.text = [KWMStringUtil price:variant.price];
self.lbPrice.text = variant.price.priceValueFormatted;
} }
} }
} }
......
...@@ -254,6 +254,8 @@ ...@@ -254,6 +254,8 @@
}else{ }else{
// price += [model.price.priceValue decimalNumberByMultiplyingBy:[NSDecimalNumber decimalNumberWithString:@(model.quantity).stringValue]].integerValue; // price += [model.price.priceValue decimalNumberByMultiplyingBy:[NSDecimalNumber decimalNumberWithString:@(model.quantity).stringValue]].integerValue;
total = [total decimalNumberByAdding:[model.price.priceValue decimalNumberByMultiplyingBy:[NSDecimalNumber decimalNumberWithString:@(model.quantity).stringValue]]]; total = [total decimalNumberByAdding:[model.price.priceValue decimalNumberByMultiplyingBy:[NSDecimalNumber decimalNumberWithString:@(model.quantity).stringValue]]];
// FIXME: 这里要bug
total = [total decimalNumberByAdding:nil];
} }
} }
// _lbTotalPrice.text = [NSString stringWithFormat: @"¥%@",[KWMStringUtil getEUR2CNYstring:@(price)]]; // _lbTotalPrice.text = [NSString stringWithFormat: @"¥%@",[KWMStringUtil getEUR2CNYstring:@(price)]];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment