Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
shopify_iossdk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cemarose
shopify_iossdk
Commits
69a0e283
Commit
69a0e283
authored
Nov 09, 2015
by
Rune Madsen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #53 from Shopify/runmad.improve-default-variant-logic
Improved check for default variant
parents
3bab1816
5e02ed4c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
BUYProduct+Options.m
Mobile Buy SDK/Mobile Buy SDK/Utils/BUYProduct+Options.m
+5
-1
No files found.
Mobile Buy SDK/Mobile Buy SDK/Utils/BUYProduct+Options.m
View file @
69a0e283
...
@@ -71,7 +71,11 @@
...
@@ -71,7 +71,11 @@
{
{
if
([
self
.
variants
count
]
==
1
)
{
if
([
self
.
variants
count
]
==
1
)
{
BUYProductVariant
*
productVariant
=
[
self
.
variants
firstObject
];
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
;
return
YES
;
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment