This commit is contained in:
Shohrat 2023-10-12 20:59:00 +00:00
parent 2205f56b8e
commit e617221538
55 changed files with 2987 additions and 594 deletions

View File

@ -21,6 +21,28 @@ class VendorApiController extends Controller
$this->helpers = $helpers;
}
public function deleteVendor(Request $request){
$data = $request->all();
$currentUser = \JWTAuth::parseToken()->authenticate();
$vendor = Vendor::where("id", $currentUser->id)->delete();
if($vendor){
return response()->json(["message"=>"deleted"], 200);
}else{
return $this->helpers->apiArrayResponseBuilder(400, 'fail');
}
}
public function updateVendor(Request $request){
$data = $request->all();

View File

@ -49,6 +49,7 @@ Route::group(['prefix' =>'api/v1','namespace' =>'AhmadFatoni\ApiGenerator\Contro
Route::middleware(['\Tymon\JWTAuth\Middleware\GetUserFromToken'])->group(function () {
Route::delete('delete/account', 'VendorApiController@deleteVendor');
Route::post('make/order', 'OrderApiController@createOrder');
Route::get('my/orders', 'OrderApiController@myOrders');

93
plugins/default.htm Normal file
View File

@ -0,0 +1,93 @@
{% set user = __SELF__.user %}
<!-- Breadcumb Area -->
<div class="breadcumb_area">
<div class="container h-100">
<div class="row h-100 align-items-center">
<div class="col-12">
<h5>Dükanyň sazlamalary</h5>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ 'index'|page }}">Esasy sahypa</a></li>
<li class="breadcrumb-item active">{{ user.name }}</li>
</ol>
</div>
</div>
</div>
</div>
<!-- Breadcumb Area -->
<!-- My Account Area -->
<section class="my-account-area section_padding_50">
<div class="container">
<div class="row">
<div class="col-12 col-lg-12">
<div class="my-account-content mb-50">
<div class="single_catagory_slide">
<a href="{{ 'user-profile'|page({id: user.id}) }}" style="display: inline;">
<img src="{{ user.logo|media|resize(127, 127, { mode: 'crop' }) }}" alt="{{ user.name }}">
</a>
<p class="mt-3">{{ user.name }}</p>
</div>
</div>
</div>
<div class="col-12 col-lg-12">
<div class="my-account-content mb-50">
<h5 class="mb-3">Dükan maglumatlary</h5>
<form action="#" method="post" id="vendorForm"
data-request="onSave"
data-request-flash
data-request-validate
data-request-files
data-request-success="resetForm()"
data-request-error="resetForm()"
>
<div class="row">
<div class="col-12 col-lg-6">
<div class="form-group">
<label for="firstName">Dükanyň ady</label>
<input type="text" class="form-control" name="vendorName" id="vendorName" value="{{ user.shop_title }}" placeholder="Dükanyň ady" required>
</div>
</div>
<div class="col-12 col-lg-6">
<div class="form-group">
<label for="lastName">Slogan</label>
<input type="text" class="form-control" name="slogan" id="slogan" value="{{ user.slogan }}" placeholder="Slogan" required>
</div>
</div>
<div class="col-12">
<div class="form-group">
<label for="displayName">Iş wagty</label>
<input type="text" class="form-control" name="workTime" id="workTime" value="{{ user.work_time }}" placeholder="Iş wagty" required>
</div>
</div>
<div class="col-12">
<div class="form-group">
<label for="emailAddress">Beýan</label>
<input type="text" class="form-control" name="description" id="description" value="{{ user.description }}" placeholder="Beýan" required>
</div>
</div>
<div class="col-12">
<button type="submit" class="btn btn-primary">Üýtgetmek</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
<!-- My Account Area -->
{% put scripts %}
<script>
function resetForm() {
document.getElementById('vendorForm').reset(); // Reset the form
}
</script>
{% endput %}

View File

@ -1,50 +1,54 @@
# ===================================
# Column Definitions
# ===================================
columns:
id:
label: rainlab.user::lang.user.id
invisible: true
label: 'rainlab.user::lang.user.id'
type: number
invisible: false
username:
label: rainlab.user::lang.user.username
label: 'rainlab.user::lang.user.username'
type: text
searchable: true
invisible: true
name:
label: rainlab.user::lang.user.name
label: 'rainlab.user::lang.user.name'
type: text
searchable: true
surname:
label: rainlab.user::lang.user.surname
label: 'rainlab.user::lang.user.surname'
type: text
searchable: true
invisible: true
email:
label: rainlab.user::lang.user.email
label: 'rainlab.user::lang.user.email'
type: text
searchable: true
created_at:
label: rainlab.user::lang.user.created_at
label: 'rainlab.user::lang.user.created_at'
type: timetense
last_seen:
label: rainlab.user::lang.user.last_seen
label: 'rainlab.user::lang.user.last_seen'
type: timetense
is_guest:
label: rainlab.user::lang.user.is_guest
label: 'rainlab.user::lang.user.is_guest'
type: switch
invisible: true
created_ip_address:
label: rainlab.user::lang.user.created_ip_address
label: 'rainlab.user::lang.user.created_ip_address'
type: text
searchable: true
invisible: true
last_ip_address:
label: rainlab.user::lang.user.last_ip_address
label: 'rainlab.user::lang.user.last_ip_address'
type: text
searchable: true
invisible: true
shop_title:
label: MAGAZINY
type: text
searchable: true
is_featured:
label: 'Bas sahypadamy'
type: switch
sortable: true
type:
label: Gornushi
type: text

View File

@ -343,16 +343,23 @@ class Plugin extends PluginBase
'TPS\Birzha\Components\Offers' => 'offers',
'TPS\Birzha\Components\FilteredProducts' => 'filteredProducts',
'TPS\Birzha\Components\Singleoffer' => 'singleoffer',
'TPS\Birzha\Components\ShopSettings' => 'shopsettings',
'TPS\Birzha\Components\OfferForm' => 'offerform',
'TPS\Birzha\Components\Messages' => 'messages',
'TPS\Birzha\Components\PaymentApi' => 'paymentapi',
'TPS\Birzha\Components\MyOffers' => 'myOffers',
'TPS\Birzha\Components\MyComments' => 'mycomments',
'TPS\Birzha\Components\MyFavourites' => 'myfavourites',
'TPS\Birzha\Components\UserOffers' => 'userOffers',
'TPS\Birzha\Components\SearchOffers' => 'searchOffers',
'TPS\Birzha\Components\VendorSales' => 'vendorsales',
'TPS\Birzha\Components\SingleSale' => 'singlesale',
'TPS\Birzha\Components\Balance' => 'balance',
'TPS\Birzha\Components\ContactForm' => 'contactForm',
'TPS\Birzha\Components\EmailVerify' => 'emailverify',
'TPS\Birzha\Components\Birzhadocs' => 'birzhadocs',
'TPS\Birzha\Components\CategoryProfile' => 'categoryprofile',
'TPS\Birzha\Components\Checkout' => 'checkout',
];
}

View File

@ -0,0 +1,57 @@
<?php namespace TPS\Birzha\Components;
use Cms\Classes\ComponentBase;
use TPS\Birzha\Models\Category;
use TPS\Birzha\Models\Product;
use TPS\Birzha\Models\City;
use Session;
use DB;
class CategoryProfile extends ComponentBase
{
public $category;
public $users;
public function componentDetails() {
return [
'name' => 'Category profile',
'description' => 'Category profile page component',
];
}
public function defineProperties()
{
return [
'categorySlug' => [
'title' => 'Select by category :slug',
'description' => 'Select by category',
'type' => 'string',
'default' => ''
],
];
}
public function onRun() {
$this->users = $this->getCategoryUsers();
$this->category = $this->getCategory();
}
protected function getCategory(){
$cSlug = $this->property('categorySlug');
$category = Category::transWhere('slug', $cSlug, Session::get('rainlab.translate.locale'))->with('users')->first();
return $category;
}
protected function getCategoryUsers(){
$cSlug = $this->property('categorySlug');
$category = Category::where('slug', $cSlug)->first();
$users = $category->users()->get();
// dd($users);
return $users;
}
}

View File

@ -0,0 +1,90 @@
<?php namespace TPS\Birzha\Components;
use Cms\Classes\ComponentBase;
use Illuminate\Support\Facades\Config;
use October\Rain\Exception\AjaxException;
use October\Rain\Support\Facades\Event;
use TPS\Birzha\Models\Payment;
use RainLab\User\Facades\Auth;
use Validator;
use TPS\Birzha\Models\Product;
use TPS\Birzha\Models\Orders;
use TPS\Birzha\Models\OrderItems;
use TPS\Birzha\Models\VendorSales;
use Flash;
class Checkout extends ComponentBase
{
public function componentDetails()
{
return [
'name' => 'Checkout',
'description' => 'Checkout page'
];
}
public function onCreateOrder(){
$data = post();
$rules = [
'note' => 'required',
'address' => 'required',
'items' => 'required',
];
$this->validateForm($data, $rules);
$objects = json_decode($data["items"], true);
if(count($objects) == 0){
Flash::error('Haryt ýok. Ýalňyşlyk');
return 500;
}
$order = new Orders;
$order->user_id = \Auth::user()->id;
$order->note = $data["note"];
$order->address = $data["address"];
$order->status = "new";
$order->save();
//[{"item":34,"qty":1},{"item":35,"qty":3}]
$orderItem = new OrderItems;
$orderItem->order_id = $order->id;
$orderItem->items = json_decode($data["items"]);
$orderItem->save();
//dd($orderItem->items[0]["item"]);
for ($i = 0; $i < count($orderItem->items); $i++) {
$vendorSale = new VendorSales;
$vendorSale->order_id = $order->id;
$vendorSale->vendor_id = $orderItem->items[$i]["vendor"];
$vendorSale->product_id = $orderItem->items[$i]["item"];
$vendorSale->qty = $orderItem->items[$i]["qty"];
$vendorSale->price = $orderItem->items[$i]["price"];
$vendorSale->note = $data["note"];
$vendorSale->save();
}
if ($order && $orderItem && $vendorSale){
Flash::success('Sargyt ugradyldy');
}else{
Flash::error('Sargyt ugradylmady');
return 500;
}
}
protected function validateForm($data, $rules) {
$validator = Validator::make($data, $rules);
if($validator->fails()) {
throw new ValidationException($validator);
}
}
}

View File

@ -0,0 +1,50 @@
<?php namespace TPS\Birzha\Components;
use Cms\Classes\ComponentBase;
use TPS\Birzha\Models\Product;
use Input;
use Flash;
class MyComments extends ComponentBase
{
/**
* @var Collection A collection of user's posts
*/
public $comments;
public function componentDetails()
{
return [
'name' => 'MyComments List',
'description' => 'List of my comments'
];
}
public function defineProperties()
{
return [
'perPage' => [
'title' => 'Number of offers',
'description' => 'How many offers do you want to display',
'default' => 12,
'validationPattern' => '^[0-9]+$',
'validationMessage' => 'Only numbers allowed'
],
];
}
public function onRun() {
$this->comments = $this->loadComments();
}
protected function loadComments() {
$perPage = $this->property('perPage');
return \Auth::user()->comments()
->orderBy('updated_at', 'desc')
->paginate($perPage);
}
}

View File

@ -0,0 +1,58 @@
<?php namespace TPS\Birzha\Components;
use Cms\Classes\ComponentBase;
use TPS\Birzha\Models\Product;
use TPS\Birzha\Models\Favourites;
use Input;
use Flash;
class MyFavourites extends ComponentBase
{
/**
* @var Collection A collection of user's posts
*/
public $favourites;
public function componentDetails()
{
return [
'name' => 'MyFavourites List',
'description' => 'List of my favourite products',
];
}
public function defineProperties()
{
return [
'perPage' => [
'title' => 'Number of offers',
'description' => 'How many offers do you want to display',
'default' => 12,
'validationPattern' => '^[0-9]+$',
'validationMessage' => 'Only numbers allowed'
],
];
}
public function onRun() {
$this->favourites = $this->loadFavourites();
}
public function onRemove(){
$data = post();
$favourites = Favourites::where("user_id", \Auth::user()->id)->where("product_id", $data["product_id"])->first();
$favourites->delete();
return \Redirect::back();
}
protected function loadFavourites() {
$perPage = $this->property('perPage');
return \Auth::user()->favourites()
->orderBy('updated_at', 'desc')
->paginate($perPage);
}
}

View File

@ -150,6 +150,86 @@ class OfferForm extends ComponentBase
Flash::success('Haryt goşuldy');
}
public function onUpdate(){
$data = post();
$rules = [
'name' => 'required',
'price' => 'required|numeric',
'state_id' => 'required',
'description' => 'required',
'new_img' => 'array',
// 'is_file' => 'required',
'new_img.*' => 'mimes:jpg,png|max:1024',
'category_id' => [
'required',
'exists:tps_birzha_categories,id',
function ($attribute, $value, $fail) {
$c = Category::find($value);
if($c) {
if($c->status != 1) $fail(":attribute is non-active!");
}
}
],
];
$this->validateForm($data, $rules);
$category = null;
if($data["subcategory_id"] != 'null'){
$category = Category::find($data['subcategory_id']);
}else{
$category = Category::find($data['category_id']);
}
$product = Product::where("vendor_id", \Auth::user()->id)->where("id", $data['product_id'])->first();
if(!$product){
Flash::error('Haryt tapylmady');
}
$product->name = $data['name'];
$product->description = $data['description'];
$product->short_description = $data['short_description'];
$product->slug = \Str::slug($data['name'],'-');
$product->status = 'new';
$product->place_id = $data['city_id'] == 'null' ? $data['state_id'] : $data['city_id'];
$product->price = $data['price'];
$product->phone = $data['phone'];
$product->is_file_product = $data['is_file'];
if(isset($data['new_file'])){
foreach($product->files as $file){
$file->delete();
}
foreach($data['new_file'] ?? [] as $key => $fileq) {
$product->files = $fileq;
$product->save();
}
}
if(isset($data['new_img'])){
foreach($product->images as $image){
$image->delete();
}
foreach($data['new_img'] ?? [] as $key => $img) {
$product->images = $img;
$product->save();
}
}
$user = Auth::user();
$product->vendor_id = $user->id;
$product->ends_at = null;
if(!isset($data['product_id'])) {
$category->products()->save($product);
} else {
$product->categories()->detach();
$category->products()->save($product);
}
$product->save();
Flash::success('Haryt maglumaty üýtgedildi. Tassyklanýança garaşmagyňyzy haýyş edýäris.');
}
// step 2
public function onOfferFill() {
$data = input();
@ -317,9 +397,9 @@ class OfferForm extends ComponentBase
$this->productIdOption = $this->property('productId');
if($this->productIdOption) {
$this->productForEditing = Product::find($this->productIdOption);
if($this->productForEditing->status == 'new' || ($this->productForEditing->status == 'approved' && $this->productForEditing->ends_at >= \Carbon\Carbon::now())) {
return \Redirect::to('my-posts');
$this->productForEditing = Product::where("vendor_id", \Auth::user()->id)->where("id", $this->productIdOption)->first();
if(!$this->productForEditing){
return \Redirect::to('/');
}
} else {
$this->productForEditing = null;

View File

@ -0,0 +1,66 @@
<?php namespace TPS\Birzha\Components;
use Cms\Classes\ComponentBase;
use TPS\Birzha\Models\Product;
use RainLab\User\Models\User;
use Flash;
use ValidationException;
use Validator;
class ShopSettings extends ComponentBase
{
public $user;
public function componentDetails()
{
return [
'name' => 'Shop settings',
'description' => 'Shop settings'
];
}
public function onRun() {
$this->user = $this->loadShopSettings();
}
protected function loadShopSettings() {
$user = User::find(\Auth::user()->id);
return $user;
}
public function onSave(){
$data = post();
$rules = [
'vendorName' => 'required',
'slogan' => 'required',
'description' => 'required',
'workTime' => 'required',
];
$this->validateForm($data, $rules);
$user = User::find(\Auth::user()->id);
$user->shop_title = $data['vendorName'];
$user->slogan = $data['slogan'];
$user->description = $data['description'];
$user->work_time = $data['workTime'];
$user->save();
Flash::success('Maglumatlar üýtgedildi');
}
protected function validateForm($data, $rules) {
$validator = Validator::make($data, $rules);
if($validator->fails()) {
throw new ValidationException($validator);
}
}
}

View File

@ -0,0 +1,80 @@
<?php namespace TPS\Birzha\Components;
use Cms\Classes\ComponentBase;
use TPS\Birzha\Models\Product;
use TPS\Birzha\Models\VendorSales as VSales;
use Input;
use Flash;
class SingleSale extends ComponentBase
{
/**
* @var Collection A collection of user's posts
*/
public $sales;
public $order;
public function componentDetails()
{
return [
'name' => 'Sale order detail',
'description' => 'Sale order products'
];
}
public function defineProperties()
{
return [
'id' => [
'title' => 'Get order :id',
'description' => 'Get order :id',
'type' => 'string',
'default' => ''
],
'perPage' => [
'title' => 'Number of vendor sales',
'description' => 'How many vendor sales do you want to display',
'default' => 12,
'validationPattern' => '^[0-9]+$',
'validationMessage' => 'Only numbers allowed'
],
];
}
public function onConfirm(){
$data = post();
$vendorOrders = VSales::where('order_id', $data["order_id"])->get();
if((count($vendorOrders) != 0) && ($vendorOrders[0]->vendor_id == \Auth::user()->id)){
for ($i = 0; $i < count($vendorOrders); $i++) {
$vendorOrders[$i]->status = "completed";
$vendorOrders[$i]->save();
}
Flash::success('Zakaz kabul edildi');
}else{
Flash::error('Ýalňyşlyk ýüze çykdy');
}
}
public function onRun() {
$this->order = $this->property('id');
$this->sales = $this->loadSaleOrderDetail();
}
protected function loadSaleOrderDetail() {
$perPage = $this->property('perPage');
$sales = VSales::where('vendor_id', \Auth::user()->id)
->where('order_id', $this->property('id'))
->with(['order.user', 'product'])
->orderBy('id', 'DESC')
->paginate(15);
return $sales;
}
}

View File

@ -0,0 +1,53 @@
<?php namespace TPS\Birzha\Components;
use Cms\Classes\ComponentBase;
use TPS\Birzha\Models\Product;
use TPS\Birzha\Models\VendorSales as VSales;
use Input;
use Flash;
class VendorSales extends ComponentBase
{
/**
* @var Collection A collection of user's posts
*/
public $sales;
public function componentDetails()
{
return [
'name' => 'Vendor sales List',
'description' => 'List of vendor sales'
];
}
public function defineProperties()
{
return [
'perPage' => [
'title' => 'Number of vendor sales',
'description' => 'How many vendor sales do you want to display',
'default' => 12,
'validationPattern' => '^[0-9]+$',
'validationMessage' => 'Only numbers allowed'
],
];
}
public function onRun() {
$this->sales = $this->loadVendorSales();
}
protected function loadVendorSales() {
$perPage = $this->property('perPage');
$sales = VSales::select('id', 'order_id', 'created_at', 'status')
->where('vendor_id', \Auth::user()->id)
->groupBy('order_id')
->orderBy('id', 'DESC')->paginate($perPage);
return $sales;
}
}

View File

@ -0,0 +1,68 @@
{% set category = __SELF__.category %}
{% set users = __SELF__.users %}
<!-- Breadcumb Area -->
<div class="breadcumb_area">
<div class="container h-100">
<div class="row h-100 align-items-center">
<div class="col-12">
<h5>Kategoriýa</h5>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ 'index'|page }}">Esasy sahypa</a></li>
<li class="breadcrumb-item active">{{ category.name }}</li>
</ol>
</div>
</div>
</div>
</div>
<!-- Breadcumb Area -->
<!-- Shop Catagory Area -->
<div class="shop_by_catagory_area section_padding_0">
<div class="container">
<div class="row">
<div class="col-12">
<div class="section-heading mb-50">
<!-- <h5>Kategoriýalar</h5> -->
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="shop_by_catagory_slides owl-carousel">
<!-- Single Slide -->
{% for category in category.subs %}
<div class="single_catagory_slide">
<a href="{{ 'category-products'|page({categorySlug: category.slug}) }}">
<img src="{{ category.icon|media|resize(127, 127, { mode: 'crop' }) }}" alt="{{ category.name }}">
</a>
<p>{{ category.name }}</p>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
<!-- Shop Catagory Area -->
<!-- Brands Area -->
<section class="catagories_area home-3 section_padding_70_70">
<div class="container">
<div class="row justify-content-center">
{% for user in users %}
<div class="col-12 col-md-6 col-lg-4">
<a href="{{ 'user-profile'|page({id: user.id}) }}">
<div class="single_catagory mb-30">
<img src="{{ user.banner|media|resize(600, 450, { mode: 'crop' }) }}" alt="{{ user.name }}">
</div>
</a>
</div>
{% endfor %}
</div>
</div>
</section>
<!-- Brands Area -->

View File

@ -0,0 +1,184 @@
<!-- Breadcumb Area -->
<div class="breadcumb_area">
<div class="container h-100">
<div class="row h-100 align-items-center">
<div class="col-12">
<h5>Sebedim</h5>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ 'index'|page }}">Esasy sahypa</a></li>
<li class="breadcrumb-item active">Sebedim</li>
</ol>
</div>
</div>
</div>
</div>
<!-- Breadcumb Area -->
<!-- Cart Area -->
<div class="cart_area section_padding_100_70 clearfix">
<div class="container">
<form action="#" id="checkoutForm"
data-request="onCreateOrder"
data-request-flash
data-request-validate
data-request-success="resetForm()"
data-request-error="resetFormFailed()"
method="POST">
<div class="row justify-content-between">
<div class="col-12">
<div class="cart-table">
<div class="table-responsive">
<table class="table table-bordered mb-30">
<thead>
<tr>
<th scope="col">Surat</th>
<th scope="col">Haryt ady</th>
<th scope="col">Bahasy</th>
<th scope="col">Mukdary</th>
<th scope="col">Jemi</th>
</tr>
</thead>
<tbody id="cartBody">
</tbody>
</table>
</div>
</div>
</div>
<div class="col-12 col-lg-6">
<div class="cart-apply-coupon mb-30">
<div class="coupon-form">
<input type="text" class="form-control" name="address" placeholder="Adresiňiz" required>
<textarea class="form-control" id="order-notes" cols="30" rows="10" placeholder="Bellik" name="note" required></textarea>
</div>
</div>
</div>
<div class="col-12 col-lg-5">
<div class="cart-total-area mb-30">
<h5 class="mb-3">Sebet jemi</h5>
<div class="table-responsive">
<table class="table mb-3">
<tbody>
<tr>
<td>Harytlaryň jemi</td>
<td><span id="cardAmount">0</span> TMT</td>
</tr>
</tbody>
</table>
</div>
<input type="hidden" id="card_amount" name="cardAmount" />
<input type="hidden" id="items" name="items" />
<button type="submit" class="btn btn-primary d-block" style="width: 100%;">Zakazy ugratmak</button>
</form>
</div>
</div>
</div>
</div>
</div>
<!-- Cart Area End -->
{% put scripts %}
<script>
function resetForm() {
document.getElementById('checkoutForm').reset(); // Reset the form
localStorage.removeItem("cart");
localStorage.removeItem("cartForForm");
localStorage.removeItem("products");
localStorage.removeItem("productsForForm");
}
function resetFormFailed() {
document.getElementById('checkoutForm').reset(); // Reset the form
}
</script>
<script>
window.onload = () => {
cart = JSON.parse(localStorage.getItem("cart")) ?? [];
cartForForm = JSON.parse(localStorage.getItem("cartForForm")) ?? [];
var totalQuantity = 0;
var totalPrice = 0;
cart.map((item) => {
totalQuantity += parseInt(item.quantity);
totalPrice += parseInt(item.price * item.quantity);
});
$("#cardQuantity").html(totalQuantity);
$("#cardAmount").html(totalPrice.toFixed(2));
$("#card_amount").val(totalPrice.toFixed(2));
$("#items").val(JSON.stringify(cartForForm));
const cartBody = $("#cartBody");
const form = $("#checkoutForm");
cartBody.html('');
products = JSON.parse(localStorage.getItem("cart"));
productsForForm = JSON.parse(localStorage.getItem("cartForForm"));
products.map((item) => {
new_product_total_price = parseFloat(new_product_total_price) + parseFloat(item.total);
total_quantity = total_quantity + parseInt(item.quantity);
cartBody.append(`
<tr>
<td>
<img src="`+item.image+`" alt="`+item.name+`">
</td>
<td>`+item.name+`</td>
<td>`+item.price+`</td>
<td>
<div class="quantity input-counter">
<span class="minus-btn mr-2" data-id="`+item.id+`"><i class='icofont-minus'></i></span>
<input type="text" value="`+item.quantity+`">
<span class="plus-btn ml-2" data-id="`+item.id+`"><i class='icofont-plus'></i></span>
</div>
</td>
<td>`+item.price * item.quantity+`</td>
</tr>
`);
});
}
$('body').on('click', '.plus-btn', function(){
const id = parseInt($(this).attr('data-id'));
products.map((item) => {
if (item.id === id){
item.quantity++;
item.total = (item.quantity * item.price).toFixed(2);
}
});
productsForForm.map((item) => {
if (item.item === id){
item.qty++;
}
});
updateProducts();
});
$('body').on('click', '.minus-btn', function(){
const id = parseInt($(this).attr('data-id'));
products.map((item) => {
if (item.id === id){
if (item.quantity > 1){
item.quantity--;
item.total = (item.quantity * item.price).toFixed(2);
}
else{
products = products.filter((item) => item.id !== id);
}
}
});
productsForForm.map((item) => {
if (item.item === id){
if (item.qty > 1){
item.qty--;
}
else{
productsForForm = productsForForm.filter((item) => item.item !== id);
}
}
});
updateProducts();
});
</script>
{% endput %}

