Commit 69a0e283 by Rune Madsen

Merge pull request #53 from Shopify/runmad.improve-default-variant-logic

Improved check for default variant
parents 3bab1816 5e02ed4c
......@@ -71,7 +71,11 @@
{
if ([self.variants count] == 1) {
BUYProductVariant *productVariant = [self.variants firstObject];
if ([productVariant.title isEqualToString:@"Default Title"]) {
BUYOptionValue *optionValue = [productVariant.options firstObject];
NSString *defaultTitleString = @"Default Title";
NSString *defaultString = @"Default";
if ([productVariant.title isEqualToString:defaultTitleString] &&
([optionValue.value isEqualToString:defaultTitleString] || [optionValue.value isEqualToString:defaultString])) {
return YES;
}
}
......
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