| Line 58... |
Line 58... |
| 58 |
$this->layout = 'cartinnerpages';
|
58 |
$this->layout = 'cartinnerpages';
|
| 59 |
$url = Configure::read('saholicapihost').'cart!validateCart?isLoggedIn=true&privateDealUser=true&userId='.$suserId.'&id='.$scartId.'&email='.$semailId;
|
59 |
$url = Configure::read('saholicapihost').'cart!validateCart?isLoggedIn=true&privateDealUser=true&userId='.$suserId.'&id='.$scartId.'&email='.$semailId;
|
| 60 |
if($pincode!='0'){
|
60 |
if($pincode!='0'){
|
| 61 |
$url = $url.'&pinCode='.$pincode;
|
61 |
$url = $url.'&pinCode='.$pincode;
|
| 62 |
}
|
62 |
}
|
| 63 |
print_r('Cart Vaildation');
|
- |
|
| 64 |
$cartskus = $this->post_cartinfo_request($url,$params);
|
63 |
$cartskus = $this->post_cartinfo_request($url,$params);
|
| 65 |
print_r(count($cartskus['cartMessages']));
|
64 |
print_r(count($cartskus['cartMessages']));
|
| 66 |
if(isset($cartskus['response']) && $cartskus['response']=='error'){
|
65 |
if(isset($cartskus['response']) && $cartskus['response']=='error'){
|
| 67 |
$this->set(compact('cartskus'));
|
66 |
$this->set(compact('cartskus'));
|
| 68 |
$this->render('/Users/cartdetails');
|
67 |
$this->render('/Users/cartdetails');
|
| Line 70... |
Line 69... |
| 70 |
}elseif(isset($cartskus['cartMessages']) && count($cartskus['cartMessages'])>0){
|
69 |
}elseif(isset($cartskus['cartMessages']) && count($cartskus['cartMessages'])>0){
|
| 71 |
setcookie('s_pincode', base64_encode($cartskus['pincode']), -1, '/');
|
70 |
setcookie('s_pincode', base64_encode($cartskus['pincode']), -1, '/');
|
| 72 |
$this->set(compact('cartskus'));
|
71 |
$this->set(compact('cartskus'));
|
| 73 |
$this->render('/Users/cartdetails');
|
72 |
$this->render('/Users/cartdetails');
|
| 74 |
}else{
|
73 |
}else{
|
| 75 |
print_r('Shipping Vaildation');
|
- |
|
| 76 |
$totalPayable = intval($dataGiven->totalCartValue) + intval($dataGiven->shippingCharges);
|
74 |
$totalPayable = intval($dataGiven->totalCartValue) + intval($dataGiven->shippingCharges);
|
| 77 |
$this->Session->write('totalPayable', $totalPayable);
|
75 |
$this->Session->write('totalPayable', $totalPayable);
|
| 78 |
$this->layout = 'innerpages';
|
76 |
$this->layout = 'innerpages';
|
| 79 |
$suserId = base64_decode($_COOKIE['s_id']);
|
77 |
$suserId = base64_decode($_COOKIE['s_id']);
|
| 80 |
$url = Configure::read('saholicapihost').'address?isLoggedIn=true&privateDealUser=true&userId='.$suserId;
|
78 |
$url = Configure::read('saholicapihost').'address?isLoggedIn=true&privateDealUser=true&userId='.$suserId;
|