Merge pull request #26 from 4xmen/master

fixed some bugs & improved panel ui
pull/36/head
Farzad AsA 1 year ago committed by GitHub
commit c47764cb4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -60,7 +60,7 @@ PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
ZARINPAL_MERCHANT='12000000-0220-0000-0220-220000000001' ZARINPAL_MERCHANT='test'
PAY_GATWAY=zarinpal PAY_GATWAY=zarinpal
THUMBNAIL_SIZE=600x600 THUMBNAIL_SIZE=600x600

@ -12,9 +12,11 @@ class TransportController extends Controller
{ {
function createOrUpdate(Transport $transport,TransportSaveRequest $request){ function createOrUpdate(Transport $transport,TransportSaveRequest $request){
$transport->price = $request->price; $transport->price = $request->price;
$transport->title = $request->title; $transport->title = $request->title;
$transport->description = $request->description; $transport->description = $request->description;
$transport->is_default = $request->has('is_default');
if ($request->has('is_default')){ if ($request->has('is_default')){
Transport::where('is_default')->update([ Transport::where('is_default')->update([
'is_default' => 0, 'is_default' => 0,

@ -730,6 +730,32 @@ li.no_results {
display: none; display: none;
} }
.cats-x3 {
-moz-column-count: 4;
column-count: 4;
}
/*-1000px width*/
@media (max-width: 1000px) {
.cats-x3 {
-moz-column-count: 3;
column-count: 3;
}
}
/*-600px width*/
@media (max-width: 600px) {
.cats-x3 {
-moz-column-count: 2;
column-count: 2;
}
}
/*-300px width*/
@media (max-width: 300px) {
.cats-x3 {
-moz-column-count: 1;
column-count: 1;
}
}
.wizard .steps { .wizard .steps {
display: flex; display: flex;
position: relative; position: relative;
@ -906,6 +932,10 @@ li.no_results {
background: dodgerblue; background: dodgerblue;
} }
.select2-container {
max-width: 97%;
}
body { body {
overflow-x: hidden; overflow-x: hidden;
zoom: 100%; zoom: 100%;

@ -11437,6 +11437,48 @@ h3.textt{
transform: scale(1); transform: scale(1);
} }
} }
.color-pick .color {
display: inline-block;
opacity: 0.75;
margin-right: 4px;
border-radius: 15px;
border: 1px dotted silver;
}
.color-pick .color span {
display: inline-block;
mix-blend-mode: darken;
font-size: 11px;
padding-right: 4px;
padding-left: 4px;
}
.color-pick .color .cl {
float: left;
min-width: 25px;
height: 25px;
display: inline-block;
border-radius: 50%;
position: relative;
cursor: pointer;
}
.color-pick .color.active {
opacity: 1;
border: 1px solid black;
position: relative;
padding-right: 15px;
}
.color-pick .color.active .cl:after {
content: "✓";
right: 20%;
top: 5%;
position: absolute;
color: white;
mix-blend-mode: difference;
}
.x-mega-menu { .x-mega-menu {
background: #eeeeee; background: #eeeeee;
display: grid; display: grid;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -125,7 +125,12 @@ export default {
}, },
methods: { methods: {
changeImg:function ($k) { changeImg:function ($k) {
// console.log($k);
// console.log(this.onSelectImage);
// console.log(this.quantities);
this.quantities[this.onSelectImage].image = $k; this.quantities[this.onSelectImage].image = $k;
// console.log(this.quantities);
this.$forceUpdate();
}, },
showModal: function (i) { showModal: function (i) {
// this.showModal(i); // this.showModal(i);
@ -212,12 +217,16 @@ export default {
background: #FFFFFF99; background: #FFFFFF99;
z-index: 999; z-index: 999;
overflow-y: scroll; overflow-y: scroll;
backdrop-filter: blur(3px);
} }
#overlay img { #overlay img {
max-width: 100%; max-width: 100%;
width: 100%;
opacity: .75; opacity: .75;
height: 150px;
object-fit: cover;
} }
#overlay img.selected { #overlay img.selected {

@ -1,5 +1,6 @@
var data = require('./plugins/data'); var data = require('./plugins/data');
var isSendSms = false; var isSendSms = false;
var step = 1;
function nocomma(num) { function nocomma(num) {
a = num.toString().replace(/\,/g, ''); // 1125, but a string, so convert it to number a = num.toString().replace(/\,/g, ''); // 1125, but a string, so convert it to number
@ -268,5 +269,38 @@ jQuery(function ($) {
}); });
} }
}, 500); }, 500);
$(".next-step").bind('click', function () {
step++;
$(".step" + step).click();
});
$(".progress-step .step").click(function () {
$(".progress-step .step").removeClass('done');
$($(this).data('done')).addClass('done');
$("#card-steps .active").slideUp(300).removeClass('active');
$('#' + $(this).data('id')).slideDown(500).addClass('active');
step = parseInt($(this).data('id').substr(4, 1));
if ($(this).data('id') == 'step3') {
$(".last-step").slideDown(300);
$(".next-step").slideUp(300);
} else {
$(".last-step").slideUp(300);
$(".next-step").slideDown(300);
}
});
if ($('.card-submit').length > 0){
if ($("input.transport:checked").length == 0){
$('.card-submit').removeAttr('disabled');
}else{
$("input.transport").bind('change',function () {
console.log('fire');
$('.card-submit').removeAttr('disabled');
});
}
}
}); });

@ -403,3 +403,49 @@
transform: scale(1); transform: scale(1);
} }
} }
.color-pick {
}
.color-pick .color {
display: inline-block;
opacity: .75;
margin-right: 4px;
border-radius: 15px;
border: 1px dotted silver;
}
.color-pick .color span {
display: inline-block;
mix-blend-mode: darken;
font-size: 11px;
padding-right: 4px;
padding-left: 4px;
}
.color-pick .color .cl{
float: left;
min-width: 25px;
height: 25px;
display: inline-block;
border-radius: 50%;
position: relative;
cursor: pointer;
}
.color-pick .color.active {
opacity: 1;
border: 1px solid black;
position: relative;
padding-right: 15px;
}
.color-pick .color.active .cl:after {
content: '';
right: 20%;
top:5%;
position: absolute;
color: white;
mix-blend-mode: difference;
}

