@@ -96,7 +96,8 @@ discard block |
||
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 | } |
@@ -127,7 +128,8 @@ discard block |
||
127 | 128 | foreach ($cartCollection as $item) { |
128 | 129 | $attributes[] = $item->attributes; |
129 | 130 | $cart_currency = $attributes[0]['currency']['currency']; |
130 | - if (\Auth::user()) {//If User is Loggen in and his currency changes after logginng in then remove his previous order from cart |
|
131 | + if (\Auth::user()) { |
|
132 | +//If User is Loggen in and his currency changes after logginng in then remove his previous order from cart |
|
131 | 133 | $currency = \Auth::user()->currency; |
132 | 134 | if ($cart_currency != $currency) { |
133 | 135 | $id = $item->id; |
@@ -174,8 +176,10 @@ discard block |
||
174 | 176 | $user_state = TaxByState::where('state_code', $geoip_state)->first(); |
175 | 177 | $origin_state = $this->setting->first()->state; //Get the State of origin |
176 | 178 | $tax_class_id = TaxProductRelation::where('product_id', $productid)->pluck('tax_class_id')->toArray(); |
177 | - if (count($tax_class_id) > 0) {//If the product is allowed for tax (Check in tax_product relation table) |
|
178 | - if ($tax_enable == 1) {//If GST is Enabled |
|
179 | + if (count($tax_class_id) > 0) { |
|
180 | +//If the product is allowed for tax (Check in tax_product relation table) |
|
181 | + if ($tax_enable == 1) { |
|
182 | +//If GST is Enabled |
|
179 | 183 | |
180 | 184 | $details = $this->getDetailsWhenUserStateIsIndian( |
181 | 185 | $user_state, |
@@ -218,7 +222,8 @@ discard block |
||
218 | 222 | ]); |
219 | 223 | } |
220 | 224 | } |
221 | - } elseif ($tax_enable == 0) {//If Tax enable is 0 and other tax is available |
|
225 | + } elseif ($tax_enable == 0) { |
|
226 | +//If Tax enable is 0 and other tax is available |
|
222 | 227 | |
223 | 228 | $details = $this->whenOtherTaxAvailableAndTaxNotEnable($tax_class_id, $productid, $geoip_state, $geoip_country); |
224 | 229 | |
@@ -394,7 +399,8 @@ discard block |
||
394 | 399 | try { |
395 | 400 | $currency = Setting::find(1)->default_currency; |
396 | 401 | $currency_symbol = Setting::find(1)->default_symbol; |
397 | - if (!\Auth::user()) {//When user is not logged in |
|
402 | + if (!\Auth::user()) { |
|
403 | +//When user is not logged in |
|
398 | 404 | $cont = new \App\Http\Controllers\Front\PageController(); |
399 | 405 | $location = $cont->getLocation(); |
400 | 406 | $country = self::findCountryByGeoip($location['iso_code']); |
@@ -409,7 +415,8 @@ discard block |
||
409 | 415 | $currency = \Auth::user()->currency; |
410 | 416 | $currency_symbol = \Auth::user()->currency_symbol; |
411 | 417 | } |
412 | - if ($userid != '') {//For Admin Panel Clients |
|
418 | + if ($userid != '') { |
|
419 | +//For Admin Panel Clients |
|
413 | 420 | $currencyAndSymbol = self::getCurrency($userid); |
414 | 421 | $currency = $currencyAndSymbol['currency']; |
415 | 422 | $currency_symbol = $currencyAndSymbol['symbol']; |