From 8f5fa8ddabddd9365fc79cd2187ec02581d5c1f3 Mon Sep 17 00:00:00 2001 From: ashu555 Date: Thu, 21 Jun 2018 15:19:36 +0530 Subject: [PATCH 1/6] update --- .../Controllers/Common/TemplateController.php | 29 +++++++------------ app/Http/Controllers/Front/PageController.php | 2 +- .../common/template/shoppingcart.blade.php | 2 ++ .../front/auth/login-register.blade.php | 5 ++-- .../laravel-installer/src/Routes/web.php | 4 --- 5 files changed, 15 insertions(+), 27 deletions(-) diff --git a/app/Http/Controllers/Common/TemplateController.php b/app/Http/Controllers/Common/TemplateController.php index 8792389b4d..c96d2915e4 100755 --- a/app/Http/Controllers/Common/TemplateController.php +++ b/app/Http/Controllers/Common/TemplateController.php @@ -309,16 +309,14 @@ public function mailing($from, $to, $data, $subject, $replace = [], $type = '', // $name = $fields->company; // } + // $https['ssl']['verify_peer'] = false; + // $https['ssl']['verify_peer_name'] = false; - $https['ssl']['verify_peer'] = false; - $https['ssl']['verify_peer_name'] = false; - - $transport = new \Swift_SmtpTransport('smtp.gmail.com', '465', 'ssl'); - $transport->setUsername($email); - $transport->setPassword($mail_password); - $transport->setStreamOptions($https); - $set = new \Swift_Mailer($transport); - + // $transport = new \Swift_SmtpTransport('smtp.gmail.com', '465', 'ssl'); + // $transport->setUsername($email); + // $transport->setPassword($mail_password); + // $transport->setStreamOptions($https); + // $set = new \Swift_Mailer($transport); // // // Set the mailer // \Mail::setSwiftMailer($set); @@ -347,9 +345,7 @@ public function mailing($from, $to, $data, $subject, $replace = [], $type = '', return 'success'; } catch (\Exception $ex) { - dd($ex); - Bugsnag::notifyException($ex); if ($ex instanceof \Swift_TransportException) { throw new \Exception('We can not reach to this email address'); @@ -511,19 +507,18 @@ public function taxProcess($taxes, $price, $cart, $shop) try { $rate = ''; foreach ($taxes as $tax) { - // dd($tax->rate); if ($tax->compound != 1) { - $rate = $tax->rate; + $rate += $tax->rate; } else { $rate = $tax->rate; } + // dd($rate); $tax_amount = $this->ifStatement($rate, $price, $cart, $shop, $tax->country, $tax->state); } // dd($tax_amount); return $tax_amount; } catch (\Exception $ex) { - Bugsnag::notifyException($ex); throw new \Exception($ex->getMessage()); @@ -747,13 +742,11 @@ public function prices($id) $months = round($value->days / 30 / 12); // dd($months); // $price[$value->id] = $months.' Year at '.$currency.' '.$cost.'/year'; - if ($currency == 'INR') { $price[$value->id] = '₹'.' '.$cost; } else { $price[$value->id] = '$'.' '.$cost; } - } // dd($price); $this->leastAmount($id); @@ -787,7 +780,6 @@ public function leastAmount($id) } // dd($price); } - $cost = "$symbol $price"; } else { $cost = 'Free'; @@ -800,10 +792,9 @@ public function leastAmount($id) // if ($product_cost != 0) { // $cost = $currency.' '.$product_cost; // } - } - return $price; + return $cost; } public function leastAmountService($id) diff --git a/app/Http/Controllers/Front/PageController.php b/app/Http/Controllers/Front/PageController.php index 7c8d3d70d5..11c521fd43 100755 --- a/app/Http/Controllers/Front/PageController.php +++ b/app/Http/Controllers/Front/PageController.php @@ -341,7 +341,7 @@ public function cart() $template = ''; if (count($helpdesk_products) > 0) { - foreach ($helpdesk_products as $key => $value) { + foreach ($helpdesk_products as $key => $value) { $trasform[$value['id']]['price'] = $temp_controller->leastAmount($value['id']); $trasform[$value['id']]['name'] = $value['name']; $trasform[$value['id']]['feature'] = $value['description']; diff --git a/resources/views/themes/default1/common/template/shoppingcart.blade.php b/resources/views/themes/default1/common/template/shoppingcart.blade.php index f0c3b81392..506fd32130 100644 --- a/resources/views/themes/default1/common/template/shoppingcart.blade.php +++ b/resources/views/themes/default1/common/template/shoppingcart.blade.php @@ -129,3 +129,5 @@ @stop + + diff --git a/resources/views/themes/default1/front/auth/login-register.blade.php b/resources/views/themes/default1/front/auth/login-register.blade.php index 800621cf6a..807fd30653 100644 --- a/resources/views/themes/default1/front/auth/login-register.blade.php +++ b/resources/views/themes/default1/front/auth/login-register.blade.php @@ -1456,12 +1456,11 @@ function getState(val) { url: "{{url('get-loginstate')}}/" + val, data: {'country_id':val,'_token':"{{csrf_token()}}"},//'country_id=' + val, success: function (data) { -<<<<<<< HEAD + $("#state-list").html('').val(''); console.log() -======= ->>>>>>> master + $("#state-list").html(data).val(state.id); } }); diff --git a/vendor/rachidlaasri/laravel-installer/src/Routes/web.php b/vendor/rachidlaasri/laravel-installer/src/Routes/web.php index 6a74b3a088..c428013ca2 100644 --- a/vendor/rachidlaasri/laravel-installer/src/Routes/web.php +++ b/vendor/rachidlaasri/laravel-installer/src/Routes/web.php @@ -2,10 +2,6 @@ Route::group(['prefix' => 'install','as' => 'LaravelInstaller::','namespace' => 'RachidLaasri\LaravelInstaller\Controllers'], function() { - - - - Route::get('/', [ 'as' => 'welcome', 'uses' => 'WelcomeController@welcome' From a1462ea6ada92ade6e91ae706e79ffc00a10267b Mon Sep 17 00:00:00 2001 From: Ashutosh pathak Date: Thu, 21 Jun 2018 09:53:44 +0000 Subject: [PATCH 2/6] Apply fixes from StyleCI --- app/Http/Controllers/Common/TemplateController.php | 2 -- app/Http/Controllers/Front/PageController.php | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/Http/Controllers/Common/TemplateController.php b/app/Http/Controllers/Common/TemplateController.php index 4c1be93262..c96d2915e4 100755 --- a/app/Http/Controllers/Common/TemplateController.php +++ b/app/Http/Controllers/Common/TemplateController.php @@ -309,7 +309,6 @@ public function mailing($from, $to, $data, $subject, $replace = [], $type = '', // $name = $fields->company; // } - // $https['ssl']['verify_peer'] = false; // $https['ssl']['verify_peer_name'] = false; @@ -319,7 +318,6 @@ public function mailing($from, $to, $data, $subject, $replace = [], $type = '', // $transport->setStreamOptions($https); // $set = new \Swift_Mailer($transport); - // // // Set the mailer // \Mail::setSwiftMailer($set); diff --git a/app/Http/Controllers/Front/PageController.php b/app/Http/Controllers/Front/PageController.php index 99e49c1c33..e9af85b711 100755 --- a/app/Http/Controllers/Front/PageController.php +++ b/app/Http/Controllers/Front/PageController.php @@ -341,7 +341,7 @@ public function cart() $template = ''; if (count($helpdesk_products) > 0) { - foreach ($helpdesk_products as $key => $value) { + foreach ($helpdesk_products as $key => $value) { $trasform[$value['id']]['price'] = $temp_controller->leastAmount($value['id']); $trasform[$value['id']]['name'] = $value['name']; $trasform[$value['id']]['feature'] = $value['description']; From 169867ead725bd457cda6654b73f082b33b2ebfc Mon Sep 17 00:00:00 2001 From: ashu555 Date: Fri, 22 Jun 2018 12:38:53 +0530 Subject: [PATCH 3/6] scruitinizer issue --- app/Http/Controllers/Front/CartController.php | 1 + .../common/template/shoppingcart.blade.php | 12 +- .../front/auth/login-register.blade.php | 608 ++++++++++-------- .../default1/front/clients/profile.blade.php | 6 +- 4 files changed, 366 insertions(+), 261 deletions(-) diff --git a/app/Http/Controllers/Front/CartController.php b/app/Http/Controllers/Front/CartController.php index 77191218a0..2d0f6f4e96 100755 --- a/app/Http/Controllers/Front/CartController.php +++ b/app/Http/Controllers/Front/CartController.php @@ -194,6 +194,7 @@ public function showCart() public function checkTax($productid) { try { + $tax_attribute = array(); $tax_attribute[0] = ['name' => 'null', 'rate' => 0, 'tax_enable' =>0]; $taxCondition[0] = new \Darryldecode\Cart\CartCondition([ 'name' => 'null', diff --git a/resources/views/themes/default1/common/template/shoppingcart.blade.php b/resources/views/themes/default1/common/template/shoppingcart.blade.php index 506fd32130..4adfa13106 100644 --- a/resources/views/themes/default1/common/template/shoppingcart.blade.php +++ b/resources/views/themes/default1/common/template/shoppingcart.blade.php @@ -61,10 +61,10 @@ @endif
-
+

Helpdesk Pricing

-
+
@@ -79,10 +79,10 @@
-
+

ServiceDesk Pricing

-
+
@@ -95,10 +95,10 @@





-
+

Services Pricing

-
+
diff --git a/resources/views/themes/default1/front/auth/login-register.blade.php b/resources/views/themes/default1/front/auth/login-register.blade.php index 807fd30653..cea3111e68 100644 --- a/resources/views/themes/default1/front/auth/login-register.blade.php +++ b/resources/views/themes/default1/front/auth/login-register.blade.php @@ -571,30 +571,99 @@ @stop @section('script') + - + + - $('#verify_email').keyup(function(){ + + + + - - function verifyBySendOtp() { - $('#enterotp').hide(); - if(verify_otp_check()) { - $("#verifyOtp").html("Verifying..."); - var data = { - "mobile": $('#verify_number').val(), - "code" : $('#verify_country_code').val(), - "otp" : $('#oneTimePassword').val(), - 'id' : $('#hidden_user_id').val() - }; - $.ajax({ - url: '{{url('otp/verify')}}', - type: 'GET', - data: data, - success: function (response) { - $('#error2').hide(); - $('#alertMessage2').show(); - var result = '
Well Done! '+response.message+'!.
'; - // $('#alertMessage3').show(); - $('#successMessage2').hide(); - $('#success').html(result); - $("#verifyOtp").html("Verify OTP"); - $('.nav-tabs li a[href="#step1"]').tab('show'); - $('.wizard-inner').css('display','none'); - setTimeout(()=>{ - getLoginTab(); - },0) - }, - error: function (ex) { - var myJSON = JSON.parse(ex.responseText); - var html = '
Whoops! Something went wrong

    '; - $("#verifyOtp").html("Verify OTP"); - for (var key in myJSON) - { - html += '
  • ' + myJSON[key][0] + '
  • ' - } - html += '
'; - $('#alertMessage2').hide(); - $('#error2').show(); - document.getElementById('error2').innerHTML = html; - setTimeout(function(){ - $('#error2').hide(); - }, 5000); - } - }); - } - else - { - return false; - } - } - function resendOTP() { - var data = { - "mobile": $('#verify_number').val(), - "code" : $('#verify_country_code').val(), - }; - $.ajax({ - url: '{{url('resend_otp')}}', - type: 'GET', - data: data, - success: function (response) { - - $('#successMessage2').hide (); - $('#alertMessage3').show(); - $('#error2').hide(); - var result = '
Well Done! '+response.message+'!
'; - $('#alertMessage3').html(result+ "."); - }, - error: function (ex) { - var myJSON = JSON.parse(ex.responseText); - var html = '
Oh Snap! Something went wrong

    '; - for (var key in myJSON) - { - html += '
  • ' + myJSON[key][0] + '
  • ' - } - html += '
'; - $('#alertMessage2').hide(); - $('#error2').show(); - document.getElementById('error2').innerHTML = html; - } - }); - } -