Commit b668e82e by David Muzi

Merge pull request #107 from poisonedslo/master

BUYLineItem didn't have a productId when initialized with BUYVariant
parents d0abeb12 64e1c656
......@@ -28,6 +28,7 @@
#import "BUYProductVariant.h"
#import "NSDecimalNumber+BUYAdditions.h"
#import "NSString+Trim.h"
#import "BUYProduct.h"
@interface BUYLineItem ()
......@@ -54,6 +55,7 @@
self = [super init];
if (self) {
self.variantId = variant.identifier;
self.productId = variant.product.productId;
self.quantity = variant ? [NSDecimalNumber one] : [NSDecimalNumber zero];
self.price = variant ? [variant price] : [NSDecimalNumber zero];
self.title = variant ? [variant title] : @"";
......
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