View File

@ -191,9 +191,16 @@
<!-- Product Description -->
<div class="product_description">
<!-- Add to cart -->
<div class="product_add_to_cart">
{% if user %}
<div class="product_add_to_cart" data-id="{{ product.id }}" data-price="{{ product.price }}" data-image="{{ product.images[0].path }}" data-name="{{ product.name }}" data-vendor="{{ product.vendor.id }}">
<input type="hidden" min="1" id="quantity{{ product.id }}" value="1">
<a href="#"><i class="icofont-shopping-cart"></i> Sebede goş</a>
</div>
{% else %}
<div class="product_add_to_cart">
<a href="{{ 'login'|page }}"><i class="icofont-shopping-cart"></i> Sebede goş</a>
</div>
{% endif %}
<!-- Quick View -->
<div class="product_quick_view">
<a href="#" data-toggle="modal" data-target="#quickview{{product.id}}"><i class="icofont-eye-alt"></i> Doly maglumat</a>

View File

@ -0,0 +1,88 @@
{% set comments = __SELF__.comments %}
<!-- Breadcumb Area -->
<div class="breadcumb_area">
<div class="container h-100">
<div class="row h-100 align-items-center">
<div class="col-12">
<h5>Teswirlerim</h5>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ 'index'|page }}">Esasy sahypa</a></li>
<li class="breadcrumb-item active">Teswirler</li>
</ol>
</div>
</div>
</div>
</div>
<!-- Breadcumb Area -->
<!-- Wishlist Table Area -->
<div class="wishlist-table section_padding_100 clearfix">
<div class="container">
<div class="row">
<div class="col-12">
<div class="cart-table wishlist-table">
<div class="table-responsive">
<table class="table table-bordered mb-30">
<thead>
<tr>
<th scope="col">Surat</th>
<th scope="col">Haryt ady</th>
<th scope="col">Teswir</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
{% for comment in comments %}
<tr>
<td>
<a href="{{ 'product'|page({id: comment.product.id}) }}">
<img src="{{ comment.product.images[0].thumb(60,60, { mode: 'crop' }) }}" alt="Product">
</a>
</td>
<td>
<a href="{{ 'product'|page({id: comment.product.id}) }}">{{ comment.product.name }}</a>
</td>
<td>
{{ comment.comment }} |
<i class="fa fa-star {{ (comment.rating == 1 or comment.rating > 1) ? 'colorYellow' : '' }}" aria-hidden="true"></i>
<i class="fa fa-star {{ (comment.rating == 2 or comment.rating > 1) ? 'colorYellow' : '' }}" aria-hidden="true"></i>
<i class="fa fa-star {{ (comment.rating == 3 or comment.rating > 2) ? 'colorYellow' : '' }}" aria-hidden="true"></i>
<i class="fa fa-star {{ (comment.rating == 4 or comment.rating > 3) ? 'colorYellow' : '' }}" aria-hidden="true"></i>
<i class="fa fa-star {{ (comment.rating == 5 or comment.rating > 4) ? 'colorYellow' : '' }}" aria-hidden="true"></i>
</td>
<td><a href="{{ 'product'|page({id: comment.product.id}) }}" class="btn btn-primary btn-sm">Harydy görmek</a></td>
</tr>
{% endfor %}
</tbody>
</table>
{% if comments.hasPages %}
<div class="shop_pagination_area mt-30">
<nav aria-label="Page navigation">
<ul class="pagination pagination-sm justify-content-center">
{% if comments.currentPage > 1 %}
<li class="page-item"><a class="page-link" href="{{ comments.previousPageUrl }}">Öňki</a></li>
{% endif %}
{% for page in range(1, comments.lastPage) %}
<li class="page-item"><a class="page-link" href="{{ comments.url(page) }}">{{ page }}</a></li>
{% endfor %}
{% if comments.lastPage > comments.currentPage %}
<li class="page-item"><a class="page-link" href="{{ comments.nextPageUrl }}">Indiki</a></li>
{% endif %}
</ul>
</nav>
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -0,0 +1,85 @@
{% set favourites = __SELF__.favourites %}
<!-- Breadcumb Area -->
<div class="breadcumb_area">
<div class="container h-100">
<div class="row h-100 align-items-center">
<div class="col-12">
<h5>Halanlarym</h5>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ 'index'|page }}">Esasy sahypa</a></li>
<li class="breadcrumb-item active">Halanlarym</li>
</ol>
</div>
</div>
</div>
</div>
<!-- Breadcumb Area -->
<!-- Wishlist Table Area -->
<div class="wishlist-table section_padding_100 clearfix">
<div class="container">
<div class="row">
<div class="col-12">
<div class="cart-table wishlist-table">
<div class="table-responsive">
<table class="table table-bordered mb-30">
<thead>
<tr>
<th scope="col">Surat</th>
<th scope="col">Haryt ady</th>
<th scope="col">Bahasy</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
{% for favourite in favourites %}
<tr>
<td>
<a href="{{ 'product'|page({id: favourite.product.id}) }}">
<img src="{{ favourite.product.images[0].thumb(60,60, { mode: 'crop' }) }}" alt="Product">
</a>
</td>
<td>
<a href="{{ 'product'|page({id: favourite.product.id}) }}">{{ favourite.product.name }}</a>
</td>
<td>
{{ favourite.product.price }} TMT
</td>
<td align="center" width="40%">
<a href="{{ 'product'|page({id: favourite.product.id}) }}" class="btn btn-primary btn-sm">Harydy görmek</a>
<a href="#" data-request="onRemove" data-request-data="product_id: {{ favourite.product.id }}" data-request-flash class="btn btn-primary btn-sm">Halanlarymdan aýyrmak</a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% if favourites.hasPages %}
<div class="shop_pagination_area mt-30">
<nav aria-label="Page navigation">
<ul class="pagination pagination-sm justify-content-center">
{% if favourites.currentPage > 1 %}
<li class="page-item"><a class="page-link" href="{{ favourites.previousPageUrl }}">Öňki</a></li>
{% endif %}
{% for page in range(1, favourites.lastPage) %}
<li class="page-item"><a class="page-link" href="{{ favourites.url(page) }}">{{ page }}</a></li>
{% endfor %}
{% if favourites.lastPage > favourites.currentPage %}
<li class="page-item"><a class="page-link" href="{{ favourites.nextPageUrl }}">Indiki</a></li>
{% endif %}
</ul>
</nav>
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -42,11 +42,14 @@
<a href="{{ 'product'|page({id: product.id}) }}">{{ product.name }}</a>
</td>
<td>{{ product.price }} TMT</td>
<td><button
<td align="center" width="25%">
<button
data-request="onDeleteOffer"
data-request-data="id: {{product.id}}"
data-request-flash
class="btn btn-primary btn-sm">Pozmak</button></td>
class="btn btn-primary btn-sm">Pozmak</button>
<a href="{{ 'addProduct'|page({productId: product.id}) }}" class="btn btn-primary btn-sm">Üýtgetmek</a>
</td>
</tr>
{% endfor %}
</tbody>

