|
@@ -367,7 +367,7 @@
|
|
|
-(void) addtocart:(int) count
|
|
-(void) addtocart:(int) count
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
if(self.cqty>0)
|
|
if(self.cqty>0)
|
|
|
{
|
|
{
|
|
|
|
|
|
|
@@ -379,58 +379,199 @@
|
|
|
|
|
|
|
|
UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
|
|
UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
|
|
|
|
|
|
|
|
- dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
|
|
|
|
|
+ int c=self.cqty+count;
|
|
|
|
|
+
|
|
|
|
|
+ int m=c%self.step;
|
|
|
|
|
+ if(m!=0)
|
|
|
|
|
+ {
|
|
|
|
|
|
|
|
- NSDictionary* return_json = [iSalesNetwork add_toCart:self.product_id count:count];
|
|
|
|
|
|
|
|
|
|
- dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+ UIAlertController *alertControl = [UIAlertController alertControllerWithTitle:[NSString stringWithFormat:@"Sold in quantities of %d, Are you sure?",self.step] message:nil preferredStyle:UIAlertControllerStyleAlert];
|
|
|
|
|
+ //block代码块取代了delegate
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
|
|
|
|
|
|
|
|
- if([[return_json valueForKey:@"result"] intValue]==2)
|
|
|
|
|
- {
|
|
|
|
|
-
|
|
|
|
|
- // NSString* order_code = [return_json valueForKey:@"order_code"];
|
|
|
|
|
- AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
-// appDelegate.order_code = order_code;
|
|
|
|
|
-//
|
|
|
|
|
-// AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
-// appDelegate.order_code = order_code;
|
|
|
|
|
- [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
|
|
|
|
|
|
|
+ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
|
|
|
+
|
|
|
|
|
+ NSDictionary* return_json = [iSalesNetwork add_toCart:self.product_id count:count];
|
|
|
|
|
|
|
|
|
|
+ dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
|
|
|
|
|
- if(self.shopCartBlock!=nil)
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ if([[return_json valueForKey:@"result"] intValue]==2)
|
|
|
{
|
|
{
|
|
|
- UIImage* img=[self photoStackView:self.photoStack photoForIndex:0];
|
|
|
|
|
|
|
|
|
|
|
|
+ // NSString* order_code = [return_json valueForKey:@"order_code"];
|
|
|
|
|
+ AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
+ // appDelegate.order_code = order_code;
|
|
|
|
|
+ //
|
|
|
|
|
+ // AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
+ // appDelegate.order_code = order_code;
|
|
|
|
|
+ [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
|
|
|
|
|
|
|
|
- CGRect iv_rect = CGRectMake(self.btnaddCart.center.x-50, self.btnaddCart.center.y-50, 100, 100);
|
|
|
|
|
- UIImageView* iv = [[UIImageView alloc] initWithFrame:iv_rect];
|
|
|
|
|
- iv.image = img;
|
|
|
|
|
- // [self.contentView addSubview:iv];
|
|
|
|
|
- self.shopCartBlock(iv);
|
|
|
|
|
|
|
|
|
|
- self.cqty +=count;
|
|
|
|
|
- if(self.set_cqty)
|
|
|
|
|
- self.set_cqty(self.cqty);
|
|
|
|
|
|
|
+ if(self.shopCartBlock!=nil)
|
|
|
|
|
+ {
|
|
|
|
|
+ UIImage* img=[self photoStackView:self.photoStack photoForIndex:0];
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ CGRect iv_rect = CGRectMake(self.btnaddCart.center.x-50, self.btnaddCart.center.y-50, 100, 100);
|
|
|
|
|
+ UIImageView* iv = [[UIImageView alloc] initWithFrame:iv_rect];
|
|
|
|
|
+ iv.image = img;
|
|
|
|
|
+ // [self.contentView addSubview:iv];
|
|
|
|
|
+ self.shopCartBlock(iv);
|
|
|
|
|
+
|
|
|
|
|
+ self.cqty +=count;
|
|
|
|
|
+ if(self.set_cqty)
|
|
|
|
|
+ self.set_cqty(self.cqty);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ UIViewController *vc= [RAUtils getViewController:self];
|
|
|
|
|
+ [RAUtils message_alert:[return_json valueForKey:@"err_msg"] title:@"Add To Cart" controller:vc] ;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- UIViewController *vc= [RAUtils getViewController:self];
|
|
|
|
|
- [RAUtils message_alert:[return_json valueForKey:@"err_msg"] title:@"Add To Cart" controller:vc] ;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
|
|
|
|
|
- });
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ }];
|
|
|
|
|
+
|
|
|
|
|
+ UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
|
|
|
|
|
+ NSLog(@"No");
|
|
|
|
|
+ }];
|
|
|
|
|
+ [alertControl addAction:actionOne];
|
|
|
|
|
+
|
|
|
|
|
+ [alertControl addAction:alertthree];
|
|
|
|
|
+
|
|
|
|
|
+ //UIAlertControllerStyle类型为UIAlertControllerStyleAlert可以添加addTextFieldWithConfigurationHandler:^(UITextField *textField)
|
|
|
|
|
+
|
|
|
|
|
+ UIViewController *vc= [RAUtils getViewController:self];
|
|
|
|
|
+ [vc presentViewController:alertControl animated:YES completion:nil];
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
|
|
|
+
|
|
|
|
|
+ NSDictionary* return_json = [iSalesNetwork add_toCart:self.product_id count:count];
|
|
|
|
|
+
|
|
|
|
|
+ dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ if([[return_json valueForKey:@"result"] intValue]==2)
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ // NSString* order_code = [return_json valueForKey:@"order_code"];
|
|
|
|
|
+ AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
+ // appDelegate.order_code = order_code;
|
|
|
|
|
+ //
|
|
|
|
|
+ // AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
+ // appDelegate.order_code = order_code;
|
|
|
|
|
+ [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ if(self.shopCartBlock!=nil)
|
|
|
|
|
+ {
|
|
|
|
|
+ UIImage* img=[self photoStackView:self.photoStack photoForIndex:0];
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ CGRect iv_rect = CGRectMake(self.btnaddCart.center.x-50, self.btnaddCart.center.y-50, 100, 100);
|
|
|
|
|
+ UIImageView* iv = [[UIImageView alloc] initWithFrame:iv_rect];
|
|
|
|
|
+ iv.image = img;
|
|
|
|
|
+ // [self.contentView addSubview:iv];
|
|
|
|
|
+ self.shopCartBlock(iv);
|
|
|
|
|
+
|
|
|
|
|
+ self.cqty +=count;
|
|
|
|
|
+ if(self.set_cqty)
|
|
|
|
|
+ self.set_cqty(self.cqty);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ UIViewController *vc= [RAUtils getViewController:self];
|
|
|
|
|
+ [RAUtils message_alert:[return_json valueForKey:@"err_msg"] title:@"Add To Cart" controller:vc] ;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+//
|
|
|
|
|
+// dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
|
|
|
+//
|
|
|
|
|
+// NSDictionary* return_json = [iSalesNetwork add_toCart:self.product_id count:count];
|
|
|
|
|
+//
|
|
|
|
|
+// dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
|
|
+//
|
|
|
|
|
+//
|
|
|
|
|
+//
|
|
|
|
|
+// if([[return_json valueForKey:@"result"] intValue]==2)
|
|
|
|
|
+// {
|
|
|
|
|
+//
|
|
|
|
|
+// // NSString* order_code = [return_json valueForKey:@"order_code"];
|
|
|
|
|
+// AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
+//// appDelegate.order_code = order_code;
|
|
|
|
|
+////
|
|
|
|
|
+//// AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
+//// appDelegate.order_code = order_code;
|
|
|
|
|
+// [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
|
|
|
|
|
+//
|
|
|
|
|
+//
|
|
|
|
|
+// if(self.shopCartBlock!=nil)
|
|
|
|
|
+// {
|
|
|
|
|
+// UIImage* img=[self photoStackView:self.photoStack photoForIndex:0];
|
|
|
|
|
+//
|
|
|
|
|
+//
|
|
|
|
|
+// CGRect iv_rect = CGRectMake(self.btnaddCart.center.x-50, self.btnaddCart.center.y-50, 100, 100);
|
|
|
|
|
+// UIImageView* iv = [[UIImageView alloc] initWithFrame:iv_rect];
|
|
|
|
|
+// iv.image = img;
|
|
|
|
|
+// // [self.contentView addSubview:iv];
|
|
|
|
|
+// self.shopCartBlock(iv);
|
|
|
|
|
+//
|
|
|
|
|
+// self.cqty +=count;
|
|
|
|
|
+// if(self.set_cqty)
|
|
|
|
|
+// self.set_cqty(self.cqty);
|
|
|
|
|
+//
|
|
|
|
|
+// }
|
|
|
|
|
+//
|
|
|
|
|
+//
|
|
|
|
|
+// }
|
|
|
|
|
+// else
|
|
|
|
|
+// {
|
|
|
|
|
+// UIViewController *vc= [RAUtils getViewController:self];
|
|
|
|
|
+// [RAUtils message_alert:[return_json valueForKey:@"err_msg"] title:@"Add To Cart" controller:vc] ;
|
|
|
|
|
+// }
|
|
|
|
|
+//
|
|
|
|
|
+//
|
|
|
|
|
+//
|
|
|
|
|
+//
|
|
|
|
|
+// });
|
|
|
|
|
+// });
|
|
|
|
|
+//
|
|
|
|
|
+
|
|
|
}];
|
|
}];
|
|
|
|
|
|
|
|
UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
|
|
UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
|
|
@@ -449,26 +590,112 @@
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
|
|
|
|
|
+
|
|
|
|
|
+ int c=self.cqty+count;
|
|
|
|
|
+
|
|
|
|
|
+ int m=c%self.step;
|
|
|
|
|
+ if(m!=0)
|
|
|
|
|
+ {
|
|
|
|
|
|
|
|
- NSDictionary* return_json = [iSalesNetwork add_toCart:self.product_id count:count];
|
|
|
|
|
|
|
|
|
|
- dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
|
|
|
|
+
|
|
|
|
|
+ UIAlertController *alertControl = [UIAlertController alertControllerWithTitle:[NSString stringWithFormat:@"Sold in quantities of %d, Are you sure?",self.step] message:nil preferredStyle:UIAlertControllerStyleAlert];
|
|
|
|
|
+ //block代码块取代了delegate
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ UIAlertAction *actionOne = [UIAlertAction actionWithTitle:@"Yes" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {
|
|
|
|
|
+
|
|
|
|
|
+ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
|
|
|
+
|
|
|
|
|
+ NSDictionary* return_json = [iSalesNetwork add_toCart:self.product_id count:count];
|
|
|
|
|
+
|
|
|
|
|
+ dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ if([[return_json valueForKey:@"result"] intValue]==2)
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ // NSString* order_code = [return_json valueForKey:@"order_code"];
|
|
|
|
|
+ AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
+ // appDelegate.order_code = order_code;
|
|
|
|
|
+ //
|
|
|
|
|
+ // AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
+ // appDelegate.order_code = order_code;
|
|
|
|
|
+ [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ if(self.shopCartBlock!=nil)
|
|
|
|
|
+ {
|
|
|
|
|
+ UIImage* img=[self photoStackView:self.photoStack photoForIndex:0];
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ CGRect iv_rect = CGRectMake(self.btnaddCart.center.x-50, self.btnaddCart.center.y-50, 100, 100);
|
|
|
|
|
+ UIImageView* iv = [[UIImageView alloc] initWithFrame:iv_rect];
|
|
|
|
|
+ iv.image = img;
|
|
|
|
|
+ // [self.contentView addSubview:iv];
|
|
|
|
|
+ self.shopCartBlock(iv);
|
|
|
|
|
+
|
|
|
|
|
+ self.cqty +=count;
|
|
|
|
|
+ if(self.set_cqty)
|
|
|
|
|
+ self.set_cqty(self.cqty);
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ UIViewController *vc= [RAUtils getViewController:self];
|
|
|
|
|
+ [RAUtils message_alert:[return_json valueForKey:@"err_msg"] title:@"Add To Cart" controller:vc] ;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
+ }];
|
|
|
|
|
+
|
|
|
|
|
+ UIAlertAction *alertthree = [UIAlertAction actionWithTitle:@"No" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {
|
|
|
|
|
+ NSLog(@"No");
|
|
|
|
|
+ }];
|
|
|
|
|
+ [alertControl addAction:actionOne];
|
|
|
|
|
+
|
|
|
|
|
+ [alertControl addAction:alertthree];
|
|
|
|
|
+
|
|
|
|
|
+ //UIAlertControllerStyle类型为UIAlertControllerStyleAlert可以添加addTextFieldWithConfigurationHandler:^(UITextField *textField)
|
|
|
|
|
+
|
|
|
|
|
+ UIViewController *vc= [RAUtils getViewController:self];
|
|
|
|
|
+ [vc presentViewController:alertControl animated:YES completion:nil];
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
|
|
|
|
|
|
- if([[return_json valueForKey:@"result"] intValue]==2)
|
|
|
|
|
- {
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- // NSString* order_code = [return_json valueForKey:@"order_code"];
|
|
|
|
|
- AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
-// appDelegate.order_code = order_code;
|
|
|
|
|
-//
|
|
|
|
|
-// AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
-// appDelegate.order_code = order_code;
|
|
|
|
|
- [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
|
|
|
|
|
|
|
+ NSDictionary* return_json = [iSalesNetwork add_toCart:self.product_id count:count];
|
|
|
|
|
+
|
|
|
|
|
+ dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
+ if([[return_json valueForKey:@"result"] intValue]==2)
|
|
|
|
|
+ {
|
|
|
|
|
+
|
|
|
|
|
+ // NSString* order_code = [return_json valueForKey:@"order_code"];
|
|
|
|
|
+ AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
+ // appDelegate.order_code = order_code;
|
|
|
|
|
+ //
|
|
|
|
|
+ // AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
+ // appDelegate.order_code = order_code;
|
|
|
|
|
+ [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
|
|
|
|
|
+
|
|
|
|
|
|
|
|
if(self.shopCartBlock!=nil)
|
|
if(self.shopCartBlock!=nil)
|
|
|
{
|
|
{
|
|
@@ -487,19 +714,76 @@
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ UIViewController *vc= [RAUtils getViewController:self];
|
|
|
|
|
+ [RAUtils message_alert:[return_json valueForKey:@"err_msg"] title:@"Add To Cart" controller:vc] ;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- }
|
|
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- UIViewController *vc= [RAUtils getViewController:self];
|
|
|
|
|
- [RAUtils message_alert:[return_json valueForKey:@"err_msg"] title:@"Add To Cart" controller:vc] ;
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
});
|
|
});
|
|
|
- });
|
|
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ //
|
|
|
|
|
+ // dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
|
|
|
|
|
+ //
|
|
|
|
|
+ // NSDictionary* return_json = [iSalesNetwork add_toCart:self.product_id count:count];
|
|
|
|
|
+ //
|
|
|
|
|
+ // dispatch_async(dispatch_get_main_queue(), ^{
|
|
|
|
|
+ //
|
|
|
|
|
+ //
|
|
|
|
|
+ //
|
|
|
|
|
+ // if([[return_json valueForKey:@"result"] intValue]==2)
|
|
|
|
|
+ // {
|
|
|
|
|
+ //
|
|
|
|
|
+ // // NSString* order_code = [return_json valueForKey:@"order_code"];
|
|
|
|
|
+ // AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
+ //// appDelegate.order_code = order_code;
|
|
|
|
|
+ ////
|
|
|
|
|
+ //// AppDelegate *appDelegate = (AppDelegate*)[[UIApplication sharedApplication] delegate];
|
|
|
|
|
+ //// appDelegate.order_code = order_code;
|
|
|
|
|
+ // [((MainViewController*)appDelegate.main_vc) reloadCart:true immediately:false];
|
|
|
|
|
+ //
|
|
|
|
|
+ //
|
|
|
|
|
+ // if(self.shopCartBlock!=nil)
|
|
|
|
|
+ // {
|
|
|
|
|
+ // UIImage* img=[self photoStackView:self.photoStack photoForIndex:0];
|
|
|
|
|
+ //
|
|
|
|
|
+ //
|
|
|
|
|
+ // CGRect iv_rect = CGRectMake(self.btnaddCart.center.x-50, self.btnaddCart.center.y-50, 100, 100);
|
|
|
|
|
+ // UIImageView* iv = [[UIImageView alloc] initWithFrame:iv_rect];
|
|
|
|
|
+ // iv.image = img;
|
|
|
|
|
+ // // [self.contentView addSubview:iv];
|
|
|
|
|
+ // self.shopCartBlock(iv);
|
|
|
|
|
+ //
|
|
|
|
|
+ // self.cqty +=count;
|
|
|
|
|
+ // if(self.set_cqty)
|
|
|
|
|
+ // self.set_cqty(self.cqty);
|
|
|
|
|
+ //
|
|
|
|
|
+ // }
|
|
|
|
|
+ //
|
|
|
|
|
+ //
|
|
|
|
|
+ // }
|
|
|
|
|
+ // else
|
|
|
|
|
+ // {
|
|
|
|
|
+ // UIViewController *vc= [RAUtils getViewController:self];
|
|
|
|
|
+ // [RAUtils message_alert:[return_json valueForKey:@"err_msg"] title:@"Add To Cart" controller:vc] ;
|
|
|
|
|
+ // }
|
|
|
|
|
+ //
|
|
|
|
|
+ //
|
|
|
|
|
+ //
|
|
|
|
|
+ //
|
|
|
|
|
+ // });
|
|
|
|
|
+ // });
|
|
|
|
|
+ //
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|