Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
ios1x
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
ios1x
Commits
a203d081
Commit
a203d081
authored
Jun 01, 2017
by
lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
n
parent
ada3f1c7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
KWMShoppingCart.m
iCemarose/Class/Model/KWMShoppingCart.m
+3
-3
No files found.
iCemarose/Class/Model/KWMShoppingCart.m
View file @
a203d081
...
@@ -65,7 +65,7 @@
...
@@ -65,7 +65,7 @@
-
(
void
)
increaseProductWithVariantId
:
(
NSNumber
*
)
variantId
quantity
:
(
NSInteger
)
quantity
callback
:
(
ShoppingCartCallBack
)
callback
{
-
(
void
)
increaseProductWithVariantId
:
(
NSNumber
*
)
variantId
quantity
:
(
NSInteger
)
quantity
callback
:
(
ShoppingCartCallBack
)
callback
{
[[
KWMAPIManager
sharedManager
]
addProductWithVariantId
:
variantId
quantity
:
quantity
success
:^
(
NSURLSessionDataTask
*
task
,
KWMRequestResult
*
result
)
{
[[
KWMAPIManager
sharedManager
]
addProductWithVariantId
:
variantId
quantity
:
quantity
success
:^
(
NSURLSessionDataTask
*
task
,
KWMRequestResult
*
result
)
{
[[
KWMShoppingCart
sharedInstance
]
allItemsWithCallback
:
^
(
NSError
*
error
,
KWMCartResult
*
cart
)
{
[[
KWMShoppingCart
sharedInstance
]
allItemsWithCallback
:
^
(
NSError
*
error
,
KWMCartResult
*
cart
)
{
callback
(
error
,
cart
);
//
callback(error,cart);
}];
}];
}
failure
:^
(
NSURLSessionDataTask
*
task
,
NSError
*
error
)
{
}
failure
:^
(
NSURLSessionDataTask
*
task
,
NSError
*
error
)
{
// callback(error,nil);
// callback(error,nil);
...
@@ -76,7 +76,7 @@
...
@@ -76,7 +76,7 @@
-
(
void
)
changeProductWithVariantId
:
(
NSNumber
*
)
variantId
quantity
:
(
NSInteger
)
quantity
callback
:
(
ShoppingCartCallBack
)
callback
{
-
(
void
)
changeProductWithVariantId
:
(
NSNumber
*
)
variantId
quantity
:
(
NSInteger
)
quantity
callback
:
(
ShoppingCartCallBack
)
callback
{
[[
KWMAPIManager
sharedManager
]
changeProductWithVariantId
:
variantId
quantity
:
quantity
success
:^
(
NSURLSessionDataTask
*
task
,
KWMCartResult
*
result
)
{
[[
KWMAPIManager
sharedManager
]
changeProductWithVariantId
:
variantId
quantity
:
quantity
success
:^
(
NSURLSessionDataTask
*
task
,
KWMCartResult
*
result
)
{
[[
KWMShoppingCart
sharedInstance
]
setResult
:
result
];
[[
KWMShoppingCart
sharedInstance
]
setResult
:
result
];
callback
(
nil
,
result
);
//
callback(nil,result);
}
failure
:^
(
NSURLSessionDataTask
*
task
,
NSError
*
error
)
{
}
failure
:^
(
NSURLSessionDataTask
*
task
,
NSError
*
error
)
{
// callback(error,nil);
// callback(error,nil);
}];
}];
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
-
(
void
)
updateProductWithVariantIds
:
(
NSArray
<
NSNumber
*>
*
)
variantIds
quantitties
:
(
NSArray
<
NSNumber
*>
*
)
quantites
callback
:
(
ShoppingCartCallBack
)
callback
{
-
(
void
)
updateProductWithVariantIds
:
(
NSArray
<
NSNumber
*>
*
)
variantIds
quantitties
:
(
NSArray
<
NSNumber
*>
*
)
quantites
callback
:
(
ShoppingCartCallBack
)
callback
{
[[
KWMAPIManager
sharedManager
]
updateProductWithVariantIds
:
variantIds
quantities
:
quantites
success
:^
(
NSURLSessionDataTask
*
task
,
KWMCartResult
*
result
)
{
[[
KWMAPIManager
sharedManager
]
updateProductWithVariantIds
:
variantIds
quantities
:
quantites
success
:^
(
NSURLSessionDataTask
*
task
,
KWMCartResult
*
result
)
{
[[
KWMShoppingCart
sharedInstance
]
setResult
:
result
];
[[
KWMShoppingCart
sharedInstance
]
setResult
:
result
];
callback
(
nil
,
result
);
//
callback(nil,result);
}
failure
:^
(
NSURLSessionDataTask
*
task
,
NSError
*
error
)
{
}
failure
:^
(
NSURLSessionDataTask
*
task
,
NSError
*
error
)
{
// callback(error,nil);
// callback(error,nil);
}];
}];
...
...
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