View File

@ -4,6 +4,7 @@
{% set states = __SELF__.states %}
{% set cities = __SELF__.cities %}
{% set productIdOption = __SELF__.productIdOption %}
{% set productForEditing = __SELF__.productForEditing %}
@ -30,17 +31,21 @@
<div class="col-12 col-md-12">
<div class="login_form mb-50">
<h5 class="mb-3">Haryt maglumatlary</h5>
{% if not productForEditing %}
<div class="shortcodes_content">
<form id="addForm" action="#"
<form id="offerForm" action="#"
data-request="onSave"
data-request-flash
data-request-validate
data-request-files
data-request-success="resetForm()"
data-request-error="resetForm()"
enctype="multipart/form-data">
<div class="row">
<div class="col-md-6 mb-3">
<label for="category">Kategoriýa</label>
<label for="category">Kategoriýa goshmak</label>
<select class="custom-select d-block w-100 form-control" id="category" data-belongsto="product" name="category_id" required>
<option value="">Kategoriýa saýla</option>
{% for category in categories %}
@ -69,7 +74,7 @@
<div class="col-md-6 mb-3">
<label for="subCity">Şäher</label>
<select class="custom-select d-block w-100 form-control" id="subCity" name="city_id">
<option value="">Şäher saýla</option>
<option value=null>Şäher saýla</option>
{% for city in cities %}
<option value="{{ city.id }}">{{ city.name }}</option>
{% endfor %}
@ -104,12 +109,99 @@
<div class="col-md-6 mb-3 d-none" id="newFileDiv">
<label for="files">Faýl goşmak</label>
<input type="file" class="form-control" id="new_file" name="new_file" multiple>
</div>
</div>
<input type="hidden" name="resetForm" id="resetForm" value="0"/>
<button type="submit" class="btn btn-primary btn-sm mt-3">Haryt goşmak</button>
</form>
</div>
{% endif %}
{% if productForEditing %}
<div class="shortcodes_content">
<form id="offerUpdateForm" action="#"
data-request="onUpdate"
data-request-flash
data-request-validate
data-request-files
data-request-success="resetForm()"
data-request-error="resetForm()"
enctype="multipart/form-data">
<div class="row">
<div class="col-md-6 mb-3">
<label for="category">Kategoriýa</label>
<select class="custom-select d-block w-100 form-control" id="categoryEdit" data-belongsto="product" name="category_id" required>
<option value="">Kategoriýa saýla</option>
{% for category in categories %}
<option value="{{ category.id }}" {{ productForEditing.categories.contains(category.id) ? 'selected' : '' }} data-file="{{ category.is_file_category }}">{{ category.name }}</option>
{% endfor %}
</select>
</div>
<div class="col-md-6 mb-3">
<label for="subcategory">Ikinji kategoriýa</label>
<select class="custom-select d-block w-100 form-control" id="subcategory" name="subcategory_id" required>
<option value=null>Subkategoriýa saýla</option>
{% for sub in subcategories %}
<option value="{{ sub.id }}" {{ productForEditing.categories.contains(sub.id) ? 'selected' : '' }} data-file="{{ sub.is_file_category }}">{{ sub.name }}</option>
{% endfor %}
</select>
</div>
<div class="col-md-6 mb-3">
<label for="city">Welaýat</label>
<select class="custom-select d-block w-100 form-control" id="city" name="state_id">
<option value=null>Welaýat saýla</option>
{% for state in states %}
<option value="{{ state.id }}" {{ productForEditing.place_id == state.id ? 'selected' : '' }}>{{ state.name }}</option>
{% endfor %}
</select>
</div>
<div class="col-md-6 mb-3">
<label for="subCity">Şäher</label>
<select class="custom-select d-block w-100 form-control" id="subCity" name="city_id">
<option value=null>Şäher saýla</option>
{% for city in cities %}
<option value="{{ city.id }}" {{ productForEditing.place_id == city.id ? 'selected' : '' }}>{{ city.name }}</option>
{% endfor %}
</select>
</div>
<div class="col-md-6 mb-3">
<label for="name">Harydyň ady</label>
<input type="text" class="form-control" id="name" placeholder="Harydyň ady" name="name" value="{{ productForEditing.name }}" required>
</div>
<div class="col-md-6 mb-3">
<label for="price">Bahasy</label>
<input type="number" class="form-control" id="price" name="price" min="0" value="{{ productForEditing.price }}" required>
</div>
<div class="col-md-12 mb-3">
<label for="order-notes">Gysga beýany</label>
<textarea class="form-control" id="shortDescription" cols="30" name="short_description" rows="10" placeholder="Gysga beýany" required>{{ productForEditing.short_description }}</textarea>
</div>
<div class="col-md-12 mb-3">
<label for="order-notes">Giňişleýin beýany</label>
<textarea class="form-control" id="description" cols="30" rows="20" name="description" placeholder="Giňişleýin beýany" required>{{ productForEditing.description }}</textarea>
</div>
<div class="col-md-6 mb-3">
<label for="phone">Telefon belgisi</label>
<input type="number" class="form-control" id="phone" name="phone" value="{{ productForEditing.phone }}" required>
</div>
<div class="col-md-6 mb-3">
<label for="images">Suratlar</label>
<input type="file" class="form-control" id="new_img" name="new_img[]" multiple>
<input type="hidden" value="0" name="is_file" id="isFile">
</div>
<div class="col-md-6 mb-3 d-none" id="newFileDiv">
<label for="files">Faýl goşmak</label>
<input type="file" class="form-control" id="new_file" name="new_file" multiple>
</div>
</div>
<input type="hidden" name="resetForm" id="resetForm" value="0"/>
<input type="hidden" name="product_id" value="{{ productForEditing.id }}"/>
<button type="submit" class="btn btn-primary btn-sm mt-3">Üýtgetmek</button>
</form>
</div>
{% endif %}
</div>
</div>
</div>
@ -117,6 +209,12 @@
</div>
{% put scripts %}
<script>
function resetForm() {
document.getElementById('offerForm').reset(); // Reset the form
document.getElementById('offerUpdateForm').reset();
}
</script>
<script>
$(document).ready(function() {
$("#category").on("change", function() {
@ -125,8 +223,24 @@ $(document).ready(function() {
if (isFile > 0){
$("#isFile").val(1);
$("#newFileDiv").removeClass("d-none");
$("#new_file").attr("required", "true");
}else{
$("#isFile").val(0);
$("#new_file").removeAttr("required");
$("#newFileDiv").addClass("d-none");
}
});
$("#categoryEdit").on("change", function() {
var selectedValue = $(this).val();
var isFile = $(this).find(':selected').data('file');
if (isFile > 0){
$("#isFile").val(1);
$("#newFileDiv").removeClass("d-none");
// $("#new_file").attr("required", "true");
}else{
$("#isFile").val(0);
$("#new_file").val(null);
$("#newFileDiv").addClass("d-none");
}
});

View File

@ -192,13 +192,16 @@
<!-- Product Description -->
<div class="product_description">
<!-- Add to cart -->
<div class="product_add_to_cart">
{% if user %}
<div class="product_add_to_cart" data-id="{{ product.id }}" data-price="{{ product.price }}" data-image="{{ product.images[0].path }}" data-name="{{ product.name }}" data-vendor="{{ product.vendor.id }}">
<input type="hidden" min="1" id="quantity{{ product.id }}" value="1">
<a href="#"><i class="icofont-shopping-cart"></i> Sebede goş</a>
{% else %}
<a href="{{ 'login'|page }}"><i class="icofont-shopping-cart"></i> Sebede goş</a>
{% endif %}
</div>
{% else %}
<div class="product_add_to_cart">
<a href="{{ 'login'|page }}"><i class="icofont-shopping-cart"></i> Sebede goş</a>
</div>
{% endif %}
<!-- Quick View -->
<div class="product_quick_view">
<a href="#" data-toggle="modal" data-target="#quickview{{product.id}}"><i class="icofont-eye-alt"></i> Doly maglumat</a>

View File

@ -150,13 +150,16 @@
<!-- Product Description -->
<div class="product_description">
<!-- Add to cart -->
<div class="product_add_to_cart">
{% if user %}
<div class="product_add_to_cart" data-id="{{ product.id }}" data-price="{{ product.price }}" data-image="{{ product.images[0].path }}" data-name="{{ product.name }}" data-vendor="{{ product.vendor.id }}">
<input type="hidden" min="1" id="quantity{{ product.id }}" value="1">
<a href="#"><i class="icofont-shopping-cart"></i> Sebede goş</a>
{% else %}
<a href="{{ 'login'|page }}"><i class="icofont-shopping-cart"></i> Sebede goş</a>
{% endif %}
</div>
{% else %}
<div class="product_add_to_cart">
<a href="{{ 'login'|page }}"><i class="icofont-shopping-cart"></i> Sebede goş</a>
</div>
{% endif %}
<!-- Quick View -->
<div class="product_quick_view">
<a href="#" data-toggle="modal" data-target="#quickview{{product.id}}"><i class="icofont-eye-alt"></i> Doly maglumat</a>

View File

@ -0,0 +1,93 @@
{% set user = __SELF__.user %}
<!-- Breadcumb Area -->
<div class="breadcumb_area">
<div class="container h-100">
<div class="row h-100 align-items-center">
<div class="col-12">
<h5>Dükanyň sazlamalary</h5>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ 'index'|page }}">Esasy sahypa</a></li>
<li class="breadcrumb-item active">{{ user.name }}</li>
</ol>
</div>
</div>
</div>
</div>
<!-- Breadcumb Area -->
<!-- My Account Area -->
<section class="my-account-area section_padding_50">
<div class="container">
<div class="row">
<div class="col-12 col-lg-12">
<div class="my-account-content mb-50">
<div class="single_catagory_slide">
<a href="{{ 'user-profile'|page({id: user.id}) }}" style="display: inline;">
<img src="{{ user.logo|media|resize(127, 127, { mode: 'crop' }) }}" alt="{{ user.name }}">
</a>
<p class="mt-3">{{ user.name }}</p>
</div>
</div>
</div>
<div class="col-12 col-lg-12">
<div class="my-account-content mb-50">
<h5 class="mb-3">Dükan maglumatlary</h5>
<form action="#" method="post" id="vendorForm"
data-request="onSave"
data-request-flash
data-request-validate
data-request-files
data-request-success="resetForm()"
data-request-error="resetForm()"
>
<div class="row">
<div class="col-12 col-lg-6">
<div class="form-group">
<label for="firstName">Dükanyň ady</label>
<input type="text" class="form-control" name="vendorName" id="vendorName" value="{{ user.shop_title }}" placeholder="Dükanyň ady" required>
</div>
</div>
<div class="col-12 col-lg-6">
<div class="form-group">
<label for="lastName">Slogan</label>
<input type="text" class="form-control" name="slogan" id="slogan" value="{{ user.slogan }}" placeholder="Slogan" required>
</div>
</div>
<div class="col-12">
<div class="form-group">
<label for="displayName">Iş wagty</label>
<input type="text" class="form-control" name="workTime" id="workTime" value="{{ user.work_time }}" placeholder="Iş wagty" required>
</div>
</div>
<div class="col-12">
<div class="form-group">
<label for="emailAddress">Beýan</label>
<input type="text" class="form-control" name="description" id="description" value="{{ user.description }}" placeholder="Beýan" required>
</div>
</div>
<div class="col-12">
<button type="submit" class="btn btn-primary">Üýtgetmek</button>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</section>
<!-- My Account Area -->
{% put scripts %}
<script>
function resetForm() {
document.getElementById('vendorForm').reset(); // Reset the form
}
</script>
{% endput %}

View File

@ -157,10 +157,12 @@
<div class="submit_a_review_area mt-20">
<h4>Teswir ýazmak</h4>
<form
<form id="commentForm"
data-request="onCommentSave"
data-request-flash
data-request-validate
data-request-success="resetForm()"
data-request-error="resetForm()"
method="post">
<div class="form-group">
<div class="stars">
@ -233,14 +235,9 @@
<!-- Single Product Details Area End -->
{% put scripts %}
<script type="text/javascript">
$(document).ready(function() {
$("[id^='star-']").each(function() {
var id = $(this).attr('id');
$('#star-'+id).on('click', function(e){
console.log(id);
});
});
})
<script>
function resetForm() {
document.getElementById('commentForm').reset(); // Reset the form
}
</script>
{% endput %}

View File

@ -0,0 +1,95 @@
{% set sales = __SELF__.sales %}
{% set order = __SELF__.order %}
<!-- Breadcumb Area -->
<div class="breadcumb_area">
<div class="container h-100">
<div class="row h-100 align-items-center">
<div class="col-12">
<h5>Sargyt maglumaty</h5>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ 'index'|page }}">Esasy sahypa</a></li>
<li class="breadcrumb-item active"># {{ order }} sargyt</li>
</ol>
</div>
</div>
</div>
</div>
<!-- Breadcumb Area -->
<!-- Checkout Area -->
<div class="checkout_area section_padding_100">
<div class="container">
<div class="row">
<div class="col-12">
<div class="checkout_details_area clearfix">
<h5 class="mb-30">Harytlar</h5>
<div class="cart-table">
<div class="table-responsive">
<table class="table table-bordered mb-30">
<thead>
<tr>
<th scope="col">Surat</th>
<th scope="col">Haryt ady</th>
<th scope="col">Bahasy</th>
<th scope="col">Mukdary</th>
<th scope="col">Umumy</th>
</tr>
</thead>
<tbody>
{% set total_price = 0 %}
{% for order in sales %}
<tr>
<td>
<a href="{{ 'product'|page({id: order.product.id}) }}">
<img src="{{ order.product.images[0].thumb(60,60, { mode: 'crop' }) }}" alt="Product">
</a>
</td>
<td>
<a href="{{ 'product'|page({id: order.product.id}) }}">{{ order.product.name }}</a>
</td>
<td>{{ order.product.price }} TMT</td>
<td>{{ order.qty }}</td>
<td>{{ order.product.price * order.qty }} TMT</td>
{% set total_price = total_price + (order.product.price * order.qty) %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
</div>
</div>
</div>
<div class="col-12 col-lg-7 ml-auto">
<div class="cart-total-area">
<h5 class="mb-3">Zakaz jemi</h5>
<div class="table-responsive">
<table class="table mb-0">
<tbody>
<tr>
<td>Jemi</td>
<td>{{ total_price }} TMT</td>
</tr>
</tbody>
</table>
</div>
<div class="checkout_pagination d-flex justify-content-end mt-3">
<form action="#"
data-request="onConfirm"
data-request-flash
data-request-validate
>
<input type="hidden" name="order_id" value="{{ order }}">
<button type="submit" class="btn btn-primary mt-2 ml-2">Zakazy kabul etmek</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Checkout Area End -->

View File

@ -183,13 +183,16 @@
<!-- Product Description -->
<div class="product_description">
<!-- Add to cart -->
<div class="product_add_to_cart">
{% if user %}
<div class="product_add_to_cart" data-id="{{ product.id }}" data-price="{{ product.price }}" data-image="{{ product.images[0].path }}" data-name="{{ product.name }}" data-vendor="{{ product.vendor.id }}">
<input type="hidden" min="1" id="quantity{{ product.id }}" value="1">
<a href="#"><i class="icofont-shopping-cart"></i> Sebede goş</a>
{% else %}
<a href="{{ 'login'|page }}"><i class="icofont-shopping-cart"></i> Sebede goş</a>
{% endif %}
</div>
{% else %}
<div class="product_add_to_cart">
<a href="{{ 'login'|page }}"><i class="icofont-shopping-cart"></i> Sebede goş</a>
</div>
{% endif %}
<!-- Quick View -->
<div class="product_quick_view">
<a href="#" data-toggle="modal" data-target="#quickview{{product.id}}"><i class="icofont-eye-alt"></i> Doly maglumat</a>

View File

@ -0,0 +1,75 @@
{% set sales = __SELF__.sales %}
<!-- Breadcumb Area -->
<div class="breadcumb_area">
<div class="container h-100">
<div class="row h-100 align-items-center">
<div class="col-12">
<h5>Gelen sargytlar</h5>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ 'index'|page }}">Esasy sahypa</a></li>
<li class="breadcrumb-item active">Gelen sargytlar</li>
</ol>
</div>
</div>
</div>
</div>
<!-- Breadcumb Area -->
<!-- Wishlist Table Area -->
<div class="wishlist-table section_padding_100 clearfix">
<div class="container">
<div class="row">
<div class="col-12">
<div class="cart-table wishlist-table">
<div class="table-responsive">
<table class="table table-bordered mb-30">
<thead>
<tr>
<th scope="col">Tertip belgisi</th>
<th scope="col">Wagty</th>
<th scope="col">Status</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
{% for sale in sales %}
<tr>
<td><a href="#"> # {{ sale.order_id }} Sargyt</a></td>
<td>{{ sale.created_at.format('d.m.Y') }}</td>
<td>
<span class="badge {{ sale.status == 'new' ? 'badge-secondary' : 'badge-success' }}">{{ sale.status == 'new' ? 'Täze sargyt' : 'Kabul edildi' }}</span> </td>
<td align="center"><a href="{{ 'vendor-sale-detail'|page({id: sale.order_id}) }}" class="btn btn-primary btn-sm">Sargydy görmek</a></td>
</tr>
{% endfor %}
</tbody>
</table>
{% if sales.hasPages %}
<div class="shop_pagination_area mt-30">
<nav aria-label="Page navigation">
<ul class="pagination pagination-sm justify-content-center">
{% if sales.currentPage > 1 %}
<li class="page-item"><a class="page-link" href="{{ sales.previousPageUrl }}">Öňki</a></li>
{% endif %}
{% for page in range(1, sales.lastPage) %}
<li class="page-item"><a class="page-link" href="{{ sales.url(page) }}">{{ page }}</a></li>
{% endfor %}
{% if sales.lastPage > sales.currentPage %}
<li class="page-item"><a class="page-link" href="{{ sales.nextPageUrl }}">Indiki</a></li>
{% endif %}
</ul>
</nav>
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>

