diff --git a/resources/views/segments/product/ProductYasamin/ProductYasamin.blade.php b/resources/views/segments/product/ProductYasamin/ProductYasamin.blade.php new file mode 100644 index 0000000..354dbf9 --- /dev/null +++ b/resources/views/segments/product/ProductYasamin/ProductYasamin.blade.php @@ -0,0 +1,177 @@ +
+
+
+
+ @foreach($product->getMedia() as $media) +
+ + {{$product->name}} + +
+ @endforeach +
+
+
+ +

+ {{$product->name}} +

+
+ +
+ @if($product->sku != null && $product->sku != '') +
+ + + {{__("SKU")}}: + + + {{$product->sku}} + +
+ @endif +
+
+ {{$product->getPrice()}} +
+ + @if($product->hasDiscount()) +
+ {{$product->oldPrice()}} +
+ @endif +
+
+ @if($product->quantities()->count()>0) + __('Add to card')])' + @if($product->hasDiscount()) + :discount='@json($product->activeDiscounts()->first())' + @endif + > + @else + + @endif +

+ {{__("Description")}} +

+
+
+ {{$product->excerpt}} +
+ {!! $product->description !!} + + @if($product->table != null || trim($product->table) != '') + {!! $product->table !!} + @endif + + + + + + + @foreach($product->fullMeta() as $meta) + + + + + @endforeach +
+ {{__("Item")}} + + {{__("Value")}} +
+ +   + {{$meta['data']->label}} + + {!! $meta['human_value'] !!} +
+ + @if(auth('customer')->check()) +
+ @csrf + + + @foreach($product->evaluations() as $e) + +
+ @endforeach + +
+ @endif +
+ + + @if($product->categories()->count() > 0) +
+ + {{__("Categories")}}: + + @foreach($product->categories()->where('id','<>',$product->category->id)->get() as $cat) + + {{$cat->name}}, + + @endforeach + + {{$product->category->name}} + +
+ @endif + @if($product->tags()->count() > 0) +
+ + {{__("Tags")}}: + + @foreach($product->tags as $tag) + + + {{$tag->name}} + + @endforeach +
+ @endif +
+
+

+ {{__("Related products")}} +

+
+ @foreach($product->category->products()->where('status',1)->limit(10)->get() as $p) +
+ @include(\App\Models\Area::where('name','product-grid')->first()->defPart(),['$product' => $p]) +
+ @endforeach +
+
+
+
diff --git a/resources/views/segments/product/ProductYasamin/ProductYasamin.js b/resources/views/segments/product/ProductYasamin/ProductYasamin.js new file mode 100644 index 0000000..16efee5 --- /dev/null +++ b/resources/views/segments/product/ProductYasamin/ProductYasamin.js @@ -0,0 +1,43 @@ +import Lightbox from "bs5-lightbox"; +import {tns} from "tiny-slider"; + +var YacRelativeSlider; +document.addEventListener('DOMContentLoaded',function () { + for (const el of document.querySelectorAll('.light-box')) { + el.addEventListener('click', Lightbox.initialize); + } + + try { + YacRelativeSlider = tns({ + container: '#rel-products', + items: 3, + autoplay: true, + autoplayButton: false, + // nextButton: false, + controls: false, + autoplayHoverPause: true, + mouseDrag: true, + gutter: 5, + slideBy: 1, + autoplayTimeout: 5000, + responsive:{ + 560:{ + items: 1, + }, + 768:{ + items: 2, + }, + 1000:{ + items: 4, + }, + 1400:{ + items: 5, + }, + + } + // speed:10000, + }); + } catch { + } + +}); diff --git a/resources/views/segments/product/ProductYasamin/ProductYasamin.json b/resources/views/segments/product/ProductYasamin/ProductYasamin.json new file mode 100644 index 0000000..9003050 --- /dev/null +++ b/resources/views/segments/product/ProductYasamin/ProductYasamin.json @@ -0,0 +1,10 @@ +{ + "name": "ProductYasamin", + "version": "1.0", + "author": "xStack", + "email": "xshop@xstack.ir", + "license": "GPL-3.0-or-later", + "url": "https:\/\/xstack.ir", + "author_url": "https:\/\/4xmen.ir", + "packages": [] +} \ No newline at end of file diff --git a/resources/views/segments/product/ProductYasamin/ProductYasamin.php b/resources/views/segments/product/ProductYasamin/ProductYasamin.php new file mode 100644 index 0000000..c70eea1 --- /dev/null +++ b/resources/views/segments/product/ProductYasamin/ProductYasamin.php @@ -0,0 +1,21 @@ +