@ -1,3 +1,7 @@
.multiselect__tag{ .multiselect__tag{
background: dodgerblue; background: dodgerblue;
} }
.select2-container{
max-width: 97%;
}

@ -2,3 +2,29 @@
#xls-file,#optionz{ #xls-file,#optionz{
display: none; display: none;
} }
.cats-x3{
column-count: 4
}
/*-1000px width*/
@media (max-width: 1000px) {
.cats-x3{
column-count: 3
}
}
/*-600px width*/
@media (max-width: 600px) {
.cats-x3{
column-count: 2
}
}
/*-300px width*/
@media (max-width: 300px) {
.cats-x3{
column-count: 1
}
}

@ -381,8 +381,8 @@ jQuery(function ($) {
try { try {
if ($('#qnt').length != 0) { if ($('#qnt').length != 0) {
sizes = {}; sizes = {};
qnt = JSON.parse($('#qnt').val()); let qnt = JSON.parse($('#qnt').val());
// console.log(qnt); console.log(qnt);
let txt = ''; let txt = '';
for( const q of qnt) { for( const q of qnt) {
if (q.count > 0){ if (q.count > 0){
@ -401,17 +401,17 @@ jQuery(function ($) {
setTimeout(function () { setTimeout(function () {
$("#size-pick .size:first-child").click(); $("#size-pick .size:first-child").click();
},50); },50);
$("#size-pick .size").bind('click.select',function () { // $("#size-pick .size").bind('click.select',function () {
$("#size-pick .size").removeClass('active'); // $("#size-pick .size").removeClass('active');
let colorNames = {}; let colorNames = {};
try { try {
colorNames = JSON.parse($("#colors").val()); colorNames = JSON.parse($("#colors").val());
} catch { } catch {
} }
$(this).addClass('active'); // $(this).addClass('active');
let colors = sizes[$(this).data('id')]; let colors = sizes[$(this).data('id')];
let txt = ''; txt = '';
let cl = ''; let cl = '';
for( const c of colors) { for( const c of colors) {
cl = colorNames[c.color]; cl = colorNames[c.color];
@ -439,7 +439,7 @@ jQuery(function ($) {
$("#counting").text($(this).data('count')); $("#counting").text($(this).data('count'));
$(".product-count").attr('max',$(this).data('count')).val(1); $(".product-count").attr('max',$(this).data('count')).val(1);
}); });
}); // });
} }
} catch (e) { } catch (e) {

@ -1,69 +1 @@
axios = require('axios'); axios = require('axios'); window.axios = axios; window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest'; alertify = require('alertifyjs'); require('../js/bootstrap'); window._ = require('lodash'); require('bootstrap/dist/js/bootstrap.bundle') require('chart.js/dist/chart.min') var $ = window.jQuery = jQuery = require('jquery'); require('lightbox2/dist/js/lightbox.min'); require('owl.carousel/dist/owl.carousel.min'); require('xzoom/dist/xzoom.min'); window.Vue = require('vue').default; // require('./js/gsap.min.js'); // require('./js/Physics2DPlugin3.min'); // require('./js/mega-menu.js'); require('./js/product.js'); require('./js/theme.js'); require('./js/chart.js'); require('../js/customer.js'); // require('../js/') Vue.component('example-component', require('../js/components/ExampleComponent.vue').default); Vue.component('meta-price', require('../js/components/MetaPrice.vue').default); Vue.component('currency', require('../js/components/CurrencyInput.vue').default); Vue.component('meta-element', require('../js/components/MetaElement.vue').default); Vue.component('meta-search', require('../js/components/MetaSearch').default); var app = new Vue({ el: '#app', data: { metaz: '123', jdata: [], def: [], }, mounted() { }, created() { if (document.querySelector('#jDataSrc') !== undefined && document.querySelector('#jDataSrc') != null){ try { this.jdata = JSON.parse(document.querySelector('#jDataSrc').value); this.def = JSON.parse(document.querySelector('#jDef').value); } catch { console.log('json error: for meta product page'); } } }, methods: { }, watch:{ jdata:{ handler: function(n) { this.$refs.metaEl.updateJdata(n); // this.$refs.metaPr.updateJdata(n); }, deep: true }, } }); window.app = app;
window.axios = axios;
window.axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
alertify = require('alertifyjs');
require('../js/bootstrap');
window._ = require('lodash');
require('bootstrap/dist/js/bootstrap.bundle')
require('chart.js/dist/chart.min')
var $ = window.jQuery = jQuery = require('jquery');
require('lightbox2/dist/js/lightbox.min');
require('owl.carousel/dist/owl.carousel.min');
require('xzoom/dist/xzoom.min');
window.Vue = require('vue').default;
// require('./js/gsap.min.js');
// require('./js/Physics2DPlugin3.min');
// require('./js/mega-menu.js');
require('./js/product.js');
require('./js/theme.js');
require('./js/chart.js');
require('../js/customer.js');
// require('../js/')
Vue.component('example-component', require('../js/components/ExampleComponent.vue').default);
Vue.component('meta-price', require('../js/components/MetaPrice.vue').default);
Vue.component('currency', require('../js/components/CurrencyInput.vue').default);
Vue.component('meta-element', require('../js/components/MetaElement.vue').default);
Vue.component('meta-search', require('../js/components/MetaSearch').default);
var app = new Vue({
el: '#app',
data: {
metaz: '123',
jdata: [],
def: [],
},
mounted() {
},
created() {
if (document.querySelector('#jDataSrc') !== undefined && document.querySelector('#jDataSrc') != null){
try {
this.jdata = JSON.parse(document.querySelector('#jDataSrc').value);
this.def = JSON.parse(document.querySelector('#jDef').value);
} catch {
console.log('json error: for meta product page');
}
}
},
methods: {
},
watch:{
jdata:{
handler: function(n) {
this.$refs.metaEl.updateJdata(n);
// this.$refs.metaPr.updateJdata(n);
},
deep: true
},
}
});
window.app = app;

@ -2,17 +2,12 @@
<div class="row"> <div class="row">
<div class="col-md-6 mt-3"> <div class="col-md-6 mt-3">
<div class="form-group pt-3" > <div class="form-group pt-3" >
<br>
<label for="active">
{{__('Active')}}
</label>
<input name="active" type="checkbox" id="active"
class="float-left ml-4 mt-1 form-check-inline @error('active') is-invalid @enderror" <div class="form-check form-switch">
@if (old('active',$product->active??0) != 0) <input name="active" class="form-check-input @error('active') is-invalid @enderror" type="checkbox" value="1" id="active" @if (old('active',$product->active??0) != 0)
checked checked
@endif @endif>
value="1"/> <label class="form-check-label" for="active">{{__('Active')}}</label>
</div> </div>
</div> </div>
</div> </div>

@ -35,7 +35,7 @@
<div class="form-group"> <div class="form-group">
<label for="width">{{__("Width")}}:</label> <label for="width">{{__("Width")}}:</label>
<input type="text" placeholder="{{__("Width")}}" name="width" class="form-control" id="width" required <input type="text" placeholder="{{__("Width")}}" name="width" class="form-control" id="width" required
value="{{old('width',$p->width??null)}}"> value="{{old('width',$p->width??'col-md-12')}}">
</div> </div>
<div class="form-group"> <div class="form-group">
@ -81,20 +81,33 @@
</select> </select>
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="category">{{__("Category")}}</label> <label>{{__("Category")}}</label>
<select {{-- <select--}}
multiple {{-- multiple--}}
name="category[]" {{-- name="category[]"--}}
id="category" {{-- id="category"--}}
class="form-control" {{-- class="form-control"--}}
data-placeholder="Select category" {{-- data-placeholder="Select category"--}}
required> {{-- required>--}}
<option value=""></option> {{-- <option value=""></option>--}}
@foreach($allCategories as $cat) {{-- @foreach($allCategories as $cat)--}}
<option value="{{ $cat->id }}" {{-- <option value="{{ $cat->id }}"--}}
@if(isset($cats) && in_array($cat->id,$cats)) selected @endif > {{$cat->name}} </option> {{-- @if(isset($cats) && in_array($cat->id,$cats)) selected @endif > {{$cat->name}} </option>--}}
{{-- @endforeach--}}
{{-- </select>--}}
{{-- --}}
<div class="cats-x3">
@foreach($allCategories as $k => $cat)
<div class="form-check form-switch">
<input class="form-check-input" value="{{ $cat->id }}"
@if(isset($cats) && in_array($cat->id,$cats)) checked @endif name="category[]"
type="checkbox" id="c{{$k}}">
<label class="form-check-label" for="c{{$k}}"> {{$cat->name}} </label>
</div>
@endforeach @endforeach
</select> </div>
</div> </div>
<div> <div>
</div> </div>
@ -102,7 +115,8 @@
<label> <label>
{{__("Is effective price?")}} {{__("Is effective price?")}}
</label> </label>
<input type="checkbox" @if( isset($p) && $p->priceable) checked @endif name="priceable" class="form-check"> <input type="checkbox" @if( isset($p) && $p->priceable) checked @endif name="priceable"
class="form-check">
</div> </div>
<div class="card-header"> <div class="card-header">
{{__("Icon")}} {{__("Icon")}}
@ -137,7 +151,9 @@
</h2> </h2>
<div class="content"> <div class="content">
</div> </div>
<div class="btn btn-success m-2" style="float: left" id="add-options"> <div class="fa fa-plus"></div></div> <div class="btn btn-success m-2" style="float: left" id="add-options">
<div class="fa fa-plus"></div>
</div>
</div> </div>
<div class="clearfix"></div> <div class="clearfix"></div>
<div class="form-group"> <div class="form-group">

@ -45,16 +45,19 @@
<label for="description"> <label for="description">
{{__('Description')}} {{__('Description')}}
</label> </label>
<textarea name="description" rows="4" class="form-control @error('description') is-invalid @enderror" placeholder="{{__('Description')}}" >{{old('description',$transport->description??null)}}</textarea> <textarea name="description" rows="4" class="form-control @error('description') is-invalid @enderror" placeholder="{{__('Description')}}" @if( isset($transport) && $transport->is_default) checked @endif >{{old('description',$transport->description??null)}}</textarea>
</div> </div>
</div> </div>
<div class="col-md-12 mt-3 mr-5"> <div class="col-md-12 mt-3 mr-5">
<div class="form-group"> <div class="form-group">
<input id="is_default" name="is_default" type="checkbox" class="form-check-input @error('is_default') is-invalid @enderror" @if( isset($transport) && $transport->is_default) checked @endif/>
<label class="form-check-label" for="is_default"> <div class="form-check form-switch">
{{__('Is default')}} <input value="1" class="form-check-input @error('is_default') is-invalid @enderror" name="is_default" @if( isset($transport) && $transport->is_default) checked @endif type="checkbox" id="is_default">
</label> <label class="form-check-label" for="is_default"> {{__('Is default')}}</label>
</div>
</div> </div>
</div> </div>
<div class="col-md-12"> <div class="col-md-12">
<label> &nbsp; </label> <label> &nbsp; </label>

@ -13,11 +13,13 @@
<i class="fa fa-shopping-bag"></i> <i class="fa fa-shopping-bag"></i>
سبد خرید سبد خرید
</div> </div>
<div class="step step2" data-id="step2" data-done=".progress-step .step1,.progress-step .step2"> <div class="step step2" data-id="step2"
data-done=".progress-step .step1,.progress-step .step2">
<i class="fa fa-truck-fast"></i> <i class="fa fa-truck-fast"></i>
اطلاعات ارسال اطلاعات ارسال
</div> </div>
<div class="step step3" data-id="step3" data-done=".progress-step .step1,.progress-step .step2, .progress-step .step3"> <div class="step step3" data-id="step3"
data-done=".progress-step .step1,.progress-step .step2, .progress-step .step3">
<i class="fa fa-credit-card"></i> <i class="fa fa-credit-card"></i>
اطلاعات پرداخت اطلاعات پرداخت
</div> </div>
@ -74,7 +76,8 @@
@endif @endif
@endforeach @endforeach
@else @else
<span class="active" data-count="{{$pro->stock_quantity}}"></span> <span class="active"
data-count="{{$pro->stock_quantity}}"></span>
@foreach(\App\Helpers\getPriceableMeta($pro) as $k => $meta) @foreach(\App\Helpers\getPriceableMeta($pro) as $k => $meta)
<div class="meta"> <div class="meta">
{{\App\Helpers\getPropLabel($k)}} {{\App\Helpers\getPropLabel($k)}}
@ -89,7 +92,8 @@
@endforeach @endforeach
@endif @endif
</td> </td>
<td colspan="2" class="price-td" data-price="{{$pro->getPurePrice()}}"> <td colspan="2" class="price-td"
data-price="{{$pro->getPurePrice()}}">
@if($pro->getPurePrice() == 0) @if($pro->getPurePrice() == 0)
{{__("We call you about price soon.")}} {{__("We call you about price soon.")}}
@else @else
@ -105,8 +109,10 @@
<div class="btn btn-info count-inc"> <div class="btn btn-info count-inc">
<i class="fa fa-plus"></i> <i class="fa fa-plus"></i>
</div> </div>
<input type="number" data-stock="{{$pro->stock_quantity}}" <input type="number"
max="{{$pro->stock_quantity}}" name="count[{{$pro->id}}]" data-stock="{{$pro->stock_quantity}}"
max="{{$pro->stock_quantity}}"
name="count[{{$pro->id}}]"
min="1" min="1"
data-price="{{str_replace(',','',$pro->getPurePrice())}}" data-price="{{str_replace(',','',$pro->getPurePrice())}}"
class="form-control product-count" class="form-control product-count"
@ -117,7 +123,8 @@
</div> </div>
</td> </td>
<td> <td>
<a href="{{route('card.rem',$pro->slug)}}" class="btn btn-outline-danger"> <a href="{{route('card.rem',$pro->slug)}}"
class="btn btn-outline-danger">
<i class="fa fa-times"></i> <i class="fa fa-times"></i>
</a> </a>
</td> </td>
@ -129,7 +136,8 @@
<td> <td>
<a href="{{route('product',$qpro->product->slug)}}"> <a href="{{route('product',$qpro->product->slug)}}">
<img src="{{$qpro->product->thumbUrl()}}" class="img-64" alt=""> <img src="{{$qpro->product->thumbUrl()}}" class="img-64"
alt="">
</a> </a>
</td> </td>
<td colspan="2"> <td colspan="2">
@ -137,14 +145,15 @@
</td> </td>
<td colspan="2"> <td colspan="2">
@php($data = json_decode($qpro->data)) @php($data = json_decode($qpro->data))
<span class="badge badge-inverse" style="background: {{$data->color}};"> <span class="badge badge-inverse"
style="background: {{$data->color}};">
<b> <b>
{{\App\Helpers\getColorName($data->color)}} {{\App\Helpers\getColorName($data->color)}}
</b> </b>
</span> </span>
<span class="badge bg-dark"> {{-- <span class="badge bg-dark">--}}
{{$data->size}} {{-- {{$data->size}}--}}
</span> {{-- </span>--}}
</td> </td>
<td colspan="2" class="price-td" data-price="{{$qpro->price}}"> <td colspan="2" class="price-td" data-price="{{$qpro->price}}">
@if($qpro->price == 0) @if($qpro->price == 0)
@ -162,7 +171,8 @@
<div class="btn btn-info count-inc"> <div class="btn btn-info count-inc">
<i class="fa fa-plus"></i> <i class="fa fa-plus"></i>
</div> </div>
<input type="number" data-stock="{{$qpro->count}}" max="{{$qpro->count}}" <input type="number" data-stock="{{$qpro->count}}"
max="{{$qpro->count}}"
name="qcount[{{$qpro->id}}]" name="qcount[{{$qpro->id}}]"
min="1" min="1"
data-price="{{$qpro->price}}" data-price="{{$qpro->price}}"
@ -174,7 +184,8 @@
</div> </div>
</td> </td>
<td> <td>
<a href="{{route('card.remq',$qpro->id)}}" class="btn btn-outline-danger"> <a href="{{route('card.remq',$qpro->id)}}"
class="btn btn-outline-danger">
<i class="fa fa-times"></i> <i class="fa fa-times"></i>
</a> </a>
</td> </td>
@ -183,6 +194,8 @@
@endforeach @endforeach
</table> </table>
</div> </div>
@if(\App\Helpers\getSetting('reserve') != null )
<div class="alert alert-success text-center"> <div class="alert alert-success text-center">
شما می‌توانید محصولات را رزرو کنید , برای اینکار به مرحله بعدی بروید و شما می‌توانید محصولات را رزرو کنید , برای اینکار به مرحله بعدی بروید و
<b> <b>
@ -193,6 +206,7 @@
را انتخاب کنید را انتخاب کنید
</div> </div>
@endif
</div> </div>
<div id="step2" class="step"> <div id="step2" class="step">
@if(count($transports) > 0) @if(count($transports) > 0)
@ -207,6 +221,7 @@
<input id="tns{{$k}}" type="radio" name="transport_id" <input id="tns{{$k}}" type="radio" name="transport_id"
data-price="{{$t->price}}" data-price="{{$t->price}}"
value="{{$t->id}}" value="{{$t->id}}"
required
onclick="$('.product-count').change();" onclick="$('.product-count').change();"
@if ($t->is_default) checked @if ($t->is_default) checked
@endif class="form-check-input transport"> @endif class="form-check-input transport">
@ -215,8 +230,13 @@
{{$t->title}} {{$t->title}}
</label> </label>
@if(strlen($t->description) > 1) @if(strlen($t->description) > 1)
<p class="preline alert alert-info mt-1">{{$t->description}} <span <p class="preline alert alert-info mt-1">{{$t->description}}
class="float-end">@if($t->price > 0){{number_format($t->price)}} @else {{__("Free")}} @endif</span> <span
class="float-end">@if($t->price > 0)
{{number_format($t->price)}}
@else
{{__("Free")}}
@endif</span>
</p> </p>
@endif @endif
</li> </li>
@ -249,14 +269,17 @@
@endforeach @endforeach
@endif @endif
</ul> </ul>
@if(\App\Helpers\getSetting('reserve') != null )
<div class="p-5 py-3" id="resv"> <div class="p-5 py-3" id="resv">
<div class="form-check form-switch"> <div class="form-check form-switch">
<input name="reserve" class="form-check-input" type="checkbox" role="switch" <input name="reserve" class="form-check-input" type="checkbox"
role="switch"
id="flexSwitchCheckDefault"> id="flexSwitchCheckDefault">
<label class="form-check-label" <label class="form-check-label"
for="flexSwitchCheckDefault">{{__("Reserve order for :H hours",['H'=>\App\Helpers\getSetting('reserve')])}}</label> for="flexSwitchCheckDefault">{{__("Reserve order for :H hours",['H'=>\App\Helpers\getSetting('reserve')])}}</label>
</div> </div>
</div> </div>
@endif
@endif @endif
<div> <div>
@ -293,7 +316,8 @@
</label> </label>
<div class="row"> <div class="row">
<div class="col-md-6"> <div class="col-md-6">
<input type="text" class="form-control" id="discount-code" name="discount" <input type="text" class="form-control" id="discount-code"
name="discount"
placeholder="{{__("Discount code")}}"> placeholder="{{__("Discount code")}}">
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
@ -360,18 +384,20 @@
تکمیل اطلاعات تکمیل اطلاعات
</a> </a>
@else @else
<button type="submit" class="btn btn-success float-end me-3 ms-3"> <button type="submit" class="btn btn-success float-end my-2 w-100 card-submit" >
<i class="far fa-credit-card"></i> <i class="far fa-credit-card"></i>
پرداخت از درگاه های آنلاین پرداخت از درگاه های آنلاین
</button> </button>
<button type="submit" class="btn btn-secondary float-end " name="nopay" value="no-payment"> <button type="submit" class="btn btn-secondary float-end w-100 card-submit" name="nopay"
value="no-payment" >
<i class="far fa-credit-card"></i> <i class="far fa-credit-card"></i>
ثبت سفارش پرداخت اعتباری + آنلاین ثبت سفارش پرداخت اعتباری + آنلاین
</button> </button>
<br> <br>
<br> <br>
@endif @endif
&nbsp;@else &nbsp;
@else
{{-- {{__("Register or login to complete purchase")}}--}} {{-- {{__("Register or login to complete purchase")}}--}}
<hr> <hr>
<br> <br>

@ -139,17 +139,29 @@
</th> </th>
<td> <td>
<div class="color-pick"> <div class="color-pick">
<input type="hidden" class="color" value="red"/>
@php $colors = json_decode(\App\Helpers\getProp('color')->options,'true'); @endphp
@foreach($colors as $c)
<div style="background: {{$c['value']}}" data-color="{{$c['value']}}"
class="color @if($c['value'] == $pro->getMeta('color')) active @endif"></div>
@endforeach
</div> </div>
</td> </td>
</tr> </tr>
@endif @endif
<tr>
<th style="vertical-align: middle">
تعداد
</th>
<td>
{{-- <div id="counting" class="text-muted float-start mt-2"></div>--}}
<div class="product-count d-inline-block">
<div class="btn btn-info count-inc" style="padding: 2px 5px">
<i class="fa fa-plus"></i>
</div>
<input type="number" id="single-count" class="product-count"
value="1" max="1">
<div class="btn btn-info count-dec" style="padding: 2px 5px">
<i class="fa fa-minus"></i>
</div>
</div>
</td>
</tr>
@if($pro->hasMeta('warranty')) @if($pro->hasMeta('warranty'))
<tr> <tr>
<th> <th>
@ -199,8 +211,8 @@
</a> </a>
</div> </div>
<div class="col"> <div class="col">
<a href="{{route('card.add',$pro->slug)}}" <a href="{{route('card.addq',['',''])}}"
class="add-to-card btn btn-primary w-100 mt-1"> class="add-to-card-q btn btn-primary w-100 mt-1">
<img src="{{asset('images/basket.svg')}}" class="basket-icon" alt=""> <img src="{{asset('images/basket.svg')}}" class="basket-icon" alt="">
افزودن به سبد خرید افزودن به سبد خرید
</a> </a>
@ -219,6 +231,7 @@
</ul> </ul>
<div class="tab-container"> <div class="tab-container">
<div id="tab-detail" class="active"> <div id="tab-detail" class="active">
<table class="table table-bordered attribute "> <table class="table table-bordered attribute ">
@foreach($pro->getAllMeta() as $k => $meta) @foreach($pro->getAllMeta() as $k => $meta)
@if($k != 'color' && $k != 'warranty') @if($k != 'color' && $k != 'warranty')
@ -374,6 +387,7 @@
</div> </div>
</div> </div>
</div> </div>
</section> </section>
<input type="hidden" id="qn" value=""> <input type="hidden" id="qn" value="">
<input type="hidden" id="qnt" value='{!! $pro->quantities()->orderBy('price')->get();!!}'> <input type="hidden" id="qnt" value='{!! $pro->quantities()->orderBy('price')->get();!!}'>

Loading…
Cancel
Save