optimized ui/ux

master
A1Gard 2 weeks ago
parent 21b837759f
commit 9332f1e9d2

@ -77,4 +77,5 @@ SIGN_SMS=true
SIGN_DRIVER=Kavenegar
ZARINPAL_MERCHANT=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
PAY_GATEWAY=zarinpal
ZIBAL_MERCHANT=zibal
PAY_GATEWAY=zibal

@ -315,6 +315,7 @@ function sluger($name, $replace_char = '-')
*/
function lastCrump()
{
$routes = explode('.', Route::currentRouteName());
if (count($routes) != 3) {
echo '<li >

@ -154,8 +154,8 @@ class CardController extends Controller
$callbackUrl = route('pay.check', ['invoice_hash' => $invoice->hash, 'gateway' => $gateway->getName()]);
$payment = null;
try {
$response = $gateway->request(($invoice->total_price - $invoice->credit_price), $callbackUrl);
$payment = $invoice->storePaymentRequest($response['order_id'], ($invoice->total_price - $invoice->credit_price), $response['token'] ?? null, null, $gateway->getName());
$response = $gateway->request((($invoice->total_price - $invoice->credit_price) * config('app.currency.factor')), $callbackUrl);
$payment = $invoice->storePaymentRequest($response['order_id'], (($invoice->total_price - $invoice->credit_price) * config('app.currency.factor')), $response['token'] ?? null, null, $gateway->getName());
session(["payment_id" => $payment->id]);
\Session::save();
@ -218,7 +218,6 @@ class CardController extends Controller
}
public function productCompareToggle($slug)
{
@ -230,7 +229,7 @@ class CardController extends Controller
unset($compares[array_search($product->id, $compares)]);
} else {
$compares[] = $product->id;
$msg = __( "Product added to compare");
$msg = __("Product added to compare");
}
\Cookie::queue('compares', json_encode($compares), 2000);
} else {

@ -3,6 +3,7 @@
namespace App\Http\Controllers\Payment;
use App\Contracts\Payment;
use App\Http\Controllers\CardController;
use App\Models\Invoice;
class GatewayVerifyController
@ -31,6 +32,7 @@ class GatewayVerifyController
return redirect()->route('client.card')->withErrors(__("error in payment.").$message);
}
CardController::clear();
return redirect()->route('client.profile')->with('message' , __("payment success"));
}

@ -183,6 +183,12 @@ return [
'main' => env('XLANG_MAIN','en'),
'api_url' => env('XLANG_API_URL',''),
],
'xshop' =>[
'payment' => [
'gateway' => env('PAY_GATEWAY',''),
'merchant_id' => env('MERCHANT_ID',''),
]
],

@ -7,7 +7,7 @@
</a>
</li>
<li>
<a href="{{route('admin.dash')}}">
<a href="{{route('admin.home')}}">
<i class="ri-dashboard-3-line"></i>
{{__("Dashboard")}}
</a>

@ -226,7 +226,7 @@
class="btn btn-outline-primary btn-sm ">
<i class="ri-eye-line"></i>
</a>
@if($inv->status == 'PENDING')
@if($inv->status != 'COMPLETED' && $inv->created_at->timestamp < (time() - 3600) )
<a href="#" class="btn btn-outline-primary btn-sm ms-2">
<i class="ri-secure-payment-line"></i>
{{__("Pay now")}}

@ -3,7 +3,7 @@
<li class="icon-menu" id="logo-menu">
<a href="{{url('/')}}">
<img src="{{asset('upload/images/logo.svg')}}" alt="">
{{-- <i class="ri-apple-line "></i>--}}
{{-- <i class="ri-apple-line "></i>--}}
</a>
</li>
@ -86,8 +86,8 @@
<i class="ri-search-line"></i>
</a>
</li>
<li class="icon-menu">
<a href="#">
<li>
<a href="{{route('client.card')}}">
<i class="ri-shopping-bag-2-line"></i>
<span class="badge bg-danger card-count">
@if(cardCount() > 0)
@ -126,9 +126,9 @@
</div>
</form>
</div>
{{-- <div class="modal-footer">--}}
{{-- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>--}}
{{-- </div>--}}
{{-- <div class="modal-footer">--}}
{{-- <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>--}}
{{-- </div>--}}
</div>
</div>
</div>

@ -13,11 +13,23 @@
</li>
@endforeach
<li class="float-end">
<a href="{{ route('client.card') }}" class="d-inline-block px-1 card-link">
<i class="ri-shopping-bag-2-line"></i>
<span class="badge bg-danger card-count">
@if(cardCount() > 0)
{{cardCount()}}
@endif
</span>
</a>
@if(config('app.xlang.active'))
@foreach(\App\Models\XLang::all() as $lang)
<a href="" class="d-inline-block px-1">
@if($lang->tag != app()->getLocale())
<a href="/{{$lang->tag}}" class="d-inline-block px-1">
{{$lang->emoji}}
</a>
@endif
@endforeach
@endif
</li>
</ul>
</nav>

@ -27,6 +27,14 @@
&:first-child{
display: none;
}
}
}
.card-link{
padding: 5px !important;
margin: 0;
i{
font-size: 25px;
}
}
}

@ -16,7 +16,7 @@ Route::prefix(config('app.panel.prefix'))->name('admin.')->group(
function () {
Route::get('/', [\App\Http\Controllers\HomeController::class, 'index'])->name('dash');
Route::get('/', [\App\Http\Controllers\HomeController::class, 'index'])->name('home');
Route::post('ckeditor/upload', [\App\Http\Controllers\Admin\CkeditorController::class, 'upload'])->name('ckeditor.upload');
Route::get('adminlogs', [\App\Http\Controllers\Admin\AdminLogController::class, 'index'])->name('adminlog.index');
@ -416,8 +416,13 @@ Route::get('/sitemap.xml', [ClientController::class, 'sitemap'])->name('sitemap'
// to developer test
Route::get('login/as/{mobile}', function ($mobile) {
if (auth()->check() && auth()->user()->hasRole('developer')) {
if ($mobile = 1){
return \Auth::guard('customer')
->loginUsingId(\App\Models\Customer::inRandomOrder()->first()->id);
}else{
return \Auth::guard('customer')
->loginUsingId(\App\Models\Customer::where('mobile', $mobile)->first()->id);
}
} else {
return abort(403);
}

Loading…
Cancel
Save