View File

@ -49,7 +49,7 @@ class Category extends Model
'table'=>'tps_birzha_product_categories'
],
'users' => [
'TPS\Birzha\Models\Category',
'RainLab\User\Models\User',
'table'=>'tps_birzha_users_categories',
'delete' => true,
'softDelete' => true

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,199 @@
button {
outline: none;
}
button:focus {
outline: none;
}
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
-webkit-appearance: none;
margin: 0;
}
/* top header */
.top_header {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
-ms-grid-row-align: center;
align-items: center;
justify-content: end;
padding-top: 7px;
}
.top_header li {
margin-right: 30px;
}
.top_header li a {
color: #999;
font-size: 12px;
line-height: 15px;
}
.top_header li:last-child {
margin-right: 0;
}
.nav-brand {
width: 146px;
height: 100%;
}
.nav-brand img {
width: 100%;
height: 100%;
object-fit: contain;
-o-object-fit: contain;
}
.wishlist-area,
.cart-area {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
}
.bigshop_box {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
-ms-grid-row-align: center;
align-items: center;
justify-content: space-between;
margin-top: 20px;
}
.hero_meta_area {
display: -webkit-box;
display: -ms-flexbox;
display: flex;
-webkit-box-align: center;
-ms-flex-align: center;
-ms-grid-row-align: center;
align-items: center;
}
.header_box-search-input {
position: relative;
width: 100%;
max-width: 630px;
}
.header_box-search-input.burger {
display: none;
}
.header_box-search-input input {
width: calc(100% - 0px);
padding: 15px 110px 15px 20px;
border-radius: 10px;
font-weight: 400;
font-size: 14px;
line-height: 1.3;
color: #3E3E3E;
background-color: #f3f3f3;
border: none;
}
.header_box-search-input input:focus {
outline: none;
}
.header_box-search-input button {
position: absolute;
width: 100px;
height: 50px;
right: -20px;
top: 0px;
cursor: pointer;
border: none;
background: transparent;
padding: 10px;
}
.header_box-search-input button img {
width: 100%;
height: 100%;
object-fit: contain;
-o-object-fit: contain;
}
.customA:hover{
cursor: pointer;
}
/* responsive */
@media (max-width: 1200px) {
.header_box-search-input input {
width: calc(100% - 10px);
}
.header_box-search-input button {
right: 2px;
}
}
@media (max-width: 991px) {
.header_box-search-input input {
padding: 15px 40px 15px 20px;
}
.header_box-search-input button {
right: -20px;
}
.header_box-search-input {
display: none;
}
.header_box-search-input input {
width: calc(100% - 2px);
}
.header_box-search-input.burger {
display: block;
}
.classy-nav-container.breakpoint-on {
position: absolute;
top: 78px;
right: 47%;
}
.header_area .classy-navbar {
height: 20px;
}
.header_area .bigshop-main-menu {
margin: 27px 0;
}
.breakpoint-on .classynav {
margin-bottom: 20px;
}
}
@media (max-width: 475px) {
.classy-nav-container.breakpoint-on {
position: absolute;
top: 78px;
right: 42%;
}
}

