Completed
Push — development ( 9ea476...895d6a )
by Bhanu
27:18 queued 17:28
created
app/Http/Controllers/Front/CartController.php 1 patch
Braces   +14 added lines, -7 removed lines patch added patch discarded remove patch
@@ -96,7 +96,8 @@  discard block
 block discarded – undo
96 96
     {
97 97
         try {
98 98
             $plan = '';
99
-            if ($request->has('subscription')) {//put he Plan id sent into session variable
99
+            if ($request->has('subscription')) {
100
+//put he Plan id sent into session variable
100 101
                 $plan = $request->get('subscription');
101 102
                 Session::put('plan', $plan);
102 103
             }
@@ -128,7 +129,8 @@  discard block
 block discarded – undo
128 129
                 $attributes[] = $item->attributes;
129 130
                 $cart_currency = $attributes[0]['currency']['currency'];
130 131
                 \Session::put('currency', $cart_currency);
131
-                if (\Auth::user()) {//If User is Loggen in and his currency changes after logginng in then remove his previous order from cart
132
+                if (\Auth::user()) {
133
+//If User is Loggen in and his currency changes after logginng in then remove his previous order from cart
132 134
                     $currency = \Auth::user()->currency;
133 135
                     if ($cart_currency != $currency) {
134 136
                         $id = $item->id;
@@ -175,8 +177,10 @@  discard block
 block discarded – undo
175 177
                 $user_state = TaxByState::where('state_code', $geoip_state)->first();
176 178
                 $origin_state = $this->setting->first()->state; //Get the State of origin
177 179
                 $tax_class_id = TaxProductRelation::where('product_id', $productid)->pluck('tax_class_id')->toArray();
178
-                if (count($tax_class_id) > 0) {//If the product is allowed for tax (Check in tax_product relation table)
179
-                    if ($tax_enable == 1) {//If GST is Enabled
180
+                if (count($tax_class_id) > 0) {
181
+//If the product is allowed for tax (Check in tax_product relation table)
182
+                    if ($tax_enable == 1) {
183
+//If GST is Enabled
180 184
 
181 185
                          $details = $this->getDetailsWhenUserStateIsIndian(
182 186
                              $user_state,
@@ -219,7 +223,8 @@  discard block
 block discarded – undo
219 223
                                          ]);
220 224
                             }
221 225
                         }
222
-                    } elseif ($tax_enable == 0) {//If Tax enable is 0 and other tax is available
226
+                    } elseif ($tax_enable == 0) {
227
+//If Tax enable is 0 and other tax is available
223 228
 
224 229
                         $details = $this->whenOtherTaxAvailableAndTaxNotEnable($tax_class_id, $productid, $geoip_state, $geoip_country);
225 230
 
@@ -395,7 +400,8 @@  discard block
 block discarded – undo
395 400
         try {
396 401
             $currency = Setting::find(1)->default_currency;
397 402
             $currency_symbol = Setting::find(1)->default_symbol;
398
-            if (!\Auth::user()) {//When user is not logged in
403
+            if (!\Auth::user()) {
404
+//When user is not logged in
399 405
                 $cont = new \App\Http\Controllers\Front\PageController();
400 406
                 $location = $cont->getLocation();
401 407
                 $country = self::findCountryByGeoip($location['iso_code']);
@@ -410,7 +416,8 @@  discard block
 block discarded – undo
410 416
                 $currency = \Auth::user()->currency;
411 417
                 $currency_symbol = \Auth::user()->currency_symbol;
412 418
             }
413
-            if ($userid != '') {//For Admin Panel Clients
419
+            if ($userid != '') {
420
+//For Admin Panel Clients
414 421
                 $currencyAndSymbol = self::getCurrency($userid);
415 422
                 $currency = $currencyAndSymbol['currency'];
416 423
                 $currency_symbol = $currencyAndSymbol['symbol'];
Please login to merge, or discard this patch.