diff --git a/app/Http/Controllers/Auth/AuthController.php b/app/Http/Controllers/Auth/AuthController.php index b050d2bb1c..32903f2b18 100755 --- a/app/Http/Controllers/Auth/AuthController.php +++ b/app/Http/Controllers/Auth/AuthController.php @@ -454,13 +454,13 @@ public function requestOtpFromAjax(Request $request) $newEmail = $request->newemail; $number = $request->oldnumber; $newNumber = $request->newnumber; - User::where('email', $email)->orwhere('mobile', $number)->update(['email'=>$newEmail, 'mobile'=>$newNumber]); + User::where('email', $email)->update(['email'=>$newEmail, 'mobile'=>$newNumber]); try { $code = $request->input('code'); $mobile = $request->input('mobile'); $userid = $request->input('id'); - $email = $request->input('newemail'); + $email = $request->input('email'); $pass = $request->input('password'); $number = $code.$mobile; diff --git a/app/Http/Controllers/Common/MailChimpController.php b/app/Http/Controllers/Common/MailChimpController.php index 134d9c0dec..4bdf1ccc2e 100644 --- a/app/Http/Controllers/Common/MailChimpController.php +++ b/app/Http/Controllers/Common/MailChimpController.php @@ -80,7 +80,6 @@ public function addSubscriber($email) return $result; } catch (Exception $ex) { - dd($ex); $exe = json_decode($ex->getMessage(), true); if ($exe['status'] == 400) { throw new Exception("$email is already subscribed to newsletter", 400); diff --git a/app/Http/Controllers/Common/TemplateController.php b/app/Http/Controllers/Common/TemplateController.php index c994e86b8e..792df198ba 100755 --- a/app/Http/Controllers/Common/TemplateController.php +++ b/app/Http/Controllers/Common/TemplateController.php @@ -291,23 +291,23 @@ public function mailing($from, $to, $data, $subject, $replace = [], $type = '', // // // Set the mailer - // $fields = $settings; - // $driver = ''; - // $port = ''; - // $host = ''; - // $enc = ''; - // $email = ''; - // $mail_password = ''; - // $name = ''; - // if ($fields) { - // $driver = $fields->driver; - // $port = $fields->port; - // $host = $fields->host; - // $enc = $fields->encryption; - // $email = $fields->email; - // $mail_password = $fields->password; - // $name = $fields->company; - // } + $fields = $settings; + $driver = ''; + $port = ''; + $host = ''; + $enc = ''; + $email = ''; + $mail_password = ''; + $name = ''; + if ($fields) { + $driver = $fields->driver; + $port = $fields->port; + $host = $fields->host; + $enc = $fields->encryption; + $email = $fields->email; + $mail_password = $fields->password; + $name = $fields->company; + } $https['ssl']['verify_peer'] = false; $https['ssl']['verify_peer_name'] = false; @@ -318,8 +318,8 @@ public function mailing($from, $to, $data, $subject, $replace = [], $type = '', $transport->setStreamOptions($https); $set = new \Swift_Mailer($transport); - // // // Set the mailer - // \Mail::setSwiftMailer($set); + // // Set the mailer + \Mail::setSwiftMailer($set); /*Mail config ends*/ @@ -346,7 +346,6 @@ 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'); @@ -508,12 +507,12 @@ 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); } @@ -743,7 +742,6 @@ 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 { @@ -782,7 +780,6 @@ public function leastAmount($id) } // dd($price); } - $cost = "$symbol $price"; } else { $cost = 'Free'; @@ -797,7 +794,7 @@ public function leastAmount($id) // } } - return $price; + return $cost; } public function leastAmountService($id) diff --git a/app/Http/Controllers/Front/CartController.php b/app/Http/Controllers/Front/CartController.php index 77191218a0..2c913ecd28 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 = []; $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 f0c3b81392..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