View File

@ -36,9 +36,11 @@
align-items: center;
-webkit-box-pack: center;
-ms-flex-pack: center;
justify-content: center; }
#preloader .spinner-grow {
background-color: #ba5603; }
justify-content: center;
}
#preloader .spinner-grow {
background-color: #ba5603;
}
/* Reboot CSS */
* {
@ -73,7 +75,8 @@ a {
a:hover, a:focus {
text-decoration: none;
outline: none;
font-weight: 700; }
/* font-weight: 700; */
}
ul,
ol {
@ -480,7 +483,7 @@ textarea:focus,
transition-duration: 500ms;
background-color: #ffffff; }
.header_area .classy-nav-container {
z-index: 400; }
z-index: 0; }
.header_area .classy-navbar {
-webkit-transition-duration: 500ms;
-o-transition-duration: 500ms;
@ -717,7 +720,7 @@ textarea:focus,
height: 35px;
line-height: 35px; } }
.hero_meta_area .cart-area .cart--btn:hover, .hero_meta_area .cart-area .cart--btn:focus {
color: #0f99f3; }
color: #F37B1C; }
.hero_meta_area .cart-area .cart--btn .cart_quantity {
-webkit-transition-duration: 500ms;
-o-transition-duration: 500ms;
@ -3835,3 +3838,25 @@ button.mfp-arrow {
-o-transition-duration: 500ms;
transition-duration: 500ms;
box-shadow: 0 0 8px 0 rgba(47, 91, 234, 0.125); }
.input-counter input{
height: 25px;
color: #292929;
outline: 0;
display: block;
border: none;
background-color: #f8f8f8;
text-align: center;
width: 10%;
font-size: 16px;
font-weight: 600;
}
.minus-btn:hover{
cursor: pointer;
}
.plus-btn:hover{
cursor: pointer;
}

File diff suppressed because one or more lines are too long

View File

@ -218,7 +218,7 @@
$(".popular_items_slides").owlCarousel({
items: 4,
margin: 30,
loop: true,
loop: false,
nav: true,
navText: ['<i class="icofont-rounded-left"></i>', '<i class="icofont-rounded-right"></i>'],
dots: false,
@ -294,10 +294,12 @@
$(".shop_by_catagory_slides").owlCarousel({
items: 7,
margin: 30,
loop: true,
loop: false,
dots: true,
autoplay: true,
smartSpeed: 800,
autoplayTimeout: 1900,
autoplayHoverPause: true,
responsive: {
0: {
items: 2

View File

@ -0,0 +1,116 @@
var cart = [];
var cartForForm = [];
var products = [];
var productsForForm = [];
var new_product_total_price = 0.0;
var total_quantity = 0;
var cardAmount = 0;
const addToCard = (id, price, quantity, name, image, vendor) => {
var exists = false;
cart.map((item) => {
if (item.id === id){
item.price = price;
item.quantity += quantity;
item.name = name;
item.image = image;
item.total = parseFloat(price * quantity);
item.vendor = vendor;
exists = true;
}
});
cartForForm.map((item) => {
if (item.item === id){
item.qty += quantity;
item.price = price;
item.vendor = vendor;
exists = true;
}
});
if (!exists){
cart.push({
id: id,
price: price,
quantity: quantity,
name: name,
image: image,
total: parseFloat(price * quantity),
vendor: vendor
});
cartForForm.push({
item: id,
qty: quantity,
price: price,
vendor: vendor
});
}
localStorage.setItem("cart", JSON.stringify(cart));
localStorage.setItem("cartForForm", JSON.stringify(cartForForm));
}
window.onload = () => {
cart = JSON.parse(localStorage.getItem("cart")) ?? [];
var totalQuantity = 0;
var totalPrice = 0;
cart.map((item) => {
totalQuantity += parseInt(item.quantity);
totalPrice += parseInt(item.price * item.quantity);
});
$("#cardQuantity").html(totalQuantity);
$("#cardAmount").html(totalPrice.toFixed(2));
};
$(".product_add_to_cart").on('click', function (){
let id = parseInt($(this).data('id'));
let price = parseFloat($(this).data('price'));
let quantity = parseInt($("#quantity"+id).val());
let name = $(this).data('name')
let image = $(this).data('image')
let vendor = $(this).data('vendor')
$("#cardAmount").html((parseFloat($("#cardAmount").html()) + (price * quantity)).toFixed(2));
$("#cardQuantity").html(parseInt($("#cardQuantity").html()) + quantity);
addToCard(id, price, quantity, name, image, vendor);
toastrCustomSuccess("Sebede goşuldy");
});
function updateProducts(){
const cartBody = $("#cartBody");
cartBody.html('');
new_product_total_price = 0;
total_quantity = 0;
cardAmount = 0;
products.map((item) => {
new_product_total_price = parseFloat(new_product_total_price) + parseFloat(item.total);
total_quantity = total_quantity + parseInt(item.quantity);
cartBody.append(`
<tr>
<td>
<img src="`+item.image+`" alt="`+item.name+`">
</td>
<td>`+item.name+`</td>
<td>`+item.price+`</td>
<td>
<div class="quantity input-counter">
<span class="minus-btn mr-2" data-id="`+item.id+`"><i class='icofont-minus'></i></span>
<input type="text" value="`+item.quantity+`">
<span class="plus-btn ml-2" data-id="`+item.id+`"><i class='icofont-plus'></i></span>
</div>
</td>
<td>`+item.price * item.quantity+`</td>
</tr>
`);
});
$("#cardQuantity").html(total_quantity);
$("#cardAmount").html(new_product_total_price.toFixed(2));
$("#card_amount").val(new_product_total_price.toFixed(2));
$("#items").val(JSON.stringify(productsForForm));
localStorage.setItem("cart", JSON.stringify(products));
localStorage.setItem("cartForForm", JSON.stringify(productsForForm));
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,25 @@
toastr.options = {
"closeButton": true,
"debug": false,
"newestOnTop": false,
"progressBar": false,
"positionClass": "toast-top-right",
"preventDuplicates": false,
"onclick": null,
"showDuration": "300",
"hideDuration": "1000",
"timeOut": "5000",
"extendedTimeOut": "1000",
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "fadeOut"
};
function toastrCustomSuccess(message){
toastr.success(message);
}
function toastrCustomError(message){
toastr.error(message);
}

View File

@ -4,6 +4,9 @@ redirect = "login"
[localePicker]
forceUrl = 0
[staticMenu]
code = "top-menu"
==
<html lang="en">
@ -16,6 +19,9 @@ forceUrl = 0
<title>{{ this.page.title }}</title>
<link rel="icon" href="{{ 'assets/img/core-img/favicon.png'|theme}}">
<link rel="stylesheet" href="{{ 'assets/css/style.css'|theme}}">
<link rel="stylesheet" href="{{ 'assets/css/newcss.css'|theme}}">
<link rel="stylesheet" href="{{ 'assets/css/toastr.min.css'|theme}}">
{% partial "customStyle" %}
{% styles %}
</head>
@ -51,6 +57,24 @@ forceUrl = 0
<script src="{{ 'assets/js/jquery.magnific-popup.min.js'|theme }}"></script>
<script src="{{ 'assets/js/wow.min.js'|theme }}"></script>
<script src="{{ 'assets/js/default/active.js'|theme }}"></script>
<script src="{{ 'assets/js/toastr.min.js'|theme }}"></script>
<script src="{{ 'assets/js/toastr.scripts.js'|theme }}"></script>
<script src="{{ 'assets/js/script.js'|theme }}"></script>
<script>
$(document).ready(function(){
$('.owl-carousel').owlCarousel({
loop: false,
rewind: true,
autoplay:true,
autoplayTimeout:1000,
})
});
</script>
{% framework extras %}

View File

@ -0,0 +1,449 @@
items:
-
title: 'Esasy sahypa'
type: cms-page
code: ''
reference: index
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: 'Biz barada'
type: cms-page
code: ''
reference: about
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: Gipsler
type: url
url: /category-profile/sdfsdfsdf
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: ''
isExternal: '0'
items:
-
title: 'Bezeg Gipsler'
type: url
url: /category/products/bezeg-gipsler
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '1'
isExternal: '0'
-
title: Çiteler
type: url
url: /category/products/citeler
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '2'
isExternal: '0'
-
title: Karnizlar
type: url
url: /category/products/karnizlar
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '3'
isExternal: '0'
-
title: Kalonlar
type: url
url: /category/products/kalonlar
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '1'
isExternal: '0'
-
title: 'Bezeg Dizaýn'
type: url
url: /category-profile/bezeg-dizayn
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: ''
isExternal: '0'
items:
-
title: Klassika
type: url
url: /category/products/klassika
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '1'
isExternal: '0'
-
title: Lýuks
type: url
url: /category/products/lyuks
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '2'
isExternal: '0'
-
title: Modern
type: url
url: /category/products/moder
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '3'
isExternal: '0'
-
title: Agaçlar
type: url
url: /category-profile/testq
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: ''
isExternal: '0'
items:
-
title: Mebel
type: url
url: /category/products/mebel
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '1'
isExternal: '0'
-
title: Gapylar
type: url
url: /category/products/gapylar
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '2'
isExternal: '0'
-
title: Spalny
type: url
url: /category/products/spalny
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '3'
isExternal: '0'
-
title: Prihožka
type: url
url: /category/products/prihozka
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '4'
isExternal: '0'
-
title: Garderob
type: url
url: /category/products/garderob
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '1'
isExternal: '0'
-
title: Kuhnýa
type: url
url: /category/products/kuhnya
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '3'
isExternal: '0'
-
title: Eýwanlar
type: url
url: /category-profile/jghjghj
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: Aýnalar
type: url
url: /category-profile/aynalar
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: ''
isExternal: '0'
items:
-
title: 'Aýnadan Myramor'
type: url
url: /category/products/aynadan-myramorlar
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '1'
isExternal: '0'
-
title: 'Dekor Aýna'
type: url
url: /category/products/dekor-ayna
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '2'
isExternal: '0'
-
title: 'Duş Kabina'
type: url
url: /category/products/dus-kabina
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: 'Aýna Gapy'
type: url
url: /category/products/ayna-gapy
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '4'
isExternal: '0'
-
title: 'Kuhnýa Fartuklar'
type: url
url: /category/products/kuhnya-fartuklar
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '1'
isExternal: '0'
-
title: 'Aýna Potoloklar'
type: url
url: /category-profile/aynalar
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '2'
isExternal: '0'
-
title: Umiwalnik
type: url
url: /category/products/umiwalnikler
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '3'
isExternal: '0'
-
title: Lýustra
type: url
url: /category/products/lyustra
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: Lýustralar
type: url
url: /category-profile/lyustralar
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: ''
isExternal: '0'
items:
-
title: Lýustra
type: url
url: /category/products/lyustra
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '1'
isExternal: '0'
-
title: Spotlar
type: url
url: /category/products/spotlar
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '2'
isExternal: '0'
-
title: 'Led Lampalar'
type: url
url: /category/products/led-lampalar
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '3'
isExternal: '0'
-
title: Wklýuçatel
type: url
url: /category/products/wklyucatel
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '4'
isExternal: '0'
-
title: '3D Modeller'
type: url
url: /category-profile/3d-modeller
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: ''
isExternal: '0'
name: top-menu

View File

@ -21,7 +21,7 @@ is_hidden = 0
<!-- Breadcumb Area -->
<!-- About Us Area -->
<section class="about_us_area section_padding_100">
<section class="about_us_area section_padding_50">
<div class="container">
<p>
Gurlushyk это онлайн торговая площадка, объединяющая покупателей и продавцов по всему Туркменистану. Стремление клиентов к более низким ценам, лучшему выбору и удобному обслуживанию остается неизменным, несмотря ни на что. Сегодня все эти предпочтения можно найти на сайте gurlushyk.com.tm.

View File

@ -0,0 +1,9 @@
title = "Kategoriýa"
url = "/category-profile/:categorySlug"
layout = "default"
is_hidden = 0
[categoryprofile]
categorySlug = "{{ :categorySlug }}"
==
{% component 'categoryprofile' %}

View File

@ -3,146 +3,11 @@ url = "/checkout"
layout = "default"
description = "Checkout"
is_hidden = 0
[session]
security = "user"
redirect = "login"
[checkout]
==
<!-- Breadcumb Area -->
<div class="breadcumb_area">
<div class="container h-100">
<div class="row h-100 align-items-center">
<div class="col-12">
<h5>Sebedim</h5>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="index.html">Esasy sahypa</a></li>
<li class="breadcrumb-item active">Sebedim</li>
</ol>
</div>
</div>
</div>
</div>
<!-- Breadcumb Area -->
<!-- Cart Area -->
<div class="cart_area section_padding_100_70 clearfix">
<div class="container">
<div class="row justify-content-between">
<div class="col-12">
<div class="cart-table">
<div class="table-responsive">
<table class="table table-bordered mb-30">
<thead>
<tr>
<th scope="col"><i class="icofont-ui-delete"></i></th>
<th scope="col">Surat</th>
<th scope="col">Haryt ady</th>
<th scope="col">Bahasy</th>
<th scope="col">Mukdary</th>
<th scope="col">Jemi</th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">
<i class="icofont-close"></i>
</th>
<td>
<img src="{{ 'assets/img/product-img/onsale-1.png'|theme }}" alt="Product">
</td>
<td>
<a href="#">Haryt ady</a>
</td>
<td>100.00 TMT</td>
<td>
<div class="quantity">
<input type="number" class="qty-text" id="qty2" step="1" min="1" max="99" name="quantity" value="1">
</div>
</td>
<td>100.00 TMT</td>
</tr>
<tr>
<th scope="row">
<i class="icofont-close"></i>
</th>
<td>
<img src="{{ 'assets/img/product-img/onsale-2.png'|theme }}" alt="Product">
</td>
<td>
<a href="#">Haryt ady</a>
</td>
<td>50.00 TMT/td>
<td>
<div class="quantity">
<input type="number" class="qty-text" id="qty3" step="1" min="1" max="99" name="quantity" value="2">
</div>
</td>
<td>100.00 TMT</td>
</tr>
<tr>
<th scope="row">
<i class="icofont-close"></i>
</th>
<td>
<img src="{{ 'assets/img/product-img/onsale-6.png'|theme }}" alt="Product">
</td>
<td>
<a href="#">Haryt ady</a>
</td>
<td>75.00 TMT</td>
<td>
<div class="quantity">
<input type="number" class="qty-text" id="qty4" step="1" min="1" max="99" name="quantity" value="1">
</div>
</td>
<td>75.00 TMT</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<div class="col-12 col-lg-6">
<div class="cart-apply-coupon mb-30">
<h6>Kuponyň barmy?</h6>
<p>Kupon koduny giriziň &amp; arzanladyşdan peýdalanyň!</p>
<!-- Form -->
<div class="coupon-form">
<form action="#">
<input type="text" class="form-control" placeholder="Kupon koduny giriziň">
<button type="submit" class="btn btn-primary">Kupon ugratmak</button>
</form>
</div>
</div>
</div>
<div class="col-12 col-lg-5">
<div class="cart-total-area mb-30">
<h5 class="mb-3">Sebet jemi</h5>
<div class="table-responsive">
<table class="table mb-3">
<tbody>
<tr>
<td>Harytlaryň jemi</td>
<td>275.00 TMT</td>
</tr>
<tr>
<td>Eltip bermek</td>
<td>30.00 TMT</td>
</tr>
<tr>
<td>Arzanladyş</td>
<td>20.00 TMT</td>
</tr>
<tr>
<td>Total</td>
<td>295.00 TMT</td>
</tr>
</tbody>
</table>
</div>
<a href="checkout-1.html" class="btn btn-primary d-block">Zakazy ugratmak</a>
</div>
</div>
</div>
</div>
</div>
<!-- Cart Area End -->
{% component 'checkout' %}

View File

@ -0,0 +1,8 @@
title = "contact us"
url = "/contact-us"
layout = "default"
is_hidden = 0
[contactForm]
==
{% component 'contactForm' %}

View File

@ -24,16 +24,6 @@ detailsPage = "-"
detailsUrlParameter = "id"
pageNumber = "{{ :page }}"
[builderList builderList3]
modelClass = "TPS\Birzha\Models\Product"
scope = "scopeVipProducts"
scopeValue = "vip"
displayColumn = "name"
noRecordsMessage = "No records found"
detailsPage = "-"
detailsUrlParameter = "id"
pageNumber = "{{ :page }}"
[builderList builderList4]
modelClass = "TPS\Birzha\Models\Category"
scope = "scopeActiveAndParent"
@ -61,7 +51,7 @@ redirect = "index"
==
{% set sliders = builderList.records %}
{% set brandSliders = builderList2.records %}
{% set products = builderList3.records %}
{% set categories = builderList4.records %}
{% set users = builderList5.records %}
@ -76,7 +66,7 @@ redirect = "index"
<section class="welcome_area">
<section class="welcome_area" style="background: ghostwhite;padding-top: 20px;">
<div class="welSlideTwo owl-carousel">
<!-- Single Slide -->
@ -99,15 +89,15 @@ redirect = "index"
</section>
<!-- Shop Catagory Area -->
<div class="shop_by_catagory_area section_padding_100">
<div class="shop_by_catagory_area section_padding_100" style="padding-bottom: 70px;padding-top: 70px;">
<div class="container">
<div class="row">
<!-- <div class="row">
<div class="col-12">
<div class="section-heading mb-50">
<h5>Kategoriýalar</h5>
</div>
</div>
</div>
</div> -->
<div class="row">
<div class="col-12">
@ -116,7 +106,7 @@ redirect = "index"
{% for category in categories %}
<div class="single_catagory_slide">
<a href="{{ 'category-products'|page({categorySlug: category.slug}) }}">
<a href="{{ 'category-profile'|page({categorySlug: category.slug}) }}">
<img src="{{ category.icon|media|resize(127, 127, { mode: 'crop' }) }}" alt="{{ category.name }}">
</a>
<p>{{ category.name }}</p>
@ -135,14 +125,16 @@ redirect = "index"
<!-- Mini slider area-->
<section class="offer_area">
<div class="single-mega cn-col-2 container">
<div class="gurl_slider">
<div class="megamenu-slides owl-carousel">
{% for brandSlider in brandSliders %}
<img src="{{ brandSlider.img|media|resize(600, 259, { mode: 'crop' }) }}" alt="{{ brandSlider.img }}">
<img src="{{ brandSlider.img|media|resize(950) }}" alt="Gurluşyk, Gurluşyk Platforma, Bezeg, Gipsler merkezi">
{% endfor %}
</div>
</div>
</div>
</section>
<!-- Mini slider area-->
@ -153,10 +145,15 @@ redirect = "index"
{% for user in users %}
<div class="col-12 col-md-6 col-lg-4">
<div class="col-4 col-md-4 col-lg-4">
<a href="{{ 'user-profile'|page({id: user.id}) }}">
<div class="single_catagory mb-30">
<img src="{{ user.banner|media|resize(600, 450, { mode: 'crop' }) }}" alt="{{ user.name }}">
<div class="userBannerBg">
<div class="single_catagory">
<img src="{{ user.banner|media|resize( 950, 535, {mode: 'crop'} )}}" alt="Gurluşyk, Gurluşyk Platforma, Bezeg, Gipsler merkezi, {{ user.shop_title }}, {{ user.name }}">
</div>
<div class="userBannerTitle">
{{ user.shop_title }}
</div>
</div>
</a>
</div>
@ -168,62 +165,9 @@ redirect = "index"
</section>
<!-- Brands Area -->
<!-- Popular Items Area -->
<div class="popular_items_area home-3 section_padding_0_70">
<div class="container">
<div class="row">
<div class="col-12">
<div class="popular_section_heading mb-50 text-center">
<h5>VIP harytlar</h5>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="popular_items_slides owl-carousel">
{% for product in products %}
<!-- Single Popular Item -->
<div class="single_popular_item">
<div class="product_image">
<!-- Product Image -->
<img class="first_img" src="{{ product.images[0].thumb(500,625,{'mode':'crop'}) }}" alt="{{ product.name }}">
{% if product.images_count > 1 %}
<img class="hover_img" src="{{ product.images[1].thumb(500,625,{'mode':'crop'}) }}" alt="{{ product.name }}">
{% endif %}
<!-- Wishlist -->
<div class="product_wishlist">
{% if user %}
<a href="wishlist.html"><i class="icofont-heart"></i></a>
{% else %}
<a href="{{ 'login'|page }}"><i class="icofont-heart"></i></a>
{% endif %}
</div>
<!-- Add to cart -->
{% if user %}
<div class="product_add_to_cart">
<a href="#"><i class="icofont-cart"></i> Sebede goş</a>
</div>
{% else %}
<div class="product_add_to_cart">
<a href="{{ 'login'|page }}"><i class="icofont-cart"></i> Sebede goş</a>
</div>
{% endif %}
</div>
<!-- Product Description -->
<div class="product_description">
<h5><a href="{{ 'product'|page({id: product.id}) }}">{{ product.name }}</a></h5>
<h6>{{ product.price }} TMT</h6>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
<!-- Popular Items Area -->
{% partial "home/vip-section" type="vip" header="VIP Harytlar" %}
{% partial "home/parallax" %}
{% partial "home/vip-section" type="new" header="Täze Lýustralar" %}

View File

@ -0,0 +1,9 @@
title = "Teswirler"
url = "/my-comments"
layout = "default"
is_hidden = 0
[mycomments]
perPage = 12
==
{% component 'mycomments' %}

View File

@ -0,0 +1,10 @@
title = "privacy"
url = "/privacy"
layout = "default"
is_hidden = 0
==
<div class="container">
<div class="ty-mainbox-container clearfix"> <div class="ty-mainbox-body"><div class="ty-wysiwyg-content"> <div><p><b><u>“GURLUŞYK”</u></b> </p> <p>GURLUŞYK это онлайн торговая площадка, объединяющая покупателей и продавцов по всему Туркменистану. Стремление клиентов к более низким ценам, лучшему выбору и удобному обслуживанию остается неизменным, несмотря ни на что. Сегодня все эти предпочтения можно найти на сайте <span style="color: rgb(54, 96, 146);"><a href="http://GURLUŞYK.tm">GURLUŞYK.tm</a></span>.</p> <p>&nbsp; </p> <p><b><u>Заявление о миссии:</u></b> </p> <p>Наша миссия - предоставить экономические возможности предпринимателям, предприятиям и организациям любого размера, и быть самой клиентоориентированной компанией Туркменистана. </p> <p>&nbsp; </p> <p><b><u>Продавцам:</u></b> </p> <p>Мы предлагаем продавцам возможность развивать бизнес с небольшими барьерами для входа, независимо от размера, происхождения или расположения. </p> <p>&nbsp; </p> <p><b><u>Покупателям:</u></b>&nbsp;</p> <p>Мы знаем, что у вас высокие стандарты. На GURLUŞYK вы сможете найти нужные товары по разумной цене - без забот!</p></div> </div> </div> </div>
</div>

View File

@ -0,0 +1,14 @@
title = "Zakaz Maglumaty"
url = "/vendor-sale/:id/detail"
layout = "default"
is_hidden = 0
[session]
security = "user"
redirect = "login"
[singlesale]
id = "{{ :id }}"
perPage = 12
==
{% component 'singlesale' %}

View File

@ -0,0 +1,13 @@
title = "Gelen Zakazlar"
url = "/vendor-sales"
layout = "default"
is_hidden = 0
[session]
security = "user"
redirect = "login"
[vendorsales]
perPage = 12
==
{% component 'vendorsales' %}

View File

@ -0,0 +1,8 @@
title = "Dükanyň sazlamalary"
url = "/vendor-settings"
layout = "default"
is_hidden = 0
[shopsettings]
==
{% component 'shopsettings' %}

View File

@ -7,104 +7,8 @@ is_hidden = 0
[session]
security = "user"
redirect = "login"
[myfavourites]
perPage = 12
==
<!-- Breadcumb Area -->
<div class="breadcumb_area">
<div class="container h-100">
<div class="row h-100 align-items-center">
<div class="col-12">
<h5>Halanlarym</h5>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="index.html">Esasy sahypa</a></li>
<li class="breadcrumb-item active">Halanlarym</li>
</ol>
</div>
</div>
</div>
</div>
<!-- Breadcumb Area -->
<!-- Wishlist Table Area -->
<div class="wishlist-table section_padding_100 clearfix">
<div class="container">
<div class="row">
<div class="col-12">
<div class="cart-table wishlist-table">
<div class="table-responsive">
<table class="table table-bordered mb-30">
<thead>
<tr>
<th scope="col"><i class="icofont-ui-delete"></i></th>
<th scope="col">Surat</th>
<th scope="col">Haryt ady</th>
<th scope="col">Bahasy</th>
<th scope="col">Mukdary</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<tr>
<th scope="row">
<i class="icofont-close"></i>
</th>
<td>
<img src="{{ 'assets/img/product-img/onsale-1.png'|theme }}" alt="Product">
</td>
<td>
<a href="#">Haryt ady</a>
</td>
<td>100.00 TMT</td>
<td>
<div class="quantity">
<input type="number" class="qty-text" id="qty2" step="1" min="1" max="99" name="quantity" value="1">
</div>
</td>
<td><a href="#" class="btn btn-primary btn-sm">Sebede goş</a></td>
</tr>
<tr>
<th scope="row">
<i class="icofont-close"></i>
</th>
<td>
<img src="{{ 'assets/img/product-img/onsale-2.png'|theme }}" alt="Product">
</td>
<td>
<a href="#">Haryt ady</a>
</td>
<td>50.00 TMT</td>
<td>
<div class="quantity">
<input type="number" class="qty-text" id="qty3" step="1" min="1" max="99" name="quantity" value="1">
</div>
</td>
<td><a href="#" class="btn btn-primary btn-sm">Sebede goş</a></td>
</tr>
<tr>
<th scope="row">
<i class="icofont-close"></i>
</th>
<td>
<img src="{{ 'assets/img/product-img/onsale-6.png'|theme }}" alt="Product">
</td>
<td>
<a href="#">Haryt ady</a>
</td>
<td>40.00 TMT</td>
<td>
<div class="quantity">
<input type="number" class="qty-text" id="qty4" step="1" min="1" max="99" name="quantity" value="1">
</div>
</td>
<td><a href="#" class="btn btn-primary btn-sm">Sebede goş</a></td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
{% component 'myfavourites' %}

View File

@ -0,0 +1,124 @@
[viewBag]
==
<style>
.single_slide {
position: relative;
z-index: 1;
background-position: center center;
background-size: cover;
height: 340px;
border: 0.3px solid #d5d5d5;
border-radius: 10px;
}
.single_catagory_slide a img {
-webkit-transition-duration: 500ms;
-o-transition-duration: 500ms;
transition-duration: 500ms;
border-radius: 15px !important;
border: 2px solid #d6e6fb;
}
.single_catagory_slide a img:hover {
-webkit-transition-duration: 500ms;
-o-transition-duration: 500ms;
transition-duration: 500ms;
border-radius: 15px !important;
border: 2px solid #ff9800;
}
.gurl_slider .owl-carousel .owl-stage-outer{
height: 300px !important;
border: 1px solid gray;
border-radius: 10px;
}
.userBannerTitle{
padding: 5px;
text-align: center;
}
.userBannerBg{
background: #f37b1c;
color: white;
border-radius: 10px;
}
.userBannerBg:hover{
background: #904000;
color: white;
border-radius: 10px;
}
.bg-overlay::after {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: -1;
content: "";
background-color: #4b3320;
opacity: 0.6;
}
.shop_by_catagory_area::after {
width: 100%;
position: absolute;
height: 50%;
top: 0;
left: 0;
content: '';
background-color: #f8f8ff;
z-index: -1;
border-bottom: 1px solid #d5d5d5;
}
.searchGurl{
border: 1px solid #e5e5e5 !important;
}
.searchGurl:focus {
border: 1px solid #f37b1c !important;
}
.header_area .classynav ul li a {
text-transform: capitalize;
font-size: 14.5px;
height: auto;
line-height: 1;
padding: 15px 10px;
}
.header_area .classynav ul li li a {
padding: 10px 25px;
font-weight: normal;
font-size: 14px;
}
p{
word-wrap: break-word;
}
.nav-brand {
width: 180px;
height: 100%;
}
</style>

View File

@ -1,5 +1,66 @@
[viewBag]
==
<section class="special_feature_area pt-5">
<div class="container">
<div class="row">
<!-- Single Feature Area -->
<div class="col-12 col-sm-6 col-lg-3">
<div class="single_feature_area mb-5 d-flex align-items-center">
<div class="feature_icon">
<i class="icofont-ship"></i>
<span><i class="icofont-check-alt"></i></span>
</div>
<div class="feature_content">
<h6>Free Shipping</h6>
<p>For orders above $100</p>
</div>
</div>
</div>
<!-- Single Feature Area -->
<div class="col-12 col-sm-6 col-lg-3">
<div class="single_feature_area mb-5 d-flex align-items-center">
<div class="feature_icon">
<i class="icofont-box"></i>
<span><i class="icofont-check-alt"></i></span>
</div>
<div class="feature_content">
<h6>Happy Returns</h6>
<p>7 Days free Returns</p>
</div>
</div>
</div>
<!-- Single Feature Area -->
<div class="col-12 col-sm-6 col-lg-3">
<div class="single_feature_area mb-5 d-flex align-items-center">
<div class="feature_icon">
<i class="icofont-money"></i>
<span><i class="icofont-check-alt"></i></span>
</div>
<div class="feature_content">
<h6>100% Money Back</h6>
<p>If product is damaged</p>
</div>
</div>
</div>
<!-- Single Feature Area -->
<div class="col-12 col-sm-6 col-lg-3">
<div class="single_feature_area mb-5 d-flex align-items-center">
<div class="feature_icon">
<i class="icofont-live-support"></i>
<span><i class="icofont-check-alt"></i></span>
</div>
<div class="feature_content">
<h6>Dedicated Support</h6>
<p>We provide support 24/7</p>
</div>
</div>
</div>
</div>
</div>
</section>
<footer class="footer_area section_padding_100_0">
<div class="container">
<div class="row">
@ -86,7 +147,7 @@
<!-- Copywrite -->
<div class="col-12 col-md-6">
<div class="copywrite_text">
<p>TPS tarapyndan ýerine ýetirildi. Ähli hukuklary goralan</p>
<p>Ähli hukuklary goralan</p>
</div>
</div>
<!-- Payment Method -->

View File

@ -37,55 +37,36 @@ pageNumber = "{{ :page }}"
{% set lastFourCategories = builderList2.records %}
{% set categories = builderList3.records %}
<header class="header_area">
<div class="top-header-area">
<div class="container h-100">
<div class="row h-100 align-items-center">
<div class="col-6">
<div class="welcome-note">
<span class="popover--text" data-toggle="popover" data-content="Welcome to Bigshop ecommerce template."><i class="icofont-info-square"></i></span>
<span class="text">Ýokary hilli gurluşyk harytlary</span>
</div>
</div>
<div class="col-6">
<div class="language-currency-dropdown d-flex align-items-center justify-content-end">
<!-- Language Dropdown -->
<header class="header_area" style="border-top: 10px solid #f37b1c;">
<!-- Top Header Area -->
<div class="container">
<ul class="top_header">
{% if user %}
<div class="language-dropdown">
<div class="dropdown">
<a class="btn btn-sm" href="{{ 'addProduct'|page }}" role="button">
<li>
<a href="{{ 'addProduct'|page }}">
Haryt goşmak
</a>
</div>
</div>
<div class="language-dropdown">
<div class="dropdown">
<a class="btn btn-sm" data-request="onLogout" data-request-data="redirect: '/'" role="button">
</li>
<li>
<a class="customA" data-request="onLogout" data-request-data="redirect: '/'" role="button">
Çykmak
</a>
</div>
</div>
</li>
{% endif %}
{% if not user %}
<div class="language-dropdown">
<div class="dropdown">
<a class="btn btn-sm" href="{{ 'login'|page }}" role="button">
<li>
<a href="{{ 'login'|page }}">
Içeri girmek
</a>
</div>
</div>
</li>
{% endif %}
<div class="language-dropdown">
<div class="dropdown">
<a class="btn btn-sm dropdown-toggle" href="#" role="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{activeLocaleName|upper}}
<a class="btn btn-sm dropdown-toggle" style="color: #999; padding: 0; text-transform: capitalize;" href="#" role="button" id="dropdownMenu1" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{activeLocaleName}}
</a>
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="dropdownMenu1">
@ -93,7 +74,7 @@ pageNumber = "{{ :page }}"
{% if code != activeLocale %}
<a class="dropdown-item" href="{{ url('/' ~ code) }}">
{{name|upper }}
{{name }}
</a>
{% endif %}
{% endfor %}
@ -101,21 +82,72 @@ pageNumber = "{{ :page }}"
</div>
</div>
</ul>
</div>
</div>
</div>
</div>
</div>
<!-- Main Menu -->
<div class="bigshop-main-menu">
<div class="bigshop-main-menu" style="border-bottom: 1px solid #d5d5d5;">
<div class="container">
<div class="bigshop_box">
<!-- Nav Brand -->
<a href="{{ 'index'|page }}" class="nav-brand"><img src="{{ 'assets/img/logo/gurlushyk-logo2.png'|theme }}" alt="logo"></a>
<!-- Search -->
<div class="header_box-search-input">
<form action="{{ 'search'|page }}" method="GET">
<input class="searchGurl" type="search" name="name" placeholder="Gözleg">
<button type="button">
<svg fill="#f27a1a" width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M21.71,20.29,18,16.61A9,9,0,1,0,16.61,18l3.68,3.68a1,1,0,0,0,1.42,0A1,1,0,0,0,21.71,20.29ZM11,18a7,7,0,1,1,7-7A7,7,0,0,1,11,18Z"></path>
</svg>
</button>
<input type="submit" class="d-none" value="Gözlemek">
</form>
</div>
<!-- Hero Meta -->
<div class="hero_meta_area">
<!-- Wishlist -->
<div class="wishlist-area">
<a href="{{ 'wishlist'|page }}" class="wishlist-btn"><i class="icofont-heart"></i></a>
</div>
<!-- Cart -->
<!-- Cart -->
<div class="cart-area">
<a href="{{ 'checkout'|page }}">
<div class="cart--btn"><i class="icofont-cart"></i>
<span class="cart_quantity" id="cardQuantity">0</span>
</div>
</a>
</div>
<!-- Account -->
<div class="account-area">
<div class="user-thumbnail">
<i class="icofont-user" aria-hidden="true"></i>
</div>
{% if user %}
<ul class="user-meta-dropdown">
<li class="user-title"><span>Salam,</span> {{ user.name }}</li>
<li><a href="{{ 'my-offers'|page }}">Harytlarym</a></li>
<li><a href="{{ 'vendor-settings'|page }}">Dükanyň sazlamalary</a></li>
<li><a href="{{ 'my-comments'|page }}">Teswirler</a></li>
<li><a href="{{ 'vendor-sales'|page }}">Gelen sargytlar</a></li>
</ul>
{% endif %}
</div>
</div>
</div>
<div class="classy-nav-container breakpoint-off">
<nav class="classy-navbar" id="bigshopNav">
<!-- Nav Brand -->
<a href="{{ 'index'|page }}" class="nav-brand"><img src="{{ 'assets/img/logo/gurlushyk-logo2.png'|theme }}" alt="logo" width="140px" height="35px"></a>
<!-- Toggler -->
<div class="classy-navbar-toggler">
<span class="navbarToggler"><span></span><span></span><span></span></span>
@ -131,115 +163,81 @@ pageNumber = "{{ :page }}"
<!-- Nav -->
<div class="classynav">
<ul>
<li><a href="{{ 'index'|page }}">Esasy sahypa</a></li>
<li><a href="{{ 'about'|page }}">Biz barada</a></li>
<li><a href="#">Kategoriýalar</a>
{% for key, item in staticMenu.menuItems %}
{% if not item.viewBag.isHidden and item.items|length %}
{% if key != 0 %}
<li style="font-size: 12px;color: #b2b2b2;margin-left: 15px;"> | </li>
{% endif %}
<li class="megamenu-item"><a href="#">{{ item.title }}</a>
<div class="megamenu">
<a href="{{item.url}}" style="{% if key == 0 %}padding-left: 0px;{% endif %} font-size: 19px;font-weight: bold;padding-left: 30px;padding-top: 30px;color: #000000;text-decoration: underline;">{{ item.title }}</a>
<ul class="single-mega cn-col-4">
{% for category in firstFourCategories %}
<li><a href="{{ 'category-products'|page({categorySlug: category.slug}) }}">{{ category.name }}</a></li>
{% for item in item.items if item.viewBag.cssClass == 1 %}
<li><a href="{{ item.url }}">- {{ item.title }}</a></li>
{% endfor %}
</ul>
<ul class="single-mega cn-col-4">
{% for category in lastFourCategories %}
<li><a href="{{ 'category-products'|page({categorySlug: category.slug}) }}">{{ category.name }}</a></li>
{% endfor %}
</ul>
<div class="single-mega cn-col-2">
<div class="megamenu-slides owl-carousel">
{% for category in categories %}
<a href="{{ 'category-products'|page({categorySlug: category.slug}) }}">
<img src="{{ category.icon|media|resize(415, 179, { mode: 'crop' }) }}" alt="{{ category.name }}">
</a>
{% endfor %}
</div>
</div>
<ul class="single-mega cn-col-4">
{% for item in item.items if item.viewBag.cssClass == 2 %}
<li><a href="{{ item.url }}">- {{ item.title }}</a></li>
{% endfor %}
</ul>
<ul class="single-mega cn-col-4">
{% for item in item.items if item.viewBag.cssClass == 3 %}
<li><a href="{{ item.url }}">- {{ item.title }}</a></li>
{% endfor %}
</ul>
<ul class="single-mega cn-col-4">
{% for item in item.items if item.viewBag.cssClass == 4 %}
<li><a href="{{ item.url }}">- {{ item.title }}</a></li>
{% endfor %}
</ul>
</div>
</li>
{% elseif not item.viewBag.isHidden %}
{% if key != 0 %}
<li style="font-size: 12px;color: #b2b2b2;margin-left: 15px;"> | </li>
{% endif %}
<li><a href="{{ item.url }}" style="{% if key == 0 %}padding-left: 0px;{% endif %}">{{item.title}}</a></li>
{% endif %}
{% endfor %}
</ul>
</div>
</div>
<!-- Hero Meta -->
<div class="hero_meta_area ml-auto d-flex align-items-center justify-content-end">
<!-- Search -->
<div class="search-area">
<div class="search-btn"><i class="icofont-search"></i></div>
<!-- Form -->
<div class="search-form">
<form action="{{ 'search'|page }}" method="GET">
<input type="search" name="name" class="form-control" placeholder="Gözleg">
<form class="header_box-search-input burger">
<input type="search" name="name" placeholder="Gözleg">
<input type="submit" class="d-none" value="Gözlemek">
<button type="button">
<svg fill=" #f27a1a" width="24px" height="24px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path d="M21.71,20.29,18,16.61A9,9,0,1,0,16.61,18l3.68,3.68a1,1,0,0,0,1.42,0A1,1,0,0,0,21.71,20.29ZM11,18a7,7,0,1,1,7-7A7,7,0,0,1,11,18Z"></path>
</svg>
</button>
</form>
</div>
</div>
{% if user %}
<!-- Wishlist -->
<div class="wishlist-area">
<a href="{{ 'wishlist'|page }}" class="wishlist-btn"><i class="icofont-heart"></i></a>
</div>
<!-- Cart -->
<div class="cart-area">
<div class="cart--btn"><i class="icofont-cart"></i> <span class="cart_quantity">2</span></div>
<!-- Cart Dropdown Content -->
<div class="cart-dropdown-content">
<ul class="cart-list">
<li>
<div class="cart-item-desc">
<a href="#" class="image">
<img src="{{ 'assets/img/product-img/top-1.png'|theme }}" class="cart-thumb" alt="">
</a>
<div>
<a href="#">Haryt ady</a>
<p>1 x - <span class="price">100.00 TMT</span></p>
</div>
</div>
<span class="dropdown-product-remove"><i class="icofont-bin"></i></span>
</li>
</ul>
<div class="cart-pricing my-4">
<ul>
<li>
<span>Harytlaryň jemi:</span>
<span>300.00 TMT</span>
</li>
<li>
<span>Eltip bermek:</span>
<span>30.00 TMT</span>
</li>
<li>
<span>Umumy:</span>
<span>330.00</span>
</li>
</ul>
</div>
<div class="cart-box">
<a href="{{ 'checkout'|page }}" class="btn btn-primary d-block">Satyn almak</a>
</div>
</div>
</div>
<!-- Account -->
<div class="account-area">
<div class="user-thumbnail">
<i class="icofont-user" aria-hidden="true"></i>
</div>
<ul class="user-meta-dropdown">
<li class="user-title"><span>Salam,</span> {{ user.name }}</li>
<li><a href="{{ 'my-offers'|page }}">Harytlarym</a></li>
</ul>
</div>
{% endif %}
</div>
</nav>
</div>
</div>
</div>
</header>
</header>

View File

@ -0,0 +1,15 @@
[viewBag]
==
<section class="weekly_deals_area home-3 section_padding_100 jarallax bg-overlay mb-50" style="background-image: url({{'home/deals.jpg'|media}});">
<div class="container">
<div class="row">
<div class="col-12">
<div class="weekly_deals_content text-center">
<h3>Gipsler Merkezi</h3>
<p>Dünýä standartlaryna laýyklykda, ýokary hilli gipsler.<br> Hormatly müşderiler siz öz islegleriňize görä islendik gipsleri sargyt edip bilersiňiz.</p>
<a href="/user-profile/18" class="btn btn-primary" style="animation-delay: 600ms; opacity: 1;">KATALOG</a>
</div>
</div>
</div>
</div>
</section>

View File

@ -0,0 +1,42 @@
[viewBag]
==
<?php
function onStart(){
$type = $this->type;
$this["productsq"] = TPS\Birzha\Models\Product::where("type", $type)->get();
}
?>
==
<!-- Popular Items Area -->
<div class="popular_items_area home-3 section_padding_0_70">
<div class="container">
<div style="padding: 20px;border-radius: 6px;box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.05);background-color: #ffe0c7;border: 1px solid #fdc495;">
<div class="row">
<div class="col-12">
<div class="popular_section_heading mb-30 text-center">
<h5 style="text-transform: capitalize;text-align:left;color:black;font-weight:bold;">{{header}}</h5>
</div>
</div>
</div>
<div class="row">
<div class="col-12">
<div class="popular_items_slides owl-carousel">
{% for product in productsq %}
{% partial "product/card-item" product=product %}
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Popular Items Area -->

View File

@ -0,0 +1,37 @@
[viewBag]
==
<!-- Single Popular Item -->
<div class="single_popular_item">
<div class="product_image">
<!-- Product Image -->
<img class="first_img" src="{{ product.images[0].thumb(500,625,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk Platforma, Bezeg, Gipsler merkezi, {{ product.name }}">
{% if product.images_count > 1 %}
<img class="hover_img" src="{{ product.images[1].thumb(500,625,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk Platforma, Bezeg, Gipsler merkezi, {{ product.name }}">
{% endif %}
<!-- Wishlist -->
<div class="product_wishlist">
{% if user %}
<a href="wishlist.html"><i class="icofont-heart"></i></a>
{% else %}
<a href="{{ 'login'|page }}"><i class="icofont-heart"></i></a>
{% endif %}
</div>
<!-- Add to cart -->
{% if user %}
<div class="product_add_to_cart" data-id="{{ product.id }}" data-price="{{ product.price }}" data-image="{{ product.images[0].path }}" data-name="{{ product.name }}" data-vendor="{{ product.vendor.id }}">
<input type="hidden" min="1" id="quantity{{ product.id }}" value="1">
<a href="#"><i class="icofont-shopping-cart"></i> Sebede goş</a>
</div>
{% else %}
<div class="product_add_to_cart">
<a href="{{ 'login'|page }}"><i class="icofont-shopping-cart"></i> Sebede goş</a>
</div>
{% endif %}
</div>
<!-- Product Description -->
<div class="product_description">
<h5><a href="{{ 'product'|page({id: product.id}) }}">{{ product.name }}</a></h5>
<h6>{{ product.price }} TMT</h6>
</div>
</div>