from server 21.10

This commit is contained in:
Shohrat 2023-10-22 13:08:31 +00:00
parent 7123184de0
commit 17e2de75ea
83 changed files with 2933 additions and 915 deletions

View File

@ -305,13 +305,21 @@ class BlogPostsApiController extends Controller
public function getPlaces(Request $request)
{
$data = $request->all();
//$id = $data["primary"] ?? 0;
$data = City::with([
'translations:locale,model_id,attribute_data',
])
->where('primary_key', $data["primary"] ?? 0)
->paginate(100);
->paginate(100)->toArray();
// array_unshift($data["data"], array(
// "id" => 0,
// "name" => "Ählisi",
// "order" => 0,
// ));
return response()->json($data, 200);
}
@ -342,7 +350,9 @@ class BlogPostsApiController extends Controller
->first();
$data->pathUrl = 'https://gurlushyk.com.tm' . \Config::get('cms.storage.media.path');
$data->categories[0] = array(
$data->categories[] = array(
"id" => 0,
"name"=> "Hemmesi",
);

View File

@ -38,7 +38,7 @@ class CategoriesAPIController extends Controller
->where('primary_key', $data["primary"] ?? 0)
->orderBy('sort_order', 'asc')
->active()
->paginate(9);
->paginate(99);
}else{
$dataCat = $this->Category
->select('id', 'name', 'icon', 'status', 'slug', 'sort_order', 'is_featured', 'is_file_category', 'primary_key')
@ -47,13 +47,16 @@ class CategoriesAPIController extends Controller
->where('primary_key', $data["primary"] ?? 0)
->orderBy('sort_order', 'asc')
->active()
->paginate(9);
->paginate(99);
}
if($dataCat) {
$dataCat->each(function ($item, $key) {
$dataHaveSub = $this->Category->where("primary_key", $item->id)->count();
$item->icon = 'https://gurlushyk.com.tm' . \Config::get('cms.storage.media.path') . $item->icon;
$item->sub_category = $dataHaveSub > 0 ? true : false;
});
}
@ -88,7 +91,7 @@ class CategoriesAPIController extends Controller
}
public function subs($id){
$subs = Category::where('primary_key', $id)->get();
$subs = Category::where('primary_key', $id)->with("subs")->get();
return $subs;
}

View File

@ -5,6 +5,7 @@ use Illuminate\Http\Request;
use AhmadFatoni\ApiGenerator\Helpers\Helpers;
use Illuminate\Support\Facades\Validator;
use TPS\Birzha\Models\Product;
use TPS\Birzha\Models\Favourites;
use TPS\Birzha\Models\Category;
use TPS\Birzha\Models\City;
use TPS\Birzha\Models\Term;
@ -15,6 +16,7 @@ use TPS\Birzha\Classes\ErrorResponseApi;
use TPS\Birzha\Classes\MeasureResource;
use TPS\Birzha\Classes\ProductResource;
use DB;
use Carbon\Carbon;
class ProductsAPIController extends Controller
{
@ -142,7 +144,7 @@ class ProductsAPIController extends Controller
$query->select(DB::raw('avg(rating)'));
}])
->where('vendor_id', $seller)
->approved();
->approved()->orderBy('ends_at', $sortOrder);
}
@ -159,6 +161,8 @@ class ProductsAPIController extends Controller
->with([
'translations:locale,model_id,attribute_data',
'images:attachment_id,attachment_type,disk_name,file_name',
'vendor:id,name,email,type,logo,banner,shop_title,slogan,is_instagram',
'place',
])->approved()->orderBy('id', $sortOrder);
}else{
@ -168,6 +172,8 @@ class ProductsAPIController extends Controller
->with([
'translations:locale,model_id,attribute_data',
'images:attachment_id,attachment_type,disk_name,file_name',
'vendor:id,name,email,type,logo,banner,shop_title,slogan,is_instagram',
'place',
])
->withCount(['comments as rating_avg' => function($query) {
$query->select(DB::raw('avg(rating)'));
@ -283,7 +289,7 @@ class ProductsAPIController extends Controller
}
$data = $query ? $query->paginate($perPage) : null;
$data = $query ? $query->orderBy('id', "DESC")->orderBy('ends_at', $sortOrder)->paginate($perPage) : null;
return response()->json($data, 200);
@ -298,9 +304,9 @@ class ProductsAPIController extends Controller
$data = $this->Product::with([
'translations:locale,model_id,attribute_data',
'images:attachment_id,attachment_type,disk_name,file_name',
'images:id,attachment_id,attachment_type,disk_name,file_name',
'vendor:id,name,surname,email,username,logo,banner,type',
'files', 'place',
'files', 'place', 'categories:id,name,slug,primary_key,icon'
])
//->withCount('comments')->withAvg('comments', 'rating')
->withCount(['comments as rating_avg' => function($query) {
@ -382,23 +388,16 @@ class ProductsAPIController extends Controller
$product = new $this->Product;
$product->translateContext('tm');
$product->name = $data['name_tm'];
//$product->setAttributeTranslated('name', $data['name_ru'], 'ru');
$product->translateContext('tm');
$product->description = $data['description_tm'];
$product->short_description = $data['short_description'];
// Sets a single translated attribute for a language
// $product->setAttributeTranslated('description', $data['description_ru'], 'ru');
//$product->setAttributeTranslated('slug', \Str::slug($data['name_ru'],'-'), 'ru');
$product->slug = \Str::slug($data['name_tm'],'-');
$product->status = 'new';
@ -484,57 +483,77 @@ class ProductsAPIController extends Controller
}
$data = $request->all();
$rules = [
'quantity' => 'required|numeric|integer',
//'name_ru' => 'required',
'name_tm' => 'required',
'price' => 'required|numeric',
'place' => 'required',
'place_id' => 'required',
'description_tm' => 'required',
// 'description_en' => 'required',
'description_ru' => 'required',
'payment_term_id' => [
'required',
'exists:tps_birzha_terms,id',
// in terms table it must have type = payment
function ($attribute, $value, $fail) {
$t = Term::find($value);
if($t) {
if($t->type != 'payment') $fail(":attribute is invalid");
}
}
],
'packaging' => 'required|in:yes,no',
'delivery_term_id' => [
'required',
'exists:tps_birzha_terms,id',
// in terms table it must have type = delivery
function ($attribute, $value, $fail) {
$t = Term::find($value);
if($t) {
if($t->type != 'delivery') $fail(":attribute is invalid");
}
}
],
'currency_id' => 'required|exists:tps_birzha_currencies,id',
'measure_id' => [
'required',
// validation for measure deleted_at field - it should
// be null, means it should not be deleted (exists rule not working)
function ($attribute, $value, $fail) {
$m = Measure::find($value);
if(!$m) $fail(":attribute is invalid");
}
],
'old_img' => 'array',
//'description_ru' => 'required',
'new_img' => 'array',
'is_file' => 'required',
'old_img' => 'array',
// allowed only jpg & png files with size <= 1024
'new_img.*' => 'mimes:jpg,png|max:1024',
//'new_file.*' => 'max:9024',
'category_id' => [
'required',
'exists:tps_birzha_categories,id',
// validation for category status - it should be active
function ($attribute, $value, $fail) {
$c = Category::find($value);
if($c) {
if($c->status != 1) $fail(":attribute is non-active!");
}
}
],
//'place_id' => 'required',
];
$validator = $this->validateForm($data, $rules);
if($validator->fails()) {
return $this->helpers->apiArrayResponseBuilder(400, 'fail', $validator->errors() );
}
if($data['is_file'] == 1){
// validate if no old images and no new images
if(!$request->has('new_file')) {
return response()->json(ErrorResponseApi::translateErrorMessage('atleast_1_file'), 400);
}
// if new_img field is passed but empty
if($request->has('new_file')) {
$rules = [
'new_file' => 'required'
];
$validator = $this->validateForm($data, $rules);
if($validator->fails()) {
return $this->helpers->apiArrayResponseBuilder(400, 'fail', $validator->errors() );
}
}
try {
foreach($data['new_file'] ?? [] as $key => $fileq) {
$product->files = $fileq;
$product->save();
}
} catch(\Throwable $e) {
return $this->helpers->apiArrayResponseBuilder(500, 'server error', ['message' => 'something went wrong file']);
}
}
// validate if no old images and no new images
if((!$request->has('new_img') && !$request->has('old_img'))) {
@ -577,6 +596,106 @@ class ProductsAPIController extends Controller
return $this->helpers->apiArrayResponseBuilder(200, 'ok', ['message' => 'updated successfully']);
}
public function checkUserHasProduct($id)
{
$currentUser = \JWTAuth::parseToken()->authenticate();
return $currentUser->products->find($id);
}
public function updateStatus($id){
if(!$product = $this->checkUserHasProduct($id)) {
return $this->helpers->apiArrayResponseBuilder(404, 'not found', ['error' => "Resource id = {$id} could not be found"]);
}
try {
if($product){
if($product->status == "disabled"){
$product->status = "new";
$product->save();
}else{
$product->status = "disabled";
$product->save();
}
}
} catch(\Throwable $e) {
return $this->helpers->apiArrayResponseBuilder(500, 'server error', ['message' => 'something went wrong']);
}
return $this->helpers->apiArrayResponseBuilder(200, 'ok', ['message' => 'updated successfully']);
}
public function updateEndsAt($id){
$currentDate = Carbon::now()->timezone('UTC +05:00');
$currentDateFormat = $currentDate->format('Y-m-d');
if(!$product = $this->checkUserHasProduct($id)) {
return $this->helpers->apiArrayResponseBuilder(404, 'not found', ['error' => "Resource id = {$id} could not be found"]);
}
try {
if($product){
$product->ends_at = $currentDateFormat;
$product->save();
}
} catch(\Throwable $e) {
return $this->helpers->apiArrayResponseBuilder(500, 'server error', ['message' => 'something went wrong']);
}
return $this->helpers->apiArrayResponseBuilder(200, 'ok', ['message' => 'updated successfully']);
}
protected function fillProduct($data, $attachedProduct) {
$attachedProduct->translateContext('tm');
$attachedProduct->name = $data['name_tm'];
$attachedProduct->translateContext('tm');
$attachedProduct->description = $data['description_tm'];
$attachedProduct->short_description = $data['short_description'];
$attachedProduct->slug = \Str::slug($data['name_tm'],'-');
$attachedProduct->status = 'new';
$attachedProduct->place_id = $data['place_id'];
$attachedProduct->price = $data['price'];
$attachedProduct->phone = $data['phone'];
$attachedProduct->is_file_product = $data['is_file'];
$attachedProduct->save();
return $attachedProduct;
}
/**
* Delete my product
@ -674,21 +793,7 @@ class ProductsAPIController extends Controller
return Validator::make($data, $rules);
}
protected function fillProduct($data, $attachedProduct) {
$attachedProduct->translateContext('tm');
$attachedProduct->description = $data['description_tm'];
// Sets a single translated attribute for a language
$attachedProduct->setAttributeTranslated('description', $data['description_ru'], 'ru');
$attachedProduct->price = $data['price'];
$attachedProduct->place = $data['place'];
$attachedProduct->save();
return $attachedProduct;
}
public function myProducts()
{
@ -719,14 +824,18 @@ class ProductsAPIController extends Controller
if(!$product = $this->checkUserHasProduct($id)) {
return $this->helpers->apiArrayResponseBuilder(404, 'not found', ['error' => "Resource id = {$id} could not be found"]);
} else {
return new ProductResource($product);
return $product;
}
}
public function checkUserHasProduct($id)
{
$currentUser = \JWTAuth::parseToken()->authenticate();
return $currentUser->products->find($id);
public function createFav($id){
$favourite = Favourites::firstOrCreate([
"product_id" => $id,
"user_id" => \Auth::user()->id,
]);
return $this->helpers->apiArrayResponseBuilder(200, 'ok', ['message' => 'Added to wishlist']);
}
}

View File

@ -0,0 +1,55 @@
<?php namespace AhmadFatoni\ApiGenerator\Controllers\API;
use Cms\Classes\Controller;
use BackendMenu;
use Illuminate\Http\Request;
use AhmadFatoni\ApiGenerator\Helpers\Helpers;
use Illuminate\Support\Facades\Validator;
use Sms\Sms\Models\SmsSender;
class SmsApiController extends Controller
{
protected $SmsSender;
protected $helpers;
public function __construct(SmsSender $SmsSender, Helpers $helpers)
{
parent::__construct();
$this->SmsSender = $SmsSender;
$this->helpers = $helpers;
}
public function index(){
$otps = SmsSender::where('status', false)->get();
$answer = [];
foreach ($otps as $item) {
$answer[] = ["phone_number" => (string)$item->phone, "body" => (string) $item->message];
$item->status = true;
$item->save();
}
$data = [
"error"=> null,
"message"=> "OK",
"status" => 200,
"category"=> null,
"data" => $answer
];
return response()->json($data, 200);
}
public static function getAfterFilters() {return [];}
public static function getBeforeFilters() {return [];}
public static function getMiddleware() {return [];}
public function callAction($method, $parameters=false) {
return call_user_func_array(array($this, $method), $parameters);
}
}

View File

@ -5,12 +5,19 @@ Route::post('fatoni/update/api/{id}', array('as' => 'fatoni.update.api', 'uses'
Route::get('fatoni/delete/api/{id}', array('as' => 'fatoni.delete.api', 'uses' => 'AhmadFatoni\ApiGenerator\Controllers\ApiGeneratorController@deleteApi'));
Route::group(['prefix' =>'api/v1','namespace' =>'AhmadFatoni\ApiGenerator\Controllers\API'],function ($route){
Route::get('sms', 'SmsApiController@index');
Route::resource('categories', 'CategoriesAPIController', ['except' => ['destroy', 'create', 'edit']]);
Route::get('category/{id}/subs', ['as' => 'category.subs', 'uses' => 'CategoriesAPIController@subs']);
Route::get('product/{id}/add-wishlist', ['as' => 'create.fav', 'uses' => 'ProductsApiController@createFav']);
Route::get('products', ['as' => 'products.index', 'uses' => 'ProductsApiController@index']);
Route::get('category/filters', 'CategoriesAPIController@getFilters');
@ -52,6 +59,14 @@ 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('update/products/{id}', 'ProductsApiController@update');
Route::post('update/status/{id}', 'ProductsApiController@updateStatus');
Route::delete('delete/product/{id}', 'ProductsApiController@delete');
Route::delete('products/{id}/image-delete/{image_id}', 'ProductsApiController@imageDelete')
->where(['id' => '[0-9]+', 'image_id' => '[0-9]+']);
Route::post('update/product/ends_at/{id}', 'ProductsApiController@updateEndsAt');
Route::post('make/order', 'OrderApiController@createOrder');
Route::get('my/orders', 'OrderApiController@myOrders');
Route::get('vendor/sale/orders', 'OrderApiController@mySaleOrders');
@ -96,14 +111,10 @@ Route::group(['prefix' =>'api/v1','namespace' =>'AhmadFatoni\ApiGenerator\Contro
//Balance
// Route::post('balance_bank_transfer','BalanceController@createBankTransfer');
});
Route::get('bank-info', 'BanksApiController@getBankInfo');
Route::get('bank-types', 'BanksApiController@getBankTypes');
});

View File

@ -1,93 +0,0 @@
{% 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

@ -9,6 +9,7 @@ use Carbon\Carbon;
use October\Rain\Auth\Models\User as UserBase;
use RainLab\User\Models\Settings as UserSettings;
use October\Rain\Auth\AuthException;
use TPS\Birzha\Models\Message;
class User extends UserBase
{
@ -65,7 +66,7 @@ class User extends UserBase
'comments' => ['TPS\Birzha\Models\Comment','table' => 'tps_birzha_comments'],
'orders' => ['TPS\Birzha\Models\Orders','table' => 'tps_birzha_orders'],
'vendor_sales' => ['TPS\Birzha\Models\VendorSales', 'key' => 'vendor_id', 'softDelete' => true],
'messages' => ['TPS\Birzha\Models\Message', 'key' => 'reciver_id', 'softDelete' => true],
];
/**
@ -225,6 +226,11 @@ class User extends UserBase
'&d='.urlencode($default);
}
}
public function getUnreadMessagesCount(){
$count = Message::where('reciver_id', $this->id)->whereNull('read_at')->whereNull('deleted_at')->count();
return $count;
}
/**
* Returns the name for the user's login.

View File

@ -185,14 +185,11 @@ tabs:
tab: 'Sosial Mediýalar'
web1:
label: 'Web-de sahypa gornushleri'
span: auto
options:
variant1: '1-nji Versia'
variant2: '2-nji Versia'
variant3: '3-nji Versia'
variant4: '4-nji Versia'
variant5: '5-nji Versia'
variant6: '6-nji Versia'
span: auto
default: variant1
type: balloon-selector
tab: 'Web Wariantlar'
secondaryTabs:

View File

@ -0,0 +1,14 @@
<?php namespace Sms\Sms;
use System\Classes\PluginBase;
class Plugin extends PluginBase
{
public function registerComponents()
{
}
public function registerSettings()
{
}
}

View File

@ -0,0 +1,18 @@
<?php namespace Sms\Sms\Controllers;
use Backend\Classes\Controller;
use BackendMenu;
class SmsSender extends Controller
{
public $implement = [ 'Backend\Behaviors\ListController', 'Backend\Behaviors\FormController' ];
public $listConfig = 'config_list.yaml';
public $formConfig = 'config_form.yaml';
public function __construct()
{
parent::__construct();
BackendMenu::setContext('Sms.Sms', 'main-menu-item');
}
}

View File

@ -0,0 +1,18 @@
<div data-control="toolbar">
<a href="<?= Backend::url('sms/sms/smssender/create') ?>" class="btn btn-primary oc-icon-plus"><?= e(trans('backend::lang.form.create')) ?></a>
<button
class="btn btn-default oc-icon-trash-o"
disabled="disabled"
onclick="$(this).data('request-data', {
checked: $('.control-list').listWidget('getChecked')
})"
data-request="onDelete"
data-request-confirm="<?= e(trans('backend::lang.list.delete_selected_confirm')) ?>"
data-trigger-action="enable"
data-trigger=".control-list input[type=checkbox]"
data-trigger-condition="checked"
data-request-success="$(this).prop('disabled', true)"
data-stripe-load-indicator>
<?= e(trans('backend::lang.list.delete_selected')) ?>
</button>
</div>

View File

@ -0,0 +1,10 @@
name: SmsSender
form: $/sms/sms/models/smssender/fields.yaml
modelClass: Sms\Sms\Models\SmsSender
defaultRedirect: sms/sms/smssender
create:
redirect: 'sms/sms/smssender/update/:id'
redirectClose: sms/sms/smssender
update:
redirect: sms/sms/smssender
redirectClose: sms/sms/smssender

View File

@ -0,0 +1,12 @@
list: $/sms/sms/models/smssender/columns.yaml
modelClass: Sms\Sms\Models\SmsSender
title: SmsSender
noRecordsMessage: 'backend::lang.list.no_records'
showSetup: true
showCheckboxes: true
recordsPerPage: 20
toolbar:
buttons: list_toolbar
search:
prompt: 'backend::lang.list.search_prompt'
recordUrl: 'sms/sms/smssender/update/:id'

View File

@ -0,0 +1,46 @@
<?php Block::put('breadcrumb') ?>
<ul>
<li><a href="<?= Backend::url('sms/sms/smssender') ?>">SmsSender</a></li>
<li><?= e($this->pageTitle) ?></li>
</ul>
<?php Block::endPut() ?>
<?php if (!$this->fatalError): ?>
<?= Form::open(['class' => 'layout']) ?>
<div class="layout-row">
<?= $this->formRender() ?>
</div>
<div class="form-buttons">
<div class="loading-indicator-container">
<button
type="submit"
data-request="onSave"
data-hotkey="ctrl+s, cmd+s"
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
class="btn btn-primary">
<?= e(trans('backend::lang.form.create')) ?>
</button>
<button
type="button"
data-request="onSave"
data-request-data="close:1"
data-hotkey="ctrl+enter, cmd+enter"
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
class="btn btn-default">
<?= e(trans('backend::lang.form.create_and_close')) ?>
</button>
<span class="btn-text">
<?= e(trans('backend::lang.form.or')) ?> <a href="<?= Backend::url('sms/sms/smssender') ?>"><?= e(trans('backend::lang.form.cancel')) ?></a>
</span>
</div>
</div>
<?= Form::close() ?>
<?php else: ?>
<p class="flash-message static error"><?= e(trans($this->fatalError)) ?></p>
<p><a href="<?= Backend::url('sms/sms/smssender') ?>" class="btn btn-default"><?= e(trans('backend::lang.form.return_to_list')) ?></a></p>
<?php endif ?>

View File

@ -0,0 +1 @@
<?= $this->listRender() ?>

View File

@ -0,0 +1,22 @@
<?php Block::put('breadcrumb') ?>
<ul>
<li><a href="<?= Backend::url('sms/sms/smssender') ?>">SmsSender</a></li>
<li><?= e($this->pageTitle) ?></li>
</ul>
<?php Block::endPut() ?>
<?php if (!$this->fatalError): ?>
<div class="form-preview">
<?= $this->formRenderPreview() ?>
</div>
<?php else: ?>
<p class="flash-message static error"><?= e($this->fatalError) ?></p>
<?php endif ?>
<p>
<a href="<?= Backend::url('sms/sms/smssender') ?>" class="btn btn-default oc-icon-chevron-left">
<?= e(trans('backend::lang.form.return_to_list')) ?>
</a>
</p>

View File

@ -0,0 +1,54 @@
<?php Block::put('breadcrumb') ?>
<ul>
<li><a href="<?= Backend::url('sms/sms/smssender') ?>">SmsSender</a></li>
<li><?= e($this->pageTitle) ?></li>
</ul>
<?php Block::endPut() ?>
<?php if (!$this->fatalError): ?>
<?= Form::open(['class' => 'layout']) ?>
<div class="layout-row">
<?= $this->formRender() ?>
</div>
<div class="form-buttons">
<div class="loading-indicator-container">
<button
type="submit"
data-request="onSave"
data-request-data="redirect:0"
data-hotkey="ctrl+s, cmd+s"
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
class="btn btn-primary">
<?= e(trans('backend::lang.form.save')) ?>
</button>
<button
type="button"
data-request="onSave"
data-request-data="close:1"
data-hotkey="ctrl+enter, cmd+enter"
data-load-indicator="<?= e(trans('backend::lang.form.saving')) ?>"
class="btn btn-default">
<?= e(trans('backend::lang.form.save_and_close')) ?>
</button>
<button
type="button"
class="oc-icon-trash-o btn-icon danger pull-right"
data-request="onDelete"
data-load-indicator="<?= e(trans('backend::lang.form.deleting')) ?>"
data-request-confirm="<?= e(trans('backend::lang.form.confirm_delete')) ?>">
</button>
<span class="btn-text">
<?= e(trans('backend::lang.form.or')) ?> <a href="<?= Backend::url('sms/sms/smssender') ?>"><?= e(trans('backend::lang.form.cancel')) ?></a>
</span>
</div>
</div>
<?= Form::close() ?>
<?php else: ?>
<p class="flash-message static error"><?= e(trans($this->fatalError)) ?></p>
<p><a href="<?= Backend::url('sms/sms/smssender') ?>" class="btn btn-default"><?= e(trans('backend::lang.form.return_to_list')) ?></a></p>
<?php endif ?>

View File

@ -0,0 +1,6 @@
<?php return [
'plugin' => [
'name' => 'SMS',
'description' => ''
]
];

View File

@ -0,0 +1,27 @@
<?php namespace Sms\Sms\Models;
use Model;
/**
* Model
*/
class SmsSender extends Model
{
use \October\Rain\Database\Traits\Validation;
use \October\Rain\Database\Traits\SoftDelete;
protected $dates = ['deleted_at'];
/**
* @var string The database table used by the model.
*/
public $table = 'sms_sms_otp';
/**
* @var array Validation rules
*/
public $rules = [
];
}

View File

@ -0,0 +1,13 @@
columns:
id:
label: id
type: number
phone:
label: phone
type: text
message:
label: message
type: text
status:
label: status
type: switch

View File

@ -0,0 +1,13 @@
fields:
phone:
label: Phone
span: auto
type: text
message:
label: Message
span: auto
type: textarea
status:
label: Status
span: auto
type: switch

View File

@ -0,0 +1,11 @@
plugin:
name: 'sms.sms::lang.plugin.name'
description: 'sms.sms::lang.plugin.description'
author: sms
icon: oc-icon-adjust
homepage: ''
navigation:
main-menu-item:
label: SMS
url: sms/sms/smssender
icon: icon-mobile-phone

View File

@ -0,0 +1,26 @@
<?php namespace Sms\Sms\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableCreateSmsSmsOtp extends Migration
{
public function up()
{
Schema::create('sms_sms_otp', function($table)
{
$table->engine = 'InnoDB';
$table->increments('id')->unsigned();
$table->timestamp('created_at')->nullable();
$table->timestamp('updated_at')->nullable();
$table->timestamp('deleted_at')->nullable();
$table->string('phone');
$table->text('message')->nullable();
});
}
public function down()
{
Schema::dropIfExists('sms_sms_otp');
}
}

View File

@ -0,0 +1,23 @@
<?php namespace Sms\Sms\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateSmsSmsOtp extends Migration
{
public function up()
{
Schema::table('sms_sms_otp', function($table)
{
$table->boolean('status')->default(false);
});
}
public function down()
{
Schema::table('sms_sms_otp', function($table)
{
$table->dropColumn('status');
});
}
}

View File

@ -0,0 +1,8 @@
1.0.1:
- 'Initialize plugin.'
1.0.2:
- 'Created table sms_sms_otp'
- builder_table_create_sms_sms_otp.php
1.0.3:
- 'Updated table sms_sms_otp'
- builder_table_update_sms_sms_otp.php

View File

@ -7,11 +7,19 @@ use TPS\Birzha\Models\City;
use Session;
use DB;
use TPS\Birzha\Models\Favourites;
use RainLab\User\Facades\Auth;
use ValidationException;
use Validator;
use Flash;
class CategoryProfile extends ComponentBase
{
public $category;
public $users;
public $products;
public $subcategories;
public function componentDetails() {
return [
@ -39,6 +47,7 @@ class CategoryProfile extends ComponentBase
public function onRun() {
$this->users = $this->getCategoryUsers();
$this->category = $this->getCategory();
$this->subcategories = $this->getSubs();
}
protected function getCategory(){
@ -46,12 +55,48 @@ class CategoryProfile extends ComponentBase
$category = Category::transWhere('slug', $cSlug, Session::get('rainlab.translate.locale'))->with('users')->first();
return $category;
}
protected function getSubs(){
$cSlug = $this->property('categorySlug');
$category = Category::transWhere('slug', $cSlug, Session::get('rainlab.translate.locale'))->with('users')->first();
$subs = Category::where("primary_key", $category->id)->get();
foreach ($subs as $subcategory) {
$page = input('page', 1);
$products = $subcategory->products()->paginate(12, $page);
$subcategory->setRelation('products', $products);
}
return $subs;
}
protected function getCategoryUsers(){
$cSlug = $this->property('categorySlug');
$category = Category::where('slug', $cSlug)->first();
$users = $category->users()->get();
// dd($users);
return $users;
}
protected function getProducts(){
$cSlug = $this->property('categorySlug');
$category = Category::where('slug', $cSlug)->first();
$users = $category->users()->get();
return $users;
}
public function onCreateFav()
{
$data = input();
$validator = Validator::make($data, [
'product_id' => 'required'
]);
if($validator->fails()) {
Flash::error("Haryt maglumatyny nädogry");
}
$favourite = new Favourites;
$favourite->user_id = \Auth::user()->id;
$favourite->product_id = (int)$data['product_id'];
$favourite->save();
Flash::success("Haryt halanlaryma goşuldy");
}
}

View File

@ -6,12 +6,14 @@ use October\Rain\Exception\AjaxException;
use October\Rain\Support\Facades\Event;
use TPS\Birzha\Models\Payment;
use RainLab\User\Facades\Auth;
use RainLab\User\Models\User as VendorModel;
use Validator;
use TPS\Birzha\Models\Product;
use TPS\Birzha\Models\Orders;
use TPS\Birzha\Models\OrderItems;
use TPS\Birzha\Models\VendorSales;
use Flash;
use Sms\Sms\Models\SmsSender;
class Checkout extends ComponentBase
{
@ -28,6 +30,7 @@ class Checkout extends ComponentBase
$rules = [
'note' => 'required',
'address' => 'required',
'phone_custom' => 'required',
'items' => 'required',
];
@ -38,28 +41,24 @@ class Checkout extends ComponentBase
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->phone = $data["phone_custom"];
$order->status = "new";
$order->save();
$userPhone= \Auth::user()->username;
//[{"item":34,"qty":1},{"item":35,"qty":3}]
$this->sendSMS($userPhone, "Siz üstünlikli sargyt etdiňiz.");
$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;
@ -71,7 +70,12 @@ class Checkout extends ComponentBase
$vendorSale->save();
}
$vendorPhones = VendorSales::where("order_id", $order->id)->with("vendor")->groupBy("vendor_id")->get();
for ($x = 0; $x < count($vendorPhones); $x++) {
$this->sendSMS($vendorPhones[$x]->vendor->username, "Size Gurluşyk platformasyndan sargyt geldi");
}
if ($order && $orderItem && $vendorSale){
Flash::success('Sargyt ugradyldy');
}else{
@ -79,6 +83,15 @@ class Checkout extends ComponentBase
return 500;
}
}
protected function sendSMS($phone, $message){
$smsSender = new SmsSender();
$smsSender->phone = (string)'+993'.$phone;
$smsSender->message = strval($message);
$smsSender->save();
}
protected function validateForm($data, $rules) {
$validator = Validator::make($data, $rules);

View File

@ -7,6 +7,12 @@ use TPS\Birzha\Models\City;
use Session;
use DB;
use TPS\Birzha\Models\Favourites;
use RainLab\User\Facades\Auth;
use ValidationException;
use Validator;
use Flash;
class FilteredProducts extends ComponentBase
{
/*
@ -155,4 +161,20 @@ class FilteredProducts extends ComponentBase
$sort_direction ?? 'asc'
];
}
public function onCreateFav()
{
$data = input();
$validator = Validator::make($data, [
'product_id' => 'required'
]);
if($validator->fails()) {
Flash::error("Haryt maglumatyny nädogry");
}
$favourite = new Favourites;
$favourite->user_id = \Auth::user()->id;
$favourite->product_id = (int)$data['product_id'];
$favourite->save();
Flash::success("Haryt halanlaryma goşuldy");
}
}

View File

@ -71,7 +71,11 @@ class Messages extends ComponentBase
$sellerId = Input::get('seller_id');
}
$this->loadMessages($sellerId);
if(\Auth::user()){
$this->loadMessages($sellerId);
}
//dd($this->chatrooms);
}
public function onChatroom() {
@ -122,6 +126,28 @@ class Messages extends ComponentBase
'latest_message_area' => $this->renderPartial('@latest_message')
];
}
public function onMessageInUserProfile() {
$newMsg = new Message;
$newMsg->sender_id = Auth::user()->id;
$newMsg->reciver_id = Input::get('reciver_id');
$newMsg->send_at = Carbon::now();
$newMsg->message = Input::get('msg');
$newMsg->chatroom_id = Input::get('chatroom_id');
if($newMsg->save()){
Event::fire('tps.message.received', [User::find($newMsg->reciver_id), Auth::user()]);
$this->page['latestMessage'] = $newMsg->message;
$this->page['latestMessageTime'] = $newMsg->send_at;
}else
throw new AjaxException('Hat gitmedi. Nasazlyk yuze chykdy');
return [
'latest_message_area' => $this->renderPartial('@latest_message_profile')
];
}
public function onDeleteChat()
{

View File

@ -5,6 +5,7 @@ use TPS\Birzha\Models\Product;
use TPS\Birzha\Models\Favourites;
use Input;
use Flash;
use RainLab\User\Facades\Auth;
class MyFavourites extends ComponentBase
{

View File

@ -103,7 +103,7 @@ class OfferForm extends ComponentBase
}else{
$place = $data['state_id'];
}
$product = new Product;
$product->name = $data['name'];
$product->description = $data['description'];
@ -114,6 +114,8 @@ class OfferForm extends ComponentBase
$product->price = $data['price'];
$product->phone = $data['phone'];
$product->is_file_product = $data['is_file'];
$product->created_at = Carbon::now();
$product->updated_at = Carbon::now();
if($data['is_file'] == 1){
if(!$data['new_file']) {
@ -202,6 +204,7 @@ class OfferForm extends ComponentBase
$product->price = $data['price'];
$product->phone = $data['phone'];
$product->is_file_product = $data['is_file'];
$product->updated_at = Carbon::now();
if(isset($data['new_file'])){
foreach($product->files as $file){
@ -214,9 +217,9 @@ class OfferForm extends ComponentBase
}
if(isset($data['new_img'])){
foreach($product->images as $image){
$image->delete();
}
//foreach($product->images as $image){
// $image->delete();
//}
foreach($data['new_img'] ?? [] as $key => $img) {
$product->images = $img;
$product->save();
@ -235,6 +238,7 @@ class OfferForm extends ComponentBase
}
$product->save();
Flash::success('Haryt maglumaty üýtgedildi. Tassyklanýança garaşmagyňyzy haýyş edýäris.');
return \Redirect::back();
}
// step 2
@ -337,20 +341,10 @@ class OfferForm extends ComponentBase
// after deleting a photo go the second form_step
public function onImageDelete() {
// dd(Input::get('product_image_id'));
$product = Product::find(Input::get('being_edited_product_id'));
$product = Product::find(Input::get('product_id'));
$product->images()->find(Input::get('product_image_id'))->delete();
$this->page['measures'] = Measure::all();
$this->page['paymentTerms'] = Term::where('type','payment')->get();
$this->page['deliveryTerms'] = Term::where('type','delivery')->get();
$this->page['currencies'] = Currency::all();
$this->page['product'] = $product;
return [
'#form-steps' => $this->renderPartial('@second_step_form')
];
Flash::success('Surat üstünlikli pozuldy');
return \Redirect::back();
}
protected function validateFileType($data, $rules) {
@ -402,6 +396,7 @@ class OfferForm extends ComponentBase
$this->states = City::where('primary_key','=', 0)->get();
$this->cities = City::where('primary_key','>', 0)->get();
$this->productIdOption = $this->property('productId');
if($this->productIdOption) {
$this->productForEditing = Product::where("vendor_id", \Auth::user()->id)->where("id", $this->productIdOption)->first();

View File

@ -7,6 +7,12 @@ use TPS\Birzha\Models\City;
use Session;
use DB;
use TPS\Birzha\Models\Favourites;
use RainLab\User\Facades\Auth;
use ValidationException;
use Validator;
use Flash;
class Offers extends ComponentBase
{
/*
@ -150,4 +156,23 @@ class Offers extends ComponentBase
return $query ? $query->paginate($perPage) : null;
}
public function onCreateFav()
{
$data = input();
$validator = Validator::make($data, [
'product_id' => 'required'
]);
if($validator->fails()) {
Flash::error("Haryt maglumatyny nädogry");
}
$favourite = new Favourites;
$favourite->user_id = \Auth::user()->id;
$favourite->product_id = (int)$data['product_id'];
$favourite->save();
Flash::success("Haryt halanlaryma goşuldy");
}
}

View File

@ -7,6 +7,10 @@ use TPS\Birzha\Models\OrderItems;
use RainLab\User\Facades\Auth;
use Flash;
use TPS\Birzha\Models\Favourites;
use ValidationException;
use Validator;
class OrderDetail extends ComponentBase
{
public $order;
@ -43,4 +47,20 @@ class OrderDetail extends ComponentBase
$order = OrderItems::where('order_id', $this->property('id'))->first();
return $order;
}
public function onCreateFav()
{
$data = input();
$validator = Validator::make($data, [
'product_id' => 'required'
]);
if($validator->fails()) {
Flash::error("Haryt maglumatyny nädogry");
}
$favourite = new Favourites;
$favourite->user_id = \Auth::user()->id;
$favourite->product_id = (int)$data['product_id'];
$favourite->save();
Flash::success("Haryt halanlaryma goşuldy");
}
}

View File

@ -6,6 +6,11 @@ use Input;
use Flash;
use RainLab\User\Models\User;
use TPS\Birzha\Models\Favourites;
use RainLab\User\Facades\Auth;
use ValidationException;
use Validator;
class SearchOffers extends ComponentBase
{
/**
@ -84,6 +89,22 @@ class SearchOffers extends ComponentBase
$sort_direction ?? 'asc'
];
}
public function onCreateFav()
{
$data = input();
$validator = Validator::make($data, [
'product_id' => 'required'
]);
if($validator->fails()) {
Flash::error("Haryt maglumatyny nädogry");
}
$favourite = new Favourites;
$favourite->user_id = \Auth::user()->id;
$favourite->product_id = (int)$data['product_id'];
$favourite->save();
Flash::success("Haryt halanlaryma goşuldy");
}

View File

@ -6,6 +6,10 @@ use TPS\Birzha\Models\Comment;
use RainLab\User\Facades\Auth;
use Flash;
use TPS\Birzha\Models\Favourites;
use ValidationException;
use Validator;
class Singleoffer extends ComponentBase
{
public function componentDetails()
@ -62,6 +66,22 @@ class Singleoffer extends ComponentBase
}
return $totalRating == 0 ? $totalRating : round($totalRating/$product->comments->count());
}
public function onCreateFav()
{
$data = input();
$validator = Validator::make($data, [
'product_id' => 'required'
]);
if($validator->fails()) {
Flash::error("Haryt maglumaty nädogry");
}
$favourite = new Favourites;
$favourite->user_id = \Auth::user()->id;
$favourite->product_id = (int)$data['product_id'];
$favourite->save();
Flash::success("Haryt halanlaryma goşuldy");
}

View File

@ -3,10 +3,16 @@
use Cms\Classes\ComponentBase;
use TPS\Birzha\Models\Product;
use TPS\Birzha\Models\Category;
use TPS\Birzha\Models\Chatroom;
use Input;
use Flash;
use RainLab\User\Models\User;
use TPS\Birzha\Models\Favourites;
use RainLab\User\Facades\Auth;
use ValidationException;
use Validator;
class UserOffers extends ComponentBase
{
/**
@ -18,6 +24,9 @@ class UserOffers extends ComponentBase
public $params;
public $sliders;
public $currentCat;
public $chatroom;
public $result;
public $authUser;
public function componentDetails()
{
@ -71,6 +80,16 @@ class UserOffers extends ComponentBase
$this->userProducts = $this->loadProducts();
$this->sliders = $this->loadSliders();
$this->currentCat = $this->loadCurrentCategory();
if(\Auth::user()){
$this->authUser = \Auth::user()->id;
$this->chatroom = $this->getChatroom();
$this->result = $this->getMessages($this->chatroom ? $this->chatroom->id : null);
}else{
$this->authUser = null;
$this->chatroom = null;
$this->result = null;
}
}
protected function loadProducts() {
@ -84,7 +103,7 @@ class UserOffers extends ComponentBase
if($categorySlug){
$category = Category::where('slug', $categorySlug)->first();
}
$products = Product::query();
$products = Product::query()->approved();
if($category){
@ -152,6 +171,55 @@ class UserOffers extends ComponentBase
$user = User::find($this->property('id'));
return $user->sliders()->get();
}
public function onCreateFav()
{
$data = input();
$validator = Validator::make($data, [
'product_id' => 'required'
]);
if($validator->fails()) {
Flash::error("Haryt maglumatyny nädogry");
}
$favourite = new Favourites;
$favourite->user_id = \Auth::user()->id;
$favourite->product_id = (int)$data['product_id'];
$favourite->save();
Flash::success("Haryt halanlaryma goşuldy");
}
protected function getChatroom() {
if(\Auth::user()->id == $this->property('id')){
return null;
}else{
$chatrooms = \Auth::user()->chatrooms;
foreach($chatrooms as $room) {
$room->message_partner = $room->users()->where('users.id','!=',\Auth::user()->id)->first();
if($room->message_partner->id == $this->property('id')) {
return $room;
}
}
$seller = User::findOrFail($this->property('id'));
$chatroom = new Chatroom;
$chatroom->save();
$chatroom->users()->attach($seller->id);
$chatroom->users()->attach(Auth::user()->id);
$chatroom->message_partner = $seller;
return $chatroom;
}
}
public function getMessages($chatroomId){
if($chatroomId){
$result = Chatroom::find($chatroomId)->messages()->latest('send_at')->limit(10)->get()->reverse();
return $result;
}else{
return null;
}
}

View File

@ -1,5 +1,6 @@
{% set category = __SELF__.category %}
{% set users = __SELF__.users %}
{% set subs = __SELF__.subcategories %}
<!-- Breadcumb Area -->
<div class="breadcumb_area">
<div class="container h-100">
@ -8,6 +9,9 @@
<h5>Kategoriýa</h5>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ 'index'|page }}">Esasy sahypa</a></li>
{% if category.primary_key > 0 %}
<li class="breadcrumb-item"><a href="{{ 'category-profile'|page({categorySlug: category.parent.slug}) }}">{{ category.parent.name }}</a></li>
{% endif %}
<li class="breadcrumb-item active">{{ category.name }}</li>
</ol>
</div>
@ -25,14 +29,29 @@
<div class="col-12">
<div class="shop_by_catagory_slides owl-carousel">
<!-- Single Slide -->
<div class="single_catagory_slide">
<a href="{{ 'category-profile'|page({categorySlug: category.slug}) }}">
<img src="{{ 'assets/img/core-img/hemmesi2.png'|theme|resize(127, 127, { mode: 'crop' }) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi, {{ subcategory.name }}">
</a>
<p>Hemmesi</p>
</div>
{% 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="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi, {{ category.name }}">
</a>
<p>{{ category.name }}</p>
</div>
{% for subcategory in category.subs %}
{% if subcategory.subs.count > 0 %}
<div class="single_catagory_slide">
<a href="{{ 'category-profile'|page({categorySlug: subcategory.slug}) }}">
<img src="{{ subcategory.icon|media|resize(127, 127, { mode: 'crop' }) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi, {{ subcategory.name }}">
</a>
<p>{{ subcategory.name }}</p>
</div>
{% else %}
<div class="single_catagory_slide">
<a href="{{ 'category-products'|page({categorySlug: subcategory.slug}) }}">
<img src="{{ subcategory.icon|media|resize(127, 127, { mode: 'crop' }) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi, {{ subcategory.name }}">
</a>
<p>{{ subcategory.name }}</p>
</div>
{% endif %}
{% endfor %}
</div>
@ -49,7 +68,7 @@
{% for user in users %}
<div class="col-4 col-md-4 col-lg-4 mt-4">
<div class="col-6 col-md-4 col-lg-4 mt-4">
<a href="{{ 'user-profile'|page({id: user.id}) }}">
<div class="userBannerBg">
<div class="single_catagory">
@ -69,133 +88,208 @@
</section>
<!-- Brands Area -->
<div class="container">
<div class="shop_grid_product_area">
<div class="row justify-content-center">
{% for category in category.subs %}
{% for product in category.products %}
<!-- Single Product -->
<div class="col-9 col-sm-12 col-md-6 col-lg-4">
<div class="single-product-area mb-30">
<a href="{{ 'product'|page({id: product.id}) }}">
<div class="product_image">
<!-- Product Image -->
<img class="normal_img" src="{{ product.images[0].thumb(500,625,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, 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 platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
{% endif %}
<!-- Wishlist -->
<div class="product_wishlist">
{% if user %}
<a href="{{ 'wishlist'|page }}"><i class="icofont-heart"></i></a>
{% else %}
<a href="{{ 'login'|page }}"><i class="icofont-heart"></i></a>
{% endif %}
</div>
</div>
</a>
<!-- Product Description -->
<div class="product_description">
<!-- Add to cart -->
{% if user %}
<div class="product_add_to_cart addToCard" 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>
</div>
<p class="brand_name">{{product.vendor.shop_title}}</p>
<a href="{{ 'product'|page({id: product.id}) }}">{{ product.name }}</a>
<h6 class="product-price">{{ product.price }} TMT</h6>
</div>
</div>
</div>
{% endfor %}
{% endfor %}
{% if category.subs.count == 0 %}
<div class="container mb-5">
<div class="row d-block justify-content-center align-items-center">
<div class="col-6 d-block mx-auto">
<div class="text-center">
<img src="{{ 'assets/img/core-img/no-products.png'|theme }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi">
</div>
</div>
</div>
<div class="col-6 d-block mx-auto">
<div class="text-center">
<p>Şu wagtlykça bu bölümde haryt ýok</p>
</div>
</div>
</div>
</div>
<!-- product modals -->
{% for category in category.subs %}
{% for product in category.products %}
<!-- Quick View Modal Area -->
<div class="modal fade" id="quickview{{product.id}}" tabindex="-1" role="dialog" aria-labelledby="quickview" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
<div class="modal-content">
<button type="button" class="close btn" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<div class="modal-body">
<div class="quickview_body">
<div class="container">
<div class="row">
<div class="col-12 col-lg-5">
<div class="quickview_pro_img">
<img class="first_img" src="{{ product.images[0].thumb(500,625,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, 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 platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
{% else %}
<div class="container">
<div class="shop_grid_product_area">
<div class="row justify-content-start">
{% for subcategory in category.subs %}
{% if subcategory.subs.count() > 0 %}
{% for subsubcategory in subcategory.subs %}
{% for product in subsubcategory.products %}
<!-- Single Product -->
<div class="col-6 col-xs-6 col-sm-6 col-md-4 col-lg-4">
<div class="single-product-area mb-30">
<a href="{{ 'product'|page({id: product.id}) }}">
<div class="product_image">
<!-- Product Image -->
<img class="normal_img" src="{{ product.images[0].thumb(680,700,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
{% if product.images_count > 1 %}
<img class="hover_img" src="{{ product.images[1].thumb(680,700,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
{% endif %}
<!-- Wishlist -->
<div class="product_wishlist">
{% if user %}
<a
data-request="onCreateFav"
data-request-flash
data-request-validate
data-request-data="product_id: {{ product.id }}"
href="#"><i class="icofont-heart"></i></a>
{% else %}
<a href="{{ 'login'|page }}"><i class="icofont-heart"></i></a>
{% endif %}
</div>
</div>
<div class="col-12 col-lg-7">
<div class="quickview_pro_des">
<h4 class="title">{{ product.name }}</h4>
<div class="top_seller_product_rating mb-15">
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
</div>
<h5 class="price">{{ product.price }} TMT</h5>
<p>{{ html_limit(product.description, 100) }}</p>
<a href="{{ 'product'|page({id: product.id}) }}">Giňişleýin maglumat</a>
</a>
<!-- Product Description -->
<div class="product_description">
<!-- Add to cart -->
{% if user %}
<div class="product_add_to_cart addToCard" 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>
<!-- Add to Cart Form -->
<form class="cart" method="post">
<div class="quantity">
<input type="number" class="qty-text form-control" id="quantity{{ product.id }}" step="1" min="1" value="1">
</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>
</div>
<p class="brand_name">{{product.vendor.shop_title}}</p>
<a href="{{ 'product'|page({id: product.id}) }}">{{ product.name }}</a>
<h6 class="product-price">{{ product.price }} TMT</h6>
</div>
</div>
</div>
{% endfor %}
{% endfor %}
{% else %}
{% for product in subcategory.products %}
<!-- Single Product -->
<div class="col-6 col-xs-6 col-sm-6 col-md-4 col-lg-4">
<div class="single-product-area mb-30">
<a href="{{ 'product'|page({id: product.id}) }}">
<div class="product_image">
<!-- Product Image -->
<img class="normal_img" src="{{ product.images[0].thumb(680,700,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
{% if product.images_count > 1 %}
<img class="hover_img" src="{{ product.images[1].thumb(680,700,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
{% endif %}
<!-- Wishlist -->
<div class="product_wishlist">
{% if user %}
<div class="product_add_to_cart addToCard" data-id="{{ product.id }}" data-price="{{ product.price }}" data-image="{{ product.images[0].path }}" data-name="{{ product.name }}" data-vendor="{{ product.vendor.id }}">
<a href="#" class="btn btn-primary mt-1 mt-md-0 ml-1 ml-md-3">Sebede goş</a>
</div>
<a
data-request="onCreateFav"
data-request-flash
data-request-validate
data-request-data="product_id: {{ product.id }}"
href="#"><i class="icofont-heart"></i></a>
{% else %}
<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 }}">
<a href="{{ 'login'|page }}" class="btn btn-primary mt-1 mt-md-0 ml-1 ml-md-3">Sebede goş</a>
</div>
<a href="{{ 'login'|page }}"><i class="icofont-heart"></i></a>
{% endif %}
<!-- Wishlist -->
<div class="modal_pro_wishlist">
{% if user %}
<a href="{{ 'wishlist'|page }}"><i class="icofont-heart"></i></a>
{% else %}
<a href="{{ 'login'|page }}"><i class="icofont-heart"></i></a>
</div>
</div>
</a>
<!-- Product Description -->
<div class="product_description">
<!-- Add to cart -->
{% if user %}
<div class="product_add_to_cart addToCard" 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>
</div>
<p class="brand_name">{{product.vendor.shop_title}}</p>
<a href="{{ 'product'|page({id: product.id}) }}">{{ product.name }}</a>
<h6 class="product-price">{{ product.price }} TMT</h6>
</div>
</div>
</div>
{% endfor %}
{% endif %}
{% endfor %}
</div>
</div>
</div>
<!-- product modals -->
{% for subcategory in category.subs %}
{% if subcategory.subs.count() > 0 %}
{% for subsubcategory in subcategory.subs %}
{% for product in subsubcategory.products %}
<!-- Quick View Modal Area -->
<div class="modal fade" id="quickview{{product.id}}" tabindex="-1" role="dialog" aria-labelledby="quickview" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
<div class="modal-content">
<button type="button" class="close btn" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<div class="modal-body">
<div class="quickview_body">
<div class="container">
<div class="row">
<div class="col-12 col-lg-5">
<div class="quickview_pro_img">
<img class="first_img" src="{{ product.images[0].thumb(500,625,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, 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 platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
{% endif %}
</div>
</form>
<!-- Share -->
<div class="share_wf mt-30">
<p>Paýlaşmak</p>
<div class="_icon">
<a href="#"><i class="fa fa-facebook" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-twitter" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-pinterest" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-linkedin" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-instagram" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-envelope-o" aria-hidden="true"></i></a>
</div>
<div class="col-12 col-lg-7">
<div class="quickview_pro_des">
<h4 class="title">{{ product.name }}</h4>
<div class="top_seller_product_rating mb-15">
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
</div>
<h5 class="price">{{ product.price }} TMT</h5>
<p>{{ html_limit(product.description, 100) }}</p>
<a href="{{ 'product'|page({id: product.id}) }}">Giňişleýin maglumat</a>
</div>
<!-- Add to Cart Form -->
<form class="cart" method="post">
<div class="quantity">
<input type="number" class="qty-text form-control" id="quantity{{ product.id }}" step="1" min="1" value="1">
</div>
{% if user %}
<div class="product_add_to_cart addToCard" data-id="{{ product.id }}" data-price="{{ product.price }}" data-image="{{ product.images[0].path }}" data-name="{{ product.name }}" data-vendor="{{ product.vendor.id }}">
<a href="#" class="btn btn-primary mt-1 mt-md-0 ml-1 ml-md-3">Sebede goş</a>
</div>
{% else %}
<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 }}">
<a href="{{ 'login'|page }}" class="btn btn-primary mt-1 mt-md-0 ml-1 ml-md-3">Sebede goş</a>
</div>
{% endif %}
<!-- Wishlist -->
<div class="modal_pro_wishlist">
{% if user %}
<a
data-request="onCreateFav"
data-request-flash
data-request-validate
data-request-data="product_id: {{ product.id }}"
href="#"><i class="icofont-heart"></i></a>
{% else %}
<a href="{{ 'login'|page }}"><i class="icofont-heart"></i></a>
{% endif %}
</div>
</form>
</div>
</div>
</div>
@ -204,7 +298,81 @@
</div>
</div>
</div>
</div>
<!-- Quick View Modal Area -->
<!-- Quick View Modal Area -->
{% endfor %}
{% endfor %}
{% else %}
{% for product in subcategory.products %}
<div class="modal fade" id="quickview{{product.id}}" tabindex="-1" role="dialog" aria-labelledby="quickview" aria-hidden="true">
<div class="modal-dialog modal-lg modal-dialog-centered" role="document">
<div class="modal-content">
<button type="button" class="close btn" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
<div class="modal-body">
<div class="quickview_body">
<div class="container">
<div class="row">
<div class="col-12 col-lg-5">
<div class="quickview_pro_img">
<img class="first_img" src="{{ product.images[0].thumb(500,625,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, 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 platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
{% endif %}
</div>
</div>
<div class="col-12 col-lg-7">
<div class="quickview_pro_des">
<h4 class="title">{{ product.name }}</h4>
<div class="top_seller_product_rating mb-15">
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
<i class="fa fa-star" aria-hidden="true"></i>
</div>
<h5 class="price">{{ product.price }} TMT</h5>
<p>{{ html_limit(product.description, 100) }}</p>
<a href="{{ 'product'|page({id: product.id}) }}">Giňişleýin maglumat</a>
</div>
<!-- Add to Cart Form -->
<form class="cart" method="post">
<div class="quantity">
<input type="number" class="qty-text form-control" id="quantity{{ product.id }}" step="1" min="1" value="1">
</div>
{% if user %}
<div class="product_add_to_cart addToCard" data-id="{{ product.id }}" data-price="{{ product.price }}" data-image="{{ product.images[0].path }}" data-name="{{ product.name }}" data-vendor="{{ product.vendor.id }}">
<a href="#" class="btn btn-primary mt-1 mt-md-0 ml-1 ml-md-3">Sebede goş</a>
</div>
{% else %}
<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 }}">
<a href="{{ 'login'|page }}" class="btn btn-primary mt-1 mt-md-0 ml-1 ml-md-3">Sebede goş</a>
</div>
{% endif %}
<!-- Wishlist -->
<div class="modal_pro_wishlist">
{% if user %}
<a
data-request="onCreateFav"
data-request-flash
data-request-validate
data-request-data="product_id: {{ product.id }}"
href="#"><i class="icofont-heart"></i></a>
{% else %}
<a href="{{ 'login'|page }}"><i class="icofont-heart"></i></a>
{% endif %}
</div>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endfor %}
{% endif %}
{% endfor %}
{% endfor %}
{% endif %}

View File

@ -104,9 +104,9 @@
<div class="row">
<div class="col-12 col-lg-5">
<div class="quickview_pro_img">
<img class="first_img" src="{{ product.images[0].thumb(500,625,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
<img class="first_img" src="{{ product.images[0].thumb(680,700,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, 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 platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
<img class="hover_img" src="{{ product.images[1].thumb(680,700,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
{% endif %}
</div>
</div>
@ -141,25 +141,19 @@
<!-- Wishlist -->
<div class="modal_pro_wishlist">
{% if user %}
<a href="wishlist.html"><i class="icofont-heart"></i></a>
<a
data-request="onCreateFav"
data-request-flash
data-request-validate
data-request-data="product_id: {{ product.id }}"
href="#"><i class="icofont-heart"></i></a>
{% else %}
<a href="{{ 'login'|page }}"><i class="icofont-heart"></i></a>
{% endif %}
</div>
</form>
<!-- Share -->
<div class="share_wf mt-30">
<p>Paýlaşmak</p>
<div class="_icon">
<a href="#"><i class="fa fa-facebook" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-twitter" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-pinterest" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-linkedin" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-instagram" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-envelope-o" aria-hidden="true"></i></a>
</div>
</div>
</div>
</div>
</div>
@ -170,58 +164,83 @@
</div>
<!-- Quick View Modal Area -->
{% endfor %}
<div class="shop_grid_product_area">
<div class="row justify-content-center">
{% for product in products %}
<!-- Single Product -->
<div class="col-9 col-sm-12 col-md-6 col-lg-4">
<div class="single-product-area mb-30">
<a href="{{ 'product'|page({id: product.id}) }}">
<div class="product_image">
<!-- Product Image -->
<img class="normal_img" src="{{ product.images[0].thumb(500,625,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, 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 platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
{% endif %}
<!-- Wishlist -->
<div class="product_wishlist">
{% if user %}
<a href="{{ 'wishlist'|page }}"><i class="icofont-heart"></i></a>
{% else %}
<a href="{{ 'login'|page }}"><i class="icofont-heart"></i></a>
{% endif %}
</div>
</div>
</a>
<!-- Product Description -->
<div class="product_description">
<!-- Add to cart -->
{% if user %}
<div class="product_add_to_cart addToCard" 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>
{% if products.count() == 0 %}
<div class="container mb-5">
<div class="row d-block justify-content-center align-items-center">
<div class="col-6 d-block mx-auto">
<div class="text-center">
<img src="{{ 'assets/img/core-img/no-products.png'|theme }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi">
</div>
</div>
<div class="col-6 d-block mx-auto">
<div class="text-center">
<p>Şu wagtlykça bu bölümde haryt ýok</p>
</div>
</div>
</div>
</div>
{% else %}
<div class="shop_grid_product_area">
<div class="row justify-content-center">
{% for product in products %}
<!-- Single Product -->
<div class="col-6 col-xs-6 col-sm-6 col-md-4 col-lg-4">
<div class="single-product-area mb-30">
<a href="{{ 'product'|page({id: product.id}) }}">
<div class="product_image">
<!-- Product Image -->
<img class="normal_img" src="{{ product.images[0].thumb(500,625,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, 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 platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
{% endif %}
<!-- Wishlist -->
<div class="product_wishlist">
{% if user %}
<a
data-request="onCreateFav"
data-request-flash
data-request-validate
data-request-data="product_id: {{ product.id }}"
href="#"><i class="icofont-heart"></i></a>
{% else %}
<a href="{{ 'login'|page }}"><i class="icofont-heart"></i></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>
</div>
<p class="brand_name"></p>
<a href="{{ 'product'|page({id: product.id}) }}">{{ product.name }}</a>
<h6 class="product-price">{{ product.price }} TMT</h6>
</a>
<!-- Product Description -->
<div class="product_description">
<!-- Add to cart -->
{% if user %}
<div class="product_add_to_cart addToCard" 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>
</div>
<p class="brand_name"></p>
<a href="{{ 'product'|page({id: product.id}) }}">{{ product.name }}</a>
<h6 class="product-price">{{ product.price }} TMT</h6>
</div>
</div>
</div>
{% endfor %}
</div>
{% endfor %}
</div>
</div>
{% endif %}
{% if products.hasPages %}
<div class="shop_pagination_area mt-30">

View File

@ -6,7 +6,7 @@
id="more_btn"
data-chatroom-id="{{ chat_room_id }}"
data-skip="5"
>Load More</button>
>Öňki hatlar</button>
<!-- more_messages_area -->
@ -33,18 +33,25 @@
<input type="hidden" name="chatroom_id" value="{{chat_room_id}}">
<div class="message_input">
<textarea name="msg" required></textarea>
<textarea class="form-control" id="order-notes" cols="30" rows="10" name="msg" placeholder="Hatyňyz..."></textarea>
<!-- <textarea class="form-control" name="msg" required></textarea> -->
</div>
<button class="message_btn" type="submit" data-attach-loading>
<img src="{{'assets/images/svg/plane.svg'|theme}}" alt="send">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 23">
<g id="paper-plane" transform="translate(0 0)">
<path id="Path_3270" data-name="Path 3270" d="M8.75,17.612V22.25a.75.75,0,0,0,1.354.444L12.817,19Z" fill="#f37b1c"/>
<path id="Path_3271" data-name="Path 3271" d="M23.685.139A.75.75,0,0,0,22.9.085L.4,11.835a.75.75,0,0,0,.1,1.375l6.255,2.138L20.083,3.958,9.775,16.377,20.258,19.96A.767.767,0,0,0,20.5,20a.749.749,0,0,0,.742-.639l2.75-18.5a.751.751,0,0,0-.307-.722Z" fill="#f37b1c"/>
</g>
</svg>
</button>
</form>
</div>
<script>
function loadMoreMeassges() {
$('#more_btn').text('Loading...');
$('#more_btn').text('Ýüklenýär...');
$(this).request('onLoadMore',{
data: {
@ -81,7 +88,7 @@
$('#more_btn').attr('data-skip',+skip + 5);
$('#more_btn').text('Load more');
$('#more_btn').text('Öňki hatlar');
}
})
}

View File

@ -1,17 +1,31 @@
{% set chatrooms = __SELF__.chatrooms %}
<div class="breadcumb_area">
<div class="container h-100">
<div class="row h-100 align-items-center">
<div class="col-12">
<h5>Habarlaşmak</h5>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="https://gurlushyk.com.tm">Esasy sahypa</a></li>
<li class="breadcrumb-item active">Habarlaşmak</li>
</ol>
</div>
</div>
</div>
</div>
<!-- Chat ============================================================ -->
<section class="chat">
<div class="auto_container">
<div class="container">
<div class="chat_wrap">
{% if chatrooms is empty %}
<div class="empty_area">
<div class="chat_wall">
<div class="chat_wall_img">
<img src="{{ 'assets/images/big_logo.png'|theme }}" alt="logo">
<img src="{{ 'assets/img/logo/gurlushyk-logo2.png'|theme }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi">
</div>
<div class="chat_wall_text">
{{ 'auth.messages_no'|_ }}
Häzirlikçe size ýazylan hat ýok
</div>
</div>
</div>
@ -29,7 +43,7 @@
<div class="chat_people">
{% for chatroom in chatrooms %}
<a href="#" class="person" style="display: block;"
<a href="#" id="chatroom_{{ chatroom.id }}" class="person" style="display: block;"
data-request="onChatroom"
data-request-data="chatroom_id: {{chatroom.id}}"
data-request-success="showMessages(data)"
@ -38,8 +52,10 @@
>
<div class="person_name">
{% if chatroom.message_partner.name or chatroom.message_partner.surname %}
{{chatroom.message_partner.name}} {{chatroom.message_partner.surname}}
{% if chatroom.message_partner.shop_title %}
{{ chatroom.message_partner.shop_title }}
{% elseif chatroom.message_partner.name %}
{{ chatroom.message_partner.name }}
{% else %}
{{chatroom.message_partner.email}}
{% endif %}
@ -54,9 +70,11 @@
{{chatroom.count_unread_messages}}
</div>
{% endif %}
<button type="button" class="delete" onclick="event.stopPropagation(); deleteChat({{ chatroom.id }})">
<img src="{{ 'assets/images/svg/trash.svg'|theme }}" alt="delete-icon">
<!-- <a id="chatBot" class="chatBot" href="#" style="position: fixed; z-index: 2147483647;"><i class="icofont-chat"></i></a> -->
<!-- <button type="button" class="delete" style="color: white;border: none;font-size: 18px;" onclick="event.stopPropagation(); deleteChat({{ chatroom.id }})">
<i class="icofont-ui-delete"></i>
</button>
-->
</a>
{% endfor %}
@ -67,10 +85,11 @@
<div class="chat_wall">
<div class="chat_wall_img">
<img src="{{'assets/images/big_logo.png'|theme}}" alt="logo">
<img src="{{ 'assets/img/logo/gurlushyk-logo2.png'|theme }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi">
</div>
<div class="chat_wall_text">
{{'account.choose_chat'|_}}
Выберите один из активных диалоговых окон
чтоб начать переписку!
</div>
</div>
@ -82,59 +101,66 @@
</section>
<!-- Chat end ======================================================== -->
<!--Delete modal ========================================================= -->
<div class="modal" id="delete-modal">
<div class="modal_inner">
<form data-request="onDeleteChat">
<h2 class="modal_title">
{{ 'auth.messages_modal_question'|_ }}
</h2>
<input type="hidden" value="" name="chatroom_id">
<div class="modal_btn-box">
<button class="reset-form" type="reset">
{{ 'auth.modal_no'|_ }}
</button>
<button class="accept-form" type="submit">
{{ 'auth.modal_yes'|_ }}
</button>
</div>
</form>
</div>
</div>
<!--Delete modal end ===================================================== -->
{% put scripts %}
<script>
function showMessages(data) {
<script>
function showMessages(data) {
$('#chatroom').html(data.chat_area);
var bottom= $('.chat_area-inner').height()+$('.chat_area-inner').prop('scrollHeight');
$('.chat_area-inner').scrollTop(bottom);
$('.unread-messages-count').text('');
}
$('#chatroom').html(data.chat_area);
var bottom= $('.chat_area-inner').height()+$('.chat_area-inner').prop('scrollHeight');
$('.chat_area-inner').scrollTop(bottom);
$('.unread-messages-count').text('');
}
</script>
<script>
$(window).on('load', function() {
var params = window
.location
.search
.replace('?','')
.split('&')
.reduce(
function(p,e){
var a = e.split('=');
p[ decodeURIComponent(a[0])] = decodeURIComponent(a[1]);
return p;
},
{}
);
if(params['seller_id']) {
$('.chat_people').find(`a[data-partner-id="${params['seller_id']}"]`)
.click()
function deleteChat(chatId){
$.get('onDeleteChat', function (data){
if(data.length > 0)
{
$('#subcategoryEdit').attr("disabled", false);
$('#subcategoryEdit').empty();
for (let i = 0; i < data.length; i++) {
$('#subcategoryEdit').append('<option value ="'+data[i]['id']+'" data-file="'+data[i]['is_file_category']+'">'+data[i]['name']+'</option>');
}
}
})
</script>
else
{
$('#subcategoryEdit').empty();
$('#subcategoryEdit').append('<option value ="">Ikinji kategoriýa ýok</option>');
$('#subcategoryEdit').attr("disabled", true);
}
});
}
$("[id^='chatroom_']").each(function() {
var id = $(this).attr('id');
id = id.replace("chatroom_",'');
$('#chatroom_'+id).on('click', function(event){
const person = document.getElementsByClassName('person');
for(var index=0;index < person.length;index++){
person[index].classList.remove('active');
}
$('#chatroom_'+id).addClass('active');
});
});
</script>
<script>
$(window).on('load', function() {
var params = window
.location
.search
.replace('?','')
.split('&')
.reduce(
function(p,e){
var a = e.split('=');
p[ decodeURIComponent(a[0])] = decodeURIComponent(a[1]);
return p;
},
{}
);
if(params['seller_id']) {
$('.chat_people').find(`a[data-partner-id="${params['seller_id']}"]`)
.click()
}
})
</script>
{% endput %}

View File

@ -0,0 +1,5 @@
<div class="my_message2">
<div class="message_text">
{{ latestMessage }}
</div>
</div>

View File

@ -18,6 +18,23 @@
<!-- Wishlist Table Area -->
<div class="wishlist-table section_padding_100 clearfix">
<div class="container">
{% if comments.count() == 0 %}
<div class="container mb-5">
<div class="row d-block justify-content-center align-items-center">
<div class="col-6 d-block mx-auto">
<div class="text-center">
<img src="{{ 'assets/img/core-img/no-products.png'|theme }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi">
</div>
</div>
<div class="col-6 d-block mx-auto">
<div class="text-center">
<p>Şu wagtlykça teswir ýok</p>
</div>
</div>
</div>
</div>
{% else %}
<div class="row">
<div class="col-12">
<div class="cart-table wishlist-table">
@ -84,5 +101,6 @@
</div>
</div>
</div>
{% endif %}
</div>
</div>

View File

@ -18,6 +18,23 @@
<!-- Wishlist Table Area -->
<div class="wishlist-table section_padding_100 clearfix">
<div class="container">
{% if favourites.count() == 0 %}
<div class="container mb-5">
<div class="row d-block justify-content-center align-items-center">
<div class="col-6 d-block mx-auto">
<div class="text-center">
<img src="{{ 'assets/img/core-img/no-products.png'|theme }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi">
</div>
</div>
<div class="col-6 d-block mx-auto">
<div class="text-center">
<p>Şu wagtlykça haryt ýok</p>
</div>
</div>
</div>
</div>
{% else %}
<div class="row">
<div class="col-12">
<div class="cart-table wishlist-table">
@ -81,5 +98,7 @@
</div>
</div>
</div>
{% endif %}
</div>
</div>

View File

@ -18,6 +18,23 @@
<!-- Wishlist Table Area -->
<div class="wishlist-table section_padding_100 clearfix">
<div class="container">
{% if products.count() == 0 %}
<div class="container mb-5">
<div class="row d-block justify-content-center align-items-center">
<div class="col-6 d-block mx-auto">
<div class="text-center">
<img src="{{ 'assets/img/core-img/no-products.png'|theme }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi">
</div>
</div>
<div class="col-6 d-block mx-auto">
<div class="text-center">
<p>Şu wagtlykça haryt ýok</p>
</div>
</div>
</div>
</div>
{% else %}
<div class="row">
<div class="col-12">
<div class="cart-table wishlist-table">
@ -58,5 +75,9 @@
</div>
</div>
</div>
{% endif %}
</div>
</div>

View File

@ -18,6 +18,23 @@
<!-- Wishlist Table Area -->
<div class="wishlist-table section_padding_100 clearfix">
<div class="container">
{% if orders.count() == 0 %}
<div class="container mb-5">
<div class="row d-block justify-content-center align-items-center">
<div class="col-6 d-block mx-auto">
<div class="text-center">
<img src="{{ 'assets/img/core-img/no-products.png'|theme }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi">
</div>
</div>
<div class="col-6 d-block mx-auto">
<div class="text-center">
<p>Şu wagtlykça zakaz ýok</p>
</div>
</div>
</div>
</div>
{% else %}
<div class="row">
<div class="col-12">
<div class="cart-table wishlist-table">
@ -49,5 +66,6 @@
</div>
</div>
</div>
{% endif %}
</div>
</div>

View File

@ -15,7 +15,11 @@
<h5>Haryt goşmak üýtgetmek</h5>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ 'index'|page }}">Esasy sahypa</a></li>
<li class="breadcrumb-item active">Haryt goşmak/üýtgetmek</li>
{% if productForEditing %}
<li class="breadcrumb-item active">Haryt üýtgetmek</li>
{% else %}
<li class="breadcrumb-item active">Haryt goşmak</li>
{% endif %}
</ol>
</div>
</div>
@ -93,7 +97,7 @@
</div>
<div class="col-md-6 mb-3">
<label for="phone">Telefon belgisi</label>
<input type="number" class="form-control" id="phone" name="phone" required>
<input type="tel" class="form-control" id="phone" name="phone" value="+993" required>
</div>
<div class="col-md-6 mb-3">
<label for="images">Suratlar</label>
@ -118,26 +122,56 @@
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>
{{ productForEditing.category }}
<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>
{% for prodCat in productForEditing.categories %}
{% if prodCat.primary_key == 0 %}
<option value="{{ category.id }}" {{ category.id == prodCat.id ? 'selected' : '' }} data-file="{{ category.is_file_category }}">{{ category.name }}</option>
{% elseif prodCat.parent.parent %}
<option value="{{ category.id }}" {{ category.id == prodCat.parent.parent.id ? 'selected' : '' }} data-file="{{ category.is_file_category }}">{{ category.name }}</option>
{% else %}
<option value="{{ category.id }}" {{ category.id == prodCat.parent.id ? 'selected' : '' }} data-file="{{ category.is_file_category }}">{{ category.name }}</option>
{% endif %}
{% endfor %}
{% endfor %}
</select>
</div>
<div class="col-md-6 mb-3">
<label for="subcategory">Ikinji kategoriýa</label>
<!-- {{ productForEditing.categories }} -->
<select class="custom-select d-block w-100 form-control" id="subcategoryEdit" 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>
{% for prodCat in productForEditing.categories %}
{% if prodCat.primary_key == 0 %}
<option value=null disabled>Birinji dereje Sub-kategoriýa saýla</option>
{% else %}
{% if prodCat.subs.count > 0 %}
<option value="{{ prodCat.id }}" {{ productForEditing.categories.contains(prodCat.id) ? 'selected' : '' }} data-file="{{ prodCat.is_file_category }}">2nji dereje {{ prodCat.name }}</option>
{% for sub in prodCat.subs %}
<option value="{{ sub.id }}" {{ productForEditing.categories.contains(sub.id) ? 'selected' : '' }} data-file="{{ sub.is_file_category }}">3nji dereje --{{ sub.name }}</option>
{% endfor %}
{% else %}
<option></option>
{% endif %}
{% endif %}
<!-- {% if prodCat.parent %}
<option value="{{ prodCat.parent.id }}" {{ productForEditing.categories.contains(prodCat.parent.id) ? 'selected' : '' }} data-file="{{ prodCat.parent.is_file_category }}">{{ prodCat.parent.name }}</option>
{% endif %}
-->
{% endfor %}
</select>
</div>
@ -174,11 +208,11 @@
</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>
<textarea class="form-control" id="description" cols="30" rows="20" name="description" placeholder="Giňişleýin beýany" required>{{ productForEditing.description|striptags|raw }}</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>
<input type="tel" class="form-control" id="phone" name="phone" value="{{ productForEditing.phone ? productForEditing.phone : '+993' }}" required>
</div>
<div class="col-md-6 mb-3">
<label for="images">Suratlar</label>
@ -194,6 +228,36 @@
<input type="hidden" name="product_id" value="{{ productForEditing.id }}"/>
<button type="submit" class="btn btn-primary btn-sm mt-3">Üýtgetmek</button>
</form>
<!-- Shortcodes Title -->
<div class="shortcodes_title mb-30 mt-5">
<h5>Öňki suratlar</h5>
</div>
<!-- Gallery Area -->
{% for key, image in productForEditing.images %}
<div class="col-9 col-sm-12 col-md-6 col-lg-4" id="image-{{ key }}">
<div class="single-product-area mb-30">
<div class="product_image">
<!-- Product Image -->
<img class="normal_img" src="{{ image.path }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi">
</div>
<div class="product_description">
<div class="product_add_to_cart">
<a href="#"
data-request="onImageDelete"
data-request-data="product_id: {{ productForEditing.id }}, product_image_id: {{ image.id }}"
data-request-flash
style="width:100%; background-color:red;"><i class="icofont-trash"></i> Pozmak</a>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
{% endif %}
</div>
@ -206,14 +270,11 @@
<script>
function resetForm() {
document.getElementById('offerForm').reset(); // Reset the form
var updateForm = document.getElementById('offerUpdateForm');
if (updateForm){
document.getElementById('offerUpdateForm').reset()
}
}
</script>
<script>
$(document).ready(function() {
$('input[name*="phone"]').inputmask("+99399999999");
$("#category").on("change", function() {
var selectedValue = $(this).val();
var isFile = $(this).find(':selected').data('file');
@ -231,12 +292,20 @@ $(document).ready(function() {
var url = '{{ route("category.subs", ":id") }}';
url = url.replace(':id', selectedValue);
$.get(url, function (data){
console.log(data);
if(data.length > 0)
{
$('#subcategoryAdd').attr("disabled", false);
$('#subcategoryAdd').empty();
for (let i = 0; i < data.length; i++) {
$('#subcategoryAdd').append('<option value ="'+data[i]['id']+'" data-file="'+data[i]['is_file_category']+'">'+data[i]['name']+'</option>');
for (let j = 0; j < data[i].subs.length; j++) {
$('#subcategoryAdd').append('<option value ="'+data[i].subs[j]['id']+'" data-file="'+data[i].subs[j]['is_file_category']+'">--'+data[i].subs[j]['name']+'</option><hr>');
}
$('#subcategoryAdd').append('<option value=null disabled><hr></option>');
}
}
else
@ -254,7 +323,6 @@ $(document).ready(function() {
if (isFile > 0){
$("#isFile").val(1);
$("#newFileDiv").removeClass("d-none");
// $("#new_file").attr("required", "true");
}else{
$("#isFile").val(0);
$("#new_file").val(null);
@ -271,7 +339,16 @@ $(document).ready(function() {
$('#subcategoryEdit').empty();
for (let i = 0; i < data.length; i++) {
$('#subcategoryEdit').append('<option value ="'+data[i]['id']+'" data-file="'+data[i]['is_file_category']+'">'+data[i]['name']+'</option>');
for (let j = 0; j < data[i].subs.length; j++) {
$('#subcategoryEdit').append('<option value ="'+data[i].subs[j]['id']+'" data-file="'+data[i].subs[j]['is_file_category']+'">--'+data[i].subs[j]['name']+'</option><hr>');
}
$('#subcategoryEdit').append('<option value=null disabled><hr></option>');
}
}
else
{

View File

@ -55,25 +55,18 @@
<!-- Wishlist -->
<div class="modal_pro_wishlist">
{% if user %}
<a href="{{ 'wishlist'|page }}"><i class="icofont-heart"></i></a>
<a
data-request="onCreateFav"
data-request-flash
data-request-validate
data-request-data="product_id: {{ product.id }}"
href="#"><i class="icofont-heart"></i></a>
{% else %}
<a href="{{ 'login'|page }}"><i class="icofont-heart"></i></a>
{% endif %}
</div>
</form>
<!-- Share -->
<div class="share_wf mt-30">
<p>Paýlaşmak</p>
<div class="_icon">
<a href="#"><i class="fa fa-facebook" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-twitter" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-pinterest" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-linkedin" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-instagram" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-envelope-o" aria-hidden="true"></i></a>
</div>
</div>
</div>
</div>
</div>
@ -96,7 +89,16 @@
<h5>Harytlar</h5>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="{{ 'index'|page }}">Esasy sahypa</a></li>
<li class="breadcrumb-item active">Harytlar</li>
{% if category.parent.parent %}
<li class="breadcrumb-item">
<a href="{{ 'category-profile'|page({categorySlug: category.parent.parent.slug}) }}">{{ category.parent.parent.name }}</a>
</li>
{% endif %}
{% if category.parent %}
<li class="breadcrumb-item">
<a href="{{ 'category-profile'|page({categorySlug: category.parent.slug}) }}">{{ category.parent.name }}</a>
</li>
{% endif %}
<li class="breadcrumb-item active">{{ category.name }}</li>
</ol>
</div>
@ -107,8 +109,25 @@
<section class="shop_grid_area section_padding_100">
<div class="container">
{% if products.count() == 0 %}
<div class="container mb-5">
<div class="row d-block justify-content-center align-items-center">
<div class="col-6 d-block mx-auto">
<div class="text-center">
<img src="{{ 'assets/img/core-img/no-products.png'|theme }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi">
</div>
</div>
<div class="col-6 d-block mx-auto">
<div class="text-center">
<p>Şu wagtlykça haryt ýok</p>
</div>
</div>
</div>
</div>
{% else %}
<div class="row">
<div class="col-12 col-sm-5 col-md-4 col-lg-3">
<div class="col-12 col-md-4 col-lg-3">
<div class="shop_sidebar_area">
<form action="{{ 'filter-products'|page }}" method="GET">
{% if category.subs|length > 0 %}
@ -157,7 +176,7 @@
</div>
</div>
<div class="col-12 col-sm-7 col-md-8 col-lg-9">
<div class="col-12 col-md-8 col-lg-9">
<!-- Shop Top Sidebar -->
<div class="shop_top_sidebar_area d-flex flex-wrap align-items-center justify-content-between">
<div class="row" style="width: 100%">
@ -180,21 +199,31 @@
</div>
<div class="shop_grid_product_area">
<div class="row justify-content-center">
<div class="row justify-content-start">
{% for product in products %}
<!-- Single Product -->
<div class="col-9 col-sm-12 col-md-6 col-lg-4">
<div class="col-12 col-sm-6 col-md-4 col-lg-4">
<div class="single-product-area mb-30">
<a href="{{ 'product'|page({id: product.id}) }}">
<div class="product_image">
<!-- Product Image -->
<img class="normal_img" src="{{ product.images[0].thumb(500,625,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
<img class="normal_img" src="{{ product.images[0].thumb(680,700,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, 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 platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
<img class="hover_img" src="{{ product.images[1].thumb(680,700,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
{% endif %}
{% if product.type_title %}
<div class="product_badge">
<span>{{product.type_title}}</span>
</div>
{% endif %}
<div class="product_wishlist">
{% if user %}
<a href="{{ 'wishlist'|page }}"><i class="icofont-heart"></i></a>
<a
data-request="onCreateFav"
data-request-flash
data-request-validate
data-request-data="product_id: {{ product.id }}"
href="#"><i class="icofont-heart"></i></a>
{% else %}
<a href="{{ 'login'|page }}"><i class="icofont-heart"></i></a>
{% endif %}
@ -258,5 +287,6 @@
</div>
</div>
{% endif %}
</div>
</section>

View File

@ -53,6 +53,38 @@
</div>
</div>
</div>
<div class="col-12 col-lg-7 ml-auto">
<div class="cart-total-area">
<h5 class="mb-3">Cart Totals</h5>
<div class="table-responsive">
<table class="table mb-0">
<tbody>
<tr>
<td>Sub Total</td>
<td>$56.00</td>
</tr>
<tr>
<td>Shipping</td>
<td>$10.00</td>
</tr>
<tr>
<td>VAT (10%)</td>
<td>$5.60</td>
</tr>
<tr>
<td>Total</td>
<td>$71.60</td>
</tr>
</tbody>
</table>
</div>
<div class="checkout_pagination d-flex justify-content-end mt-3">
<a href="checkout-4.html" class="btn btn-primary mt-2 ml-2 d-none d-sm-inline-block">Go Back</a>
<a href="checkout-complate.html" class="btn btn-primary mt-2 ml-2">Confirm</a>
</div>
</div>
</div>
</div>
</div>
<!-- Cart Area End -->

View File

@ -36,6 +36,7 @@
<h5 class="price">{{ product.price }} TMT</h5>
<p>{{ html_limit(product.description, 100) }}</p>
<a href="{{ 'product'|page({id: product.id}) }}">Giňişleýin maglumat</a>
</div>
<!-- Add to Cart Form -->
<form class="cart" method="post">
@ -54,7 +55,12 @@
<!-- Wishlist -->
<div class="modal_pro_wishlist">
{% if user %}
<a href="{{ 'wishlist'|page }}"><i class="icofont-heart"></i></a>
<a
data-request="onCreateFav"
data-request-flash
data-request-validate
data-request-data="product_id: {{ product.id }}"
href="#"><i class="icofont-heart"></i></a>
{% else %}
<a href="{{ 'login'|page }}"><i class="icofont-heart"></i></a>
{% endif %}
@ -62,17 +68,6 @@
</form>
<!-- Share -->
<div class="share_wf mt-30">
<p>Paýlaşmak</p>
<div class="_icon">
<a href="#"><i class="fa fa-facebook" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-twitter" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-pinterest" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-linkedin" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-instagram" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-envelope-o" aria-hidden="true"></i></a>
</div>
</div>
</div>
</div>
</div>
@ -106,7 +101,23 @@
<section class="shop_grid_area section_padding_50">
<div class="container">
{% if products.count() == 0 %}
<div class="container mb-5">
<div class="row d-block justify-content-center align-items-center">
<div class="col-6 d-block mx-auto">
<div class="text-center">
<img src="{{ 'assets/img/core-img/no-products.png'|theme }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi">
</div>
</div>
<div class="col-6 d-block mx-auto">
<div class="text-center">
<p>Şu wagtlykça bu bölümde haryt ýok</p>
</div>
</div>
</div>
</div>
{% else %}
<div class="row mt-50">
<div class="col-12">
<!-- Shop Top Sidebar -->
@ -137,19 +148,24 @@
<div class="row justify-content-center">
{% for product in products %}
<!-- Single Product -->
<div class="col-9 col-sm-12 col-md-6 col-lg-4">
<div class="col-6 col-xs-6 col-sm-6 col-md-4 col-lg-4">
<div class="single-product-area mb-30">
<a href="{{ 'product'|page({id: product.id}) }}">
<div class="product_image">
<!-- Product Image -->
<img class="normal_img" src="{{ product.images[0].thumb(500,625,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
<img class="normal_img" src="{{ product.images[0].thumb(680,700,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, 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 platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
<img class="hover_img" src="{{ product.images[1].thumb(680,700,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
{% endif %}
<!-- Wishlist -->
<div class="product_wishlist">
{% if user %}
<a href="{{ 'wishlist'|page }}"><i class="icofont-heart"></i></a>
<a
data-request="onCreateFav"
data-request-flash
data-request-validate
data-request-data="product_id: {{ product.id }}"
href="#"><i class="icofont-heart"></i></a>
{% else %}
<a href="{{ 'login'|page }}"><i class="icofont-heart"></i></a>
{% endif %}
@ -211,6 +227,9 @@
{% endif %}
</div>
</div>
{% endif %}
</div>
</section>

View File

@ -105,11 +105,16 @@
<!-- Others Info -->
<div class="others_info_area mb-3 d-flex flex-wrap">
{% if user %}
<a class="add_to_wishlist" href="{{ 'wishlist'|page }}"><i class="fa fa-heart" aria-hidden="true"></i> Halanlarym</a>
<a
data-request="onCreateFav"
data-request-flash
data-request-validate
data-request-data="product_id: {{ product.id }}"
href="#"><i class="icofont-heart"></i></a>
{% else %}
<a class="add_to_wishlist" href="{{ 'login'|page }}"><i class="fa fa-heart" aria-hidden="true"></i> Halanlarym</a>
<a class="add_to_wishlist" href="{{ 'login'|page }}"><i class="fa fa-heart" aria-hidden="true"></i> Halanlaryma</a>
{% endif %}
<a class="share_with_friend" href="#"><i class="fa fa-share" aria-hidden="true"></i> Paýlaşmak</a>
<a class="share_with_friend" id="copy-{{ product.id }}" data-id="{{ product.id }}" href="#" data-link="{{ 'product'|page({id: product.id}) }}"><i class="fa fa-share" aria-hidden="true"></i> Paýlaşmak</a>
</div>
</div>

View File

@ -3,6 +3,9 @@
{% set userProfile = __SELF__.userProfile %}
{% set params = __SELF__.params %}
{% set sliders = __SELF__.sliders %}
{% set chatroom = __SELF__.chatroom %}
{% set result = __SELF__.result %}
{% set authUser = __SELF__.authUser %}
@ -44,31 +47,32 @@
<!-- Add to Cart Form -->
<form class="cart" method="post">
<div class="quantity">
<input type="number" class="qty-text" id="qty" step="1" min="1" max="12" name="quantity" value="1">
<input type="number" class="qty-text form-control" id="quantity{{ product.id }}" step="1" min="1" value="1">
</div>
<button type="submit" name="addtocart" value="5" class="cart-submit">Sebede goş</button>
{% if user %}
<div class="product_add_to_cart addToCard" data-id="{{ product.id }}" data-price="{{ product.price }}" data-image="{{ product.images[0].path }}" data-name="{{ product.name }}" data-vendor="{{ product.vendor.id }}">
<a href="#" class="btn btn-primary mt-1 mt-md-0 ml-1 ml-md-3">Sebede goş</a>
</div>
{% else %}
<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 }}">
<a href="{{ 'login'|page }}" class="btn btn-primary mt-1 mt-md-0 ml-1 ml-md-3">Sebede goş</a>
</div>
{% endif %}
<!-- Wishlist -->
<div class="modal_pro_wishlist">
{% if user %}
<a href="{{ 'wishlist'|page }}"><i class="icofont-heart"></i></a>
<a
data-request="onCreateFav"
data-request-flash
data-request-validate
data-request-data="product_id: {{ product.id }}"
href="#"><i class="icofont-heart"></i></a>
{% else %}
<a href="{{ 'login'|page }}"><i class="icofont-heart"></i></a>
{% endif %}
</div>
</form>
<!-- Share -->
<div class="share_wf mt-30">
<p>Paýlaşmak</p>
<div class="_icon">
<a href="#"><i class="fa fa-facebook" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-twitter" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-pinterest" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-linkedin" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-instagram" aria-hidden="true"></i></a>
<a href="#"><i class="fa fa-envelope-o" aria-hidden="true"></i></a>
</div>
</div>
</div>
</div>
</div>
@ -100,7 +104,6 @@
</div>
<!-- Breadcumb Area -->
{% if userProfile.web1 == "variant1" %}
{% partial "profile/style1" user=user userProfile=userProfile products=products categories=categories %}
@ -109,22 +112,99 @@
{% partial "profile/style2" user=user userProfile=userProfile products=products categories=categories %}
{% elseif userProfile.web1 == "variant3" %}
{% partial "profile/style3" user=user userProfile=userProfile %}
{% elseif userProfile.web1 == "variant4" %}
{% partial "profile/style4" user=user userProfile=userProfile %}
{% else %}
{% partial "profile/style2" user=user userProfile=userProfile %}
{% partial "profile/style1" user=user userProfile=userProfile products=products categories=categories %}
{% endif %}
{% if (user and chatroom) %}
<a id="chatBot" onclick="showChat()" class="chatBot" href="#" style="position: fixed; z-index: 2147483647;width: 70px;height: 70px;text-align: center;">
<i class="icofont-chat" id="chatIcon" style="font-size: 36;"></i>
</a>
<section class="chat-wrapper-section display-none" id="chatSection" style="background-color: rgb(238, 238, 238); border-top: 5px solid #F37B1C;">
<div class="chat_area2" id="chatroom">
<div class="chat_area-inner">
<button onclick="loadMoreMeassges()" id="more_btn" data-chatroom-id="{{ chatroom.id }}" data-skip="5">Öňki hatlar</button>
{% for message in result %}
<div class="{{ message.sender_id == authUser ? 'my_message2' : 'friend_message2' }}">
<div class="message_text">
{{ message.message }}
</div>
</div>
{% endfor %}
<form action="#" class="message_form2"
data-request="onMessageInUserProfile"
data-request-success="showLatestMessage(data)"
style="width: 100%;">
<input type="hidden" name="reciver_id" value="{{ userProfile.id }}">
<input type="hidden" name="chatroom_id" value="{{ chatroom.id }}">
<div class="message_input2">
<input type="text" name="msg" id="order-notes" placeholder="Hatyňyz..." class="form-control" style="padding-right:45px">
</div>
<button class="message_btn2" type="submit" data-attach-loading="">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 23">
<g id="paper-plane" transform="translate(0 0)">
<path id="Path_3270" data-name="Path 3270" d="M8.75,17.612V22.25a.75.75,0,0,0,1.354.444L12.817,19Z" fill="#f37b1c"></path>
<path id="Path_3271" data-name="Path 3271" d="M23.685.139A.75.75,0,0,0,22.9.085L.4,11.835a.75.75,0,0,0,.1,1.375l6.255,2.138L20.083,3.958,9.775,16.377,20.258,19.96A.767.767,0,0,0,20.5,20a.749.749,0,0,0,.742-.639l2.75-18.5a.751.751,0,0,0-.307-.722Z" fill="#f37b1c"></path>
</g>
</svg>
</button>
</form>
</div>
</div>
<script>
function loadMoreMeassges() {
$('#more_btn').text('Ýüklenýär...');
$(this).request('onLoadMore',{
data: {
chatroom_id: $('#more_btn').attr('data-chatroom-id'),
skip: $('#more_btn').attr('data-skip')
},
success: function(data) {
$.each(data.more_messages,function(index,element) {
$(`
<div class="${ element.sender_id == data.currentUserId ? 'my_message2' : 'friend_message2' }">
<div class="message_text">
${ element.message }
</div>
</div>
`).insertAfter('#more_btn');
});
skip = $('#more_btn').attr('data-skip');
$('#more_btn').attr('data-skip',+skip + 5);
$('#more_btn').text('Öňki hatlar');
}
})
}
function showLatestMessage(data) {
$('.message_form2 input').val('');
$(data.latest_message_area).insertBefore('.message_form2')
var bottom= $('.chat_area-inner').height()+$('.chat_area-inner').prop('scrollHeight');
$('.chat_area-inner').scrollTop(bottom);
}
</script>
</section>
{% else %}
{% if not user %}
<a id="chatBot" class="chatBot" href="{{ 'login'|page }}" style="position: fixed; z-index: 2147483647;width: 70px;height: 70px;text-align: center;">
<i class="icofont-chat" id="chatIcon" style="font-size: 36;"></i>
</a>
{% else %}
Hello guys
{% endif %}
{% endif %}
{% put scripts %}
<script>
@ -144,5 +224,18 @@
form.appendChild(sort);
form.submit()
}
function showChat(){
const chat = document.getElementById('chatSection')
const chatIcon = document.getElementById('chatIcon');
if (chat.classList.contains('display-block')){
chat.classList.remove('display-block');
chat.classList.add('display-none');
chatIcon.className = 'icofont-chat';
}else{
chat.classList.remove('display-none');
chat.classList.add('display-block');
chatIcon.className = 'icofont-close'
}
}
</script>
{% endput %}

View File

@ -4,6 +4,8 @@ use Backend\Classes\Controller;
use BackendMenu;
use Illuminate\Support\Facades\DB;
use TPS\Birzha\Models\Product;
use Sms\Sms\Models\SmsSender;
use Flash;
class Products extends Controller
{
@ -31,4 +33,23 @@ class Products extends Controller
return $this->stats[$status] ?? 0;
return 0;
}
public function onSendSmsApprove($id){
$product = Product::where("id", $id)->with("vendor")->first();
$smsSender = new SmsSender();
$smsSender->phone = (string)'+993'.$product->vendor->username;
$smsSender->message = strval('Gurluşyk platformasynda, <<'.(string) $product->name.'>> tassyklandy.');
$smsSender->save();
if($smsSender){
Flash::info("Ustunlikli Habar edildi");
//return $smsSender;
}else{
Flash::error("Ylanyshlyk yuze çykdy");
//return $smsSender;
}
}
}

View File

@ -15,6 +15,15 @@
<div class="form-buttons">
<div class="loading-indicator-container">
<button
style="background: darkgreen;"
type="button"
data-request="onSendSmsApprove"
data-load-indicator="Ugradylýar"
class="btn btn-default">
Tassyklanandygyny Sms Ugrat
</button>
<button
type="submit"
data-request="onSave"
@ -40,6 +49,8 @@
data-load-indicator="<?= e(trans('backend::lang.form.deleting')) ?>"
data-request-confirm="<?= e(trans('backend::lang.form.confirm_delete')) ?>">
</button>
<span class="btn-text">
<?= e(trans('backend::lang.form.or')) ?> <a href="<?= Backend::url('tps/birzha/products') ?>"><?= e(trans('backend::lang.form.cancel')) ?></a>

View File

@ -41,6 +41,10 @@ class Category extends Model
'filter_group' => ['TPS\Birzha\Models\FilterGroups', 'key' => 'category_id'],
'subs' => ['TPS\Birzha\Models\Category', 'key' => 'primary_key']
];
public $belongsTo = [
'parent' => ['TPS\Birzha\Models\Category','key' => 'primary_key'],
];
public $belongsToMany = [

View File

@ -37,3 +37,7 @@ fields:
label: Vendor
span: auto
type: number
phone:
label: Telefon
span: auto
type: text

View File

@ -67,14 +67,14 @@ navigation:
permissions:
- term
contact-messages:
label: 'Contact form'
label: Habarlaşmak
url: tps/birzha/messagescontact
icon: icon-inbox
permissions:
- contactformmsgs
sideMenu:
side-menu-item:
label: Notifications
label: Bildirişler
url: tps/birzha/notification
icon: icon-bullhorn
main-menu-item:

View File

@ -0,0 +1,23 @@
<?php namespace TPS\Birzha\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateTpsBirzhaOrders3 extends Migration
{
public function up()
{
Schema::table('tps_birzha_orders', function($table)
{
$table->string('phone', 191)->nullable();
});
}
public function down()
{
Schema::table('tps_birzha_orders', function($table)
{
$table->dropColumn('phone');
});
}
}

View File

@ -0,0 +1,23 @@
<?php namespace TPS\Birzha\Updates;
use Schema;
use October\Rain\Database\Updates\Migration;
class BuilderTableUpdateTpsBirzhaProducts39 extends Migration
{
public function up()
{
Schema::table('tps_birzha_products', function($table)
{
$table->string('keyword')->nullable();
});
}
public function down()
{
Schema::table('tps_birzha_products', function($table)
{
$table->dropColumn('keyword');
});
}
}

View File

@ -449,3 +449,9 @@
1.0.156:
- 'Updated table tps_birzha_products'
- builder_table_update_tps_birzha_products_38.php
1.0.157:
- 'Updated table tps_birzha_orders'
- builder_table_update_tps_birzha_orders_3.php
1.0.158:
- 'Updated table tps_birzha_products'
- builder_table_update_tps_birzha_products_39.php

File diff suppressed because one or more lines are too long

View File

@ -69,6 +69,8 @@ input::-webkit-inner-spin-button {
align-items: center;
justify-content: space-between;
margin-top: 20px;
position:relative;
z-index: 1;
}
.hero_meta_area {
@ -172,6 +174,7 @@ input::-webkit-inner-spin-button {
position: absolute;
top: 78px;
right: 47%;
z-index:5;
}
.header_area .classy-navbar {

View File

@ -3,4 +3,4 @@
* Copyright 2013-2017 Saurabh Sharma
* Licensed under ()
*/
.owl-carousel,.owl-carousel .owl-item{-webkit-tap-highlight-color:transparent;position:relative}.owl-carousel{display:none;width:100%;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y;-moz-backface-visibility:hidden}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item,.owl-carousel .owl-wrapper{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.owl-carousel .owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none}.owl-carousel .owl-item img{display:block;width:100%}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.no-js .owl-carousel,.owl-carousel.owl-loaded{display:block}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;cursor:hand;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item{visibility:hidden}.owl-carousel.owl-drag .owl-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.owl-carousel .animated{animation-duration:1s;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{animation-name:fadeOut}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item img.owl-lazy{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.html) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%}
.owl-carousel,.owl-carousel .owl-item{-webkit-tap-highlight-color:transparent;position:relative}.owl-carousel{display:none;width:100%;z-index:1}.owl-carousel .owl-stage{position:relative;-ms-touch-action:pan-Y;-moz-backface-visibility:hidden}.owl-carousel .owl-stage:after{content:".";display:block;clear:both;visibility:hidden;line-height:0;height:0}.owl-carousel .owl-stage-outer{position:relative;overflow:hidden;-webkit-transform:translate3d(0,0,0)}.owl-carousel .owl-item,.owl-carousel .owl-wrapper{-webkit-backface-visibility:hidden;-moz-backface-visibility:hidden;-ms-backface-visibility:hidden;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0)}.owl-carousel .owl-item{min-height:1px;float:left;-webkit-backface-visibility:hidden;-webkit-touch-callout:none}.owl-carousel .owl-item img{display:block;width:100%;}.owl-carousel .owl-dots.disabled,.owl-carousel .owl-nav.disabled{display:none}.no-js .owl-carousel,.owl-carousel.owl-loaded{display:block}.owl-carousel .owl-dot,.owl-carousel .owl-nav .owl-next,.owl-carousel .owl-nav .owl-prev{cursor:pointer;cursor:hand;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-loading{opacity:0;display:block}.owl-carousel.owl-hidden{opacity:0}.owl-carousel.owl-refresh .owl-item{visibility:hidden}.owl-carousel.owl-drag .owl-item{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.owl-carousel.owl-grab{cursor:move;cursor:grab}.owl-carousel.owl-rtl{direction:rtl}.owl-carousel.owl-rtl .owl-item{float:right}.owl-carousel .animated{animation-duration:1s;animation-fill-mode:both}.owl-carousel .owl-animated-in{z-index:0}.owl-carousel .owl-animated-out{z-index:1}.owl-carousel .fadeOut{animation-name:fadeOut}@keyframes fadeOut{0%{opacity:1}100%{opacity:0}}.owl-height{transition:height .5s ease-in-out}.owl-carousel .owl-item .owl-lazy{opacity:0;transition:opacity .4s ease}.owl-carousel .owl-item img.owl-lazy{transform-style:preserve-3d}.owl-carousel .owl-video-wrapper{position:relative;height:100%;background:#000}.owl-carousel .owl-video-play-icon{position:absolute;height:80px;width:80px;left:50%;top:50%;margin-left:-40px;margin-top:-40px;background:url(owl.video.play.html) no-repeat;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;transition:transform .1s ease}.owl-carousel .owl-video-play-icon:hover{-ms-transform:scale(1.3,1.3);transform:scale(1.3,1.3)}.owl-carousel .owl-video-playing .owl-video-play-icon,.owl-carousel .owl-video-playing .owl-video-tn{display:none}.owl-carousel .owl-video-tn{opacity:0;height:100%;background-position:center center;background-repeat:no-repeat;background-size:contain;transition:opacity .4s ease}.owl-carousel .owl-video-frame{position:relative;z-index:1;height:100%;width:100%}

View File

@ -317,8 +317,8 @@ textarea:focus,
border-color: transparent;
border-radius: 8px;
font-weight: 700;
height: 44px;
line-height: 42px;
height: 36px;
line-height: 35px;
font-size: 14px;
text-transform: uppercase;
letter-spacing: 0.5px; }
@ -593,7 +593,7 @@ textarea:focus,
.breakpoint-on .dd-trigger {
top: 11.5px;
background-color: #070a57; }
background-color: #f37b1c; }
.breakpoint-on ul ul .dd-trigger {
top: 6.5px; }
@ -604,11 +604,11 @@ textarea:focus,
.breakpoint-on .classynav ul li.has-down.active > .dd-trigger,
.breakpoint-on .classynav ul li.megamenu-item.active > .dd-trigger {
background-color: #0f99f3; }
background-color: #f37b1c; }
.hero_meta_area {
position: relative;
z-index: 1; }
z-index: 0; }
.hero_meta_area .search-area {
position: relative;
z-index: 1; }
@ -933,7 +933,7 @@ textarea:focus,
right: 30px; }
.classy-navbar-toggler .navbarToggler span {
background-color: #0f99f3;
background-color: #f37b1c;
width: 24px; }
.breakpoint-on .classynav > ul > li > a {
@ -1169,7 +1169,7 @@ textarea:focus,
#quickview .modal-body {
box-shadow: 0 0 88px 8px rgba(47, 91, 234, 0.125); }
#quickview button.close {
div[id^=quickview] button.close {
border: 1px solid #d6e6fb;
box-shadow: none;
position: absolute;
@ -1231,7 +1231,7 @@ textarea:focus,
border: 1px solid #f8f8ff;
height: 35px;
text-align: center;
width: 40px;
width: 75px;
font-size: 13px; }
.quickview_body .cart {
display: -webkit-box;
@ -1497,7 +1497,7 @@ textarea:focus,
visibility: hidden; }
@media only screen and (max-width: 767px) {
.single-product-area .product_description .product_add_to_cart a i {
display: none; } }
/* display: none; */ } }
.single-product-area .product_description .product_add_to_cart a:hover, .single-product-area .product_description .product_add_to_cart a:focus {
background-color: #ba5603; }
.single-product-area .product_description .product_quick_view a {
@ -1521,7 +1521,7 @@ textarea:focus,
visibility: hidden; }
@media only screen and (max-width: 767px) {
.single-product-area .product_description .product_quick_view a i {
display: none; } }
/* display: none; */ } }
.single-product-area .product_description .product_quick_view a:hover, .single-product-area .product_description .product_quick_view a:focus {
background-color: #ba5603; }
.single-product-area .hover_img {
@ -3679,7 +3679,7 @@ button.mfp-arrow {
@media only screen and (max-width: 767px) {
.shop_list_product_area .single-product-area .product_description .product_add_to_cart a i,
.shop_list_product_area .single-product-area .product_description .product_quick_view a i {
display: none; } }
/* display: none; */ } }
.shop_list_product_area .single-product-area .product_description .product_add_to_cart a:hover, .shop_list_product_area .single-product-area .product_description .product_add_to_cart a:focus,
.shop_list_product_area .single-product-area .product_description .product_quick_view a:hover,
.shop_list_product_area .single-product-area .product_description .product_quick_view a:focus {
@ -3859,4 +3859,613 @@ button.mfp-arrow {
.plus-btn:hover{
cursor: pointer;
}
.chatBot{
background-color: #F37B1C;
border-radius: 50%;
bottom: 100px;
color: #ffffff;
font-size: 16px;
height: 40px;
line-height: 70px;
right: 40px;
text-align: center;
width: 40px;
-webkit-transition-duration: 500ms;
-o-transition-duration: 500ms;
transition-duration: 500ms;
}
.chatBot:hover{
color: #ffffff;
}
.chat {
padding: 100px 0;
}
.chat_wrap {
position: relative;
}
#more_btn {
background: transparent;
border: none;
width: 100%;
text-align: center;
font-size: 15px;
font-weight: 500;
line-height: 1.4;
position: relative;
margin-bottom: 20px;
cursor: pointer;
font-style: italic;
}
#more_btn::before {
content: '';
position: absolute;
top: -15px;
left: 50%;
transform: translateX(-50%);
-ms-transform: translateX(-50%);
-moz-transform: translateX(-50%);
-o-transform: translateX(-50%);
-webkit-transform: translateX(-50%);
border: 6px solid #000;
border-color: transparent transparent #000 transparent;
animation: load_arrow .8s ease-in infinite;
}
@keyframes load_arrow {
0% {
top: -12px;
}
50% {
top: -15px;
}
100% {
top: -12px;
}
}
.chat_box {
display: flex;
border: 1px solid #e2e2e2;
border-radius: 10px;
overflow: hidden;
z-index: 7;
/* position: relative; */
}
.chat_people {
width: 30%;
border-right: 1px solid #e2e2e2;
height: 620px;
overflow-y: auto;
position: relative;
background: #fff;
}
.chat_people::-webkit-scrollbar {
display: none;
}
.chat_people::-webkit-scrollbar-track {
display: none;
}
.chat_people::-webkit-scrollbar-thumb {
display: none;
}
.chat_area-inner::-webkit-scrollbar {
width: 10px;
}
.chat_area-inner::-webkit-scrollbar-track {
background: #fff;
border: 1px solid #e2e2e2;
border-radius: 5px;
}
.chat_area-inner::-webkit-scrollbar-thumb {
background: var(--blue);
border-radius: 5px;
}
.chat_area {
width: 70%;
height: 620px;
padding: 10px 10px 100px;
position: relative;
}
.chat_wall {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
-ms-transform: translate(-50%, -50%);
-moz-transform: translate(-50%, -50%);
-o-transform: translate(-50%, -50%);
-webkit-transform: translate(-50%, -50%);
width: 100%;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
-ms-flex-direction: column;
-moz-flex-direction: column;
-o-flex-direction: column;
-webkit-flex-direction: column;
z-index: -1;
}
.chat_wall_img {
width: 200px;
height: 100px;
}
.chat_wall_img img {
width: 100%;
height: 100%;
object-fit: contain;
-o-object-fit: contain;
}
.chat_wall_text {
font-size: 24px;
font-weight: 700;
line-height: 1.5;
color: #F37B1C;
margin-top: 10px;
text-align: center;
width: 60%;
}
.chat_area-inner {
overflow-y: auto;
height: 100%;
padding: 20px;
/* z-index: 3; */
background: #fff;
/* display: none; */
}
.chat_area-inner.active {
display: block;
}
.person {
background: #f5f5f5;
padding: 30px;
border-bottom: 1px solid #e2e2e2;
position: relative;
cursor: pointer;
}
.person:hover {
background: #F37B1C;
color: white;
}
.person:hover .person_message {
width: calc(100% - 50px);
}
.delete {
cursor: pointer;
position: absolute;
bottom: 20px;
right: 20px;
width: 30px;
height: 32px;
display: none;
z-index: 2;
background-color: transparent;
}
.delete:hover {
animation: trash .5s linear infinite;
}
@keyframes trash {
0% {
transform: rotate(-7deg);
}
50% {
transform: rotate(7deg);
}
100% {
transform: rotate(-7deg);
}
}
.delete img {
width: 100%;
height: 100%;
object-fit: contain;
-o-object-fit: contain;
pointer-events: none;
}
.person:hover .delete {
display: block;
}
.person:last-child {
border-bottom: none;
}
.person.active {
background: #F37B1C;
color: #fff;
}
.person_name {
font-size: var(--text-18);
font-weight: 700;
line-height: 1.3;
margin-bottom: 10px;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-word;
}
.person_message {
font-size: 14px;
font-weight: 400;
line-height: 1.3;
display: -webkit-box;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
}
.chat_alert {
position: absolute;
top: 12px;
right: 20px;
border-radius: 50%;
width: 25px;
height: 25px;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
background: #ba5603;
font-size: 10px;
font-weight: 300;
line-height: 1.3;
}
.chat_alert.active {
display: none;
}
.friend_message {
width: 60%;
border-bottom-right-radius: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
padding: 30px;
margin-bottom: 30px;
background: #f5f5f5;
overflow-x: hidden;
}
.my_message {
width: 60%;
border-bottom-left-radius: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
padding: 30px;
margin: 0 0 30px auto;
background: #F37B1C;
color: #fff;
overflow-x: hidden;
}
.friend_message .message_time {
color: rgba(0, 0, 0, .5);
font-style: italic;
margin-bottom: 10px;
}
.my_message .message_time {
color: rgba(250, 250, 250, .5);
font-style: italic;
margin-bottom: 10px;
}
.message_text {
font-size: 14px;
font-weight: 400;
line-height: 1.3;
}
.message_form {
position: absolute;
bottom: 20px;
left: 50%;
transform: translateX(-50%);
width: calc(100% - 60px);
border: 1px solid #e2e2e2;
border-radius: 10px;
overflow: hidden;
background: #fff;
}
.chat_burger {
width: 30px;
height: 30px;
position: absolute;
top: -40px;
left: 20px;
display: none;
cursor: pointer;
}
.chat_burger svg {
width: 100%;
height: 100%;
object-fit: contain;
-o-object-fit: contain;
}
.message_input {
width: 100%;
height: 100px;
}
.message_input textarea {
font-size: var(--text-16);
font-weight: 400;
line-height: 1.3;
padding: 20px 90px 20px 20px;
width: 100%;
min-height: 100%;
font-family: 'Poppins', sans-serif;
resize: none;
}
.message_input textarea::-webkit-scrollbar {
display: none;
}
.form_file {
position: absolute;
top: 20px;
right: 55px;
z-index: 1;
}
.message_btn {
position: absolute;
top: 20px;
right: 20px;
background: none;
border: none;
cursor: pointer;
width: 20px;
height: 20px;
z-index: 1;
}
.message_btn img {
width: 100%;
height: 100%;
object-fit: contain;
-o-object-fit: contain;
}
.label_img {
width: 20px;
height: 20px;
}
.label_img img {
width: 100%;
height: 100%;
object-fit: contain;
-o-object-fit: contain;
}
.anchor {
cursor: pointer;
}
.empty_area {
position: relative;
height: 420px;
}
/* Custom file-input ============================ */
.inputfile {
width: 0.1px;
height: 0.1px;
opacity: 0;
overflow: hidden;
position: absolute;
z-index: -1;
cursor: pointer;
}
.inputfile+label {
max-width: 80%;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
display: inline-block;
overflow: hidden;
font-size: var(--vacancy_text);
font-weight: 400;
line-height: 1.5;
}
.inputfile+label {
display: none;
}
.inputfile:focus+label,
.inputfile.has-focus+label {
outline: 1px dotted #000;
outline: -webkit-focus-ring-color auto 5px;
}
.inputfile+label * {
pointer-events: none;
}
/* Custom file-input ============================ */
/* Chat end ======================================= */
.chat-wrapper-section {
position: fixed;
right: 40px;
bottom: 182px;
width: 335px;
background-color: #fff;
border-radius: 5px;
transition: all 0.4s;
box-shadow: 1px 2px 11px #44444469;
z-index:99999;
height: 600px;
}
.message_input2 {
width: 100%;
height: 100px;
padding: 30px;
background-color: rgba(0, 0, 0, 0.03);
}
.message_form {
position: absolute;
bottom: 0px;
left: 50%;
transform: translateX(-50%);
width: calc(100% - 60px);
border: 1px solid #e2e2e2;
border-radius: 10px;
overflow: hidden;
background: #fff;
}
.friend_message2 {
width: 60%;
border-bottom-right-radius: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
padding: 10px;
margin-bottom: 30px;
background: #f5f5f5;
overflow-x: hidden;
}
.my_message2 {
width: 60%;
border-bottom-left-radius: 10px;
border-top-left-radius: 10px;
border-top-right-radius: 10px;
padding: 10px;
margin: 0 0 30px auto;
background: #F37B1C;
color: #fff;
overflow-x: hidden;
}
.message_form2 {
position: absolute;
bottom: 19px;
left: 50%;
transform: translateX(-50%);
width: calc(100% - 60px);
border: 0px;
/* border-radius: 10px; */
overflow: hidden;
background: #fff;
}
.chat_area2 {
width: 100%;
height: 620px;
position: relative;
padding-bottom: 100px;
}
.display-block{
display: block;
opacity: 1;
transition: opacity 1s;
}
.display-none{
display: none;
opacity: 0;
}
.message_btn2 {
position: absolute;
top: 40px;
right: 35px;
background: none;
border: none;
cursor: pointer;
width: 20px;
height: 20px;
z-index: 1;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

View File

@ -7,9 +7,6 @@ var total_quantity = 0;
var cardAmount = 0;
const addToCard = (id, price, quantity, name, image, vendor) => {
console.log("add to card function");
console.log(localStorage.getItem("cartForForm"));
console.log(productsForForm);
var exists = false;
cart.map((item) => {
if (item.id === id){
@ -60,7 +57,6 @@ const addToCard = (id, price, quantity, name, image, vendor) => {
window.onload = () => {
console.log("window onload");
cart = JSON.parse(localStorage.getItem("cart")) ?? [];
cartForForm = JSON.parse(localStorage.getItem("cartForForm")) ?? [];
var totalQuantity = 0;
@ -76,7 +72,6 @@ window.onload = () => {
$(".addToCard").on('click', function (){
console.log("add to card");
let id = parseInt($(this).data('id'));
let price = parseFloat($(this).data('price'));
let quantity = parseInt($("#quantity"+id).val());
@ -89,9 +84,20 @@ $(".addToCard").on('click', function (){
toastrCustomSuccess("Sebede goşuldy");
});
$(".share_with_friend").on('click', function (){
let link = $(this).data('link');
var tempTextarea = $('<textarea>');
$('body').append(tempTextarea);
tempTextarea.val(link).select();
document.execCommand('copy');
tempTextarea.remove();
toastrCustomSuccess("Haryt salgylanmasy kopýalandy");
});
function updateProducts(){
console.log("Product update");
const cartBody = $("#cartBody");
cartBody.html('');
new_product_total_price = 0;

View File

@ -7,10 +7,14 @@ forceUrl = 0
[staticMenu]
code = "top-menu"
[SeoCmsPage]
==
<html lang="en">
<head>
{% component 'SeoCmsPage' %}
<meta charset="UTF-8">
<meta name="description" content="{{ this.page.meta_description }}">
<meta name="title" content="{{ this.page.meta_title }}">
@ -27,6 +31,11 @@ code = "top-menu"
</head>
<body>
{% flash %}
<p data-control="flash-message" class="flash-message fade {{ type }}" data-interval="5">
{{ message }}
</p>
{% endflash %}
<!-- Preloader -->
<!-- <div id="preloader">
<div class="spinner-grow" role="status">
@ -59,6 +68,7 @@ code = "top-menu"
<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/inputmask.js'|theme }}"></script>
<script src="{{ 'assets/js/script.js'|theme }}"></script>
<script>

View File

@ -38,58 +38,7 @@ items:
title: 'Bezeg Gipsler'
nesting: null
type: url
url: /category/products/bezeg-gipsler
code: ''
reference: null
cmsPage: null
replace: null
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '1'
isExternal: '0'
-
title: Çiteler
nesting: null
type: url
url: /category/products/citeler
code: ''
reference: null
cmsPage: null
replace: null
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '2'
isExternal: '0'
-
title: Karnizlar
nesting: null
type: url
url: /category/products/karnizlar
code: ''
reference: null
cmsPage: null
replace: null
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '3'
isExternal: '0'
-
title: Kalonlar
nesting: null
type: url
url: /category/products/kalonlar
url: /category-profile/bezeg-gipsler
code: ''
reference: null
cmsPage: null
@ -103,7 +52,7 @@ items:
cssClass: '1'
isExternal: '0'
-
title: 'Bezeg Dizaýn'
title: 'Dizaýn Studiolar'
nesting: null
type: url
url: /category-profile/bezeg-dizayn
@ -121,10 +70,10 @@ items:
isExternal: '0'
items:
-
title: Klassika
title: 'Agamyrat Dizaýn'
nesting: null
type: url
url: /category/products/klassika
url: /category-profile/agamyrat-dizayn
code: ''
reference: null
cmsPage: null
@ -137,40 +86,6 @@ items:
isHidden: '0'
cssClass: '1'
isExternal: '0'
-
title: Lýuks
nesting: null
type: url
url: /category/products/lyuks
code: ''
reference: null
cmsPage: null
replace: null
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '2'
isExternal: '0'
-
title: Modern
nesting: null
type: url
url: /category/products/moder
code: ''
reference: null
cmsPage: null
replace: null
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '3'
isExternal: '0'
-
title: Agaçlar
nesting: null
@ -191,13 +106,9 @@ items:
items:
-
title: Mebel
nesting: null
type: url
url: /category/products/mebel
url: /category-profile/mebel
code: ''
reference: null
cmsPage: null
replace: null
viewBag:
locale:
ru:
@ -206,108 +117,6 @@ items:
isHidden: '0'
cssClass: '1'
isExternal: '0'
-
title: Gapylar
nesting: null
type: url
url: /category/products/gapylar
code: ''
reference: null
cmsPage: null
replace: null
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '2'
isExternal: '0'
-
title: Spalny
nesting: null
type: url
url: /category/products/spalny
code: ''
reference: null
cmsPage: null
replace: null
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '3'
isExternal: '0'
-
title: Prihožka
nesting: null
type: url
url: /category/products/prihozka
code: ''
reference: null
cmsPage: null
replace: null
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '4'
isExternal: '0'
-
title: Garderob
nesting: null
type: url
url: /category/products/garderob
code: ''
reference: null
cmsPage: null
replace: null
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '1'
isExternal: '0'
-
title: Kuhnýa
nesting: null
type: url
url: /category/products/kuhnya
code: ''
reference: null
cmsPage: null
replace: null
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '3'
isExternal: '0'
-
title: Eýwanlar
nesting: null
type: url
url: /category-profile/jghjghj
code: ''
reference: null
cmsPage: null
replace: null
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: Aýnalar
nesting: null
@ -445,23 +254,6 @@ items:
isHidden: '0'
cssClass: '3'
isExternal: '0'
-
title: Lýustra
nesting: null
type: url
url: /category/products/lyustra
code: ''
reference: null
cmsPage: null
replace: null
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: ''
isExternal: '0'
-
title: Lýustralar
nesting: null
@ -480,57 +272,6 @@ items:
cssClass: ''
isExternal: '0'
items:
-
title: Lýustra
nesting: null
type: url
url: /category/products/lyustra
code: ''
reference: null
cmsPage: null
replace: null
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '1'
isExternal: '0'
-
title: Spotlar
nesting: null
type: url
url: /category/products/spotlar
code: ''
reference: null
cmsPage: null
replace: null
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '2'
isExternal: '0'
-
title: 'Led Lampalar'
nesting: null
type: url
url: /category/products/led-lampalar
code: ''
reference: null
cmsPage: null
replace: null
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '3'
isExternal: '0'
-
title: Wklýuçatel
nesting: null
@ -546,7 +287,33 @@ items:
title: ''
url: ''
isHidden: '0'
cssClass: '4'
cssClass: '3'
isExternal: '0'
-
title: 'Rother elektrik'
type: url
url: /category-profile/rother-elektrik
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '2'
isExternal: '0'
-
title: 'Lux Lighting'
type: url
url: /category-profile/lux-lighting
code: ''
viewBag:
locale:
ru:
title: ''
url: ''
isHidden: '0'
cssClass: '1'
isExternal: '0'
-
title: '3D Modeller'
@ -567,9 +334,13 @@ items:
isExternal: '0'
-
title: 'Habarlaşmak Üçin'
nesting: null
type: cms-page
url: null
code: ''
reference: contact-us
cmsPage: null
replace: null
viewBag:
locale:
ru:

View File

@ -1,10 +1,12 @@
title = "Haryt goşmak"
url = "/add-product/:id?"
url = "/add-product/:productId?"
layout = "default"
is_hidden = 0
robot_index = "index"
robot_follow = "follow"
[offerform]
productId = "{{ :id }}"
productId = "{{ :productId }}"
[session]
security = "user"

View File

@ -0,0 +1,14 @@
title = "Habarlaşmak"
url = "/chat"
layout = "default"
is_hidden = 0
robot_index = "index"
robot_follow = "follow"
[session]
security = "user"
redirect = "login"
[messages]
==
{% component 'messages' %}

View File

@ -0,0 +1,81 @@
title = "Haryt2"
url = "/product2/:id"
layout = "default"
is_hidden = 0
robot_index = "index"
robot_follow = "follow"
[singleoffer]
productSlug = "{{ :slug }}"
offerId = "{{ :id }}"
[session]
security = "all"
==
{% set product = singleoffer.offer %}
{% set rating = singleoffer.rating %}
<!-- Breadcumb Area -->
<div class="breadcumb_area">
<div class="container h-100">
<div class="row h-100 align-items-center">
<div class="col-12">
<h1>{{product.name}}</h1>
</div>
</div>
</div>
</div>
<!-- Breadcumb Area -->
<!-- Single Product Details Area -->
<section class="single_product_details_area section_padding_100">
<div class="container">
<div class="row">
<div class="col-12">
{{product.description|raw}}
</div>
{% for key, image in product.images %}
<div class="col-12">
<img class="d-block w-100" src="{{ image.path }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}" style="width: 100%;">
</div>
{% endfor %}
</div>
<div class="row justify-content-center" style="margin-top: 50px;">
<div class="col-md-6">
<div class="widget catagory mb-30">
<div style="text-align: center">
<img src="{{ product.vendor.logo|media|resize(200, 200, { mode: 'crop' }) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi, {{ userProfile.name }}" style="width: 32%;border: 5px solid white;border-radius: 10px;box-shadow: 0px 2px 5px #00000038;">
</div>
<h6 class="widget-title" style="margin-top: 25px;text-align: center;font-weight: bold;font-size: 18px;margin-bottom: 2px;">{{ product.vendor.shop_title }}</h6>
<p style="text-align: center;font-size: 14px;">{{ product.vendor.slogan }}</p>
<hr>
<div class="widget-desc">
<p class="custom-control d-flex align-items-center" style="margin-bottom: 0px;">
<label style="font-weight: 300;margin-bottom: 0px;">- Iş Wagty: {{ product.vendor.work_time }} <span class="text-muted"></span></label>
</p>
<p class="custom-control d-flex align-items-center" style="margin-bottom: 0px;">
<label style="font-weight: 300;margin-bottom: 0px;">- Telefon: +993 {{ product.vendor.username }} <span class="text-muted"></span></label>
</p>
<a href="/user-profile/{{product.vendor.id}}" type="button" class="btn btn-primary" style="width: 100%;margin-top: 20px;">
Doly Maglumat
</a>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Single Product Details Area End -->
{% put scripts %}
<script>
function resetForm() {
document.getElementById('commentForm').reset(); // Reset the form
}
</script>
{% endput %}

View File

@ -3,6 +3,8 @@ url = "/"
layout = "default"
description = "Home page description"
is_hidden = 0
robot_index = "index"
robot_follow = "follow"
[builderList]
modelClass = "TPS\Birzha\Models\SliderApp"
@ -48,6 +50,10 @@ pageNumber = "{{ :page }}"
[session]
security = "all"
redirect = "index"
[singleoffer]
productSlug = "{{ :slug }}"
offerId = "{{ :id }}"
==
{% set sliders = builderList.records %}
{% set brandSliders = builderList2.records %}
@ -63,22 +69,14 @@ redirect = "index"
<section class="welcome_area" style="background: ghostwhite;padding-top: 20px;">
<div class="welSlideTwo owl-carousel">
<div class="welSlideTwo owl-carousel customCarousel">
<!-- Single Slide -->
{% for slider in sliders %}
<div class="single_slide home-3 bg-img" style="background-image: url({{ slider.img|media }});">
<div class="container h-100">
<div class="row h-100 align-items-center">
<div class="col-12">
<div class="welcome_slide_text text-center">
</div>
</div>
</div>
<div class="single_slide home-3 bg-img" >
<div style="border: 0.3px solid #d5d5d5;border-radius: 10px;">
<img src="{{ slider.img|media }}">
</div>
</div>
{% endfor %}
@ -88,7 +86,7 @@ redirect = "index"
</section>
<!-- Shop Catagory Area -->
<div class="shop_by_catagory_area section_padding_100" style="padding-bottom: 70px;padding-top: 70px;">
<div class="shop_by_catagory_area section_padding_50" style="padding-bottom: 70px;padding-top: 70px;">
<div class="container">
<!-- <div class="row">
<div class="col-12">
@ -129,7 +127,7 @@ redirect = "index"
<div class="megamenu-slides owl-carousel">
{% for brandSlider in brandSliders %}
<img src="{{ brandSlider.img|media|resize(950) }}" alt="Gurluşyk, Gurluşyk Platforma, Bezeg, Gipsler merkezi">
<img src="{{ brandSlider.img|media|resize(950) }}" alt="Gurluşyk, Gurluşyk Platforma, Bezeg, Gipsler merkezi" style="height: 300px;">
{% endfor %}
</div>
@ -142,11 +140,11 @@ redirect = "index"
<!-- Brands Area -->
<section class="catagories_area home-3 mt-5 section_padding_70_70">
<div class="container">
<div class="row justify-content-center">
<div class="row justify-content-start">
{% for user in users %}
<div class="col-6 col-sm-6 col-md-4 col-lg-4">
<div class="col-6 col-sm-6 col-md-4 col-lg-4 mt-4">
<a href="{{ 'user-profile'|page({id: user.id}) }}">
<div class="userBannerBg">
<div class="single_catagory">
@ -169,6 +167,6 @@ redirect = "index"
{% partial "home/vip-section" type="vip" header="VIP Harytlar" %}
{% partial "home/vip-section" type="vip" header="home.prod.section1"|_ %}
{% partial "home/parallax" %}
{% partial "home/vip-section" type="new" header="Täze Lýustralar" %}
{% partial "home/vip-section" type="new" header="Täze Harytlar" %}

View File

@ -0,0 +1,10 @@
title = "Meniň hatlarym"
url = "/my-messages"
layout = "default"
is_hidden = 0
robot_index = "index"
robot_follow = "follow"
[messages]
==
{% component 'messages' %}

View File

@ -2,6 +2,8 @@ title = "Ulanyjy Profil sahypasy"
url = "/user-profile/:id/:slug?"
layout = "default"
is_hidden = 0
robot_index = "index"
robot_follow = "follow"
[session]
security = "all"
@ -10,6 +12,11 @@ security = "all"
perPage = 24
slug = "{{ :slug }}"
id = "{{ :id }}"
[messages]
[session session2]
security = "all"
==
<?php
function onStart(){

View File

@ -1,13 +1,24 @@
[viewBag]
==
<style>
.tagCat{
.customParentLink{
font-size: 19px !important;
font-weight: bold !important;
padding-left: 30px !important;
padding-top: 30px !important;
color: #000000 !important;
text-decoration: underline !important;
}
.customModal{
max-width: 60%;
}
.tagCat {
border: 2px solid #d6e6fb;
border-radius: 10px;
display: inline-block;
font-size: 15px;
margin-left: 2px !important;
padding: 5px 15px;
padding: 5px 15px;
margin: 15px;
margin-bottom: 0px !important;
margin-top: 5px !important;
@ -16,21 +27,22 @@
}
.tagCat:hover{
.tagCat:hover {
border: 2px solid #d6e6fb;
border-radius: 10px;
display: inline-block;
font-size: 15px;
margin-left: 2px !important;
padding: 5px 15px;
padding: 5px 15px;
margin: 15px;
margin-bottom: 0px !important;
margin-top: 5px !important;
background: #F37B1C;
color: white !important;;
color: white !important;
;
}
.activeCat{
.activeCat {
background: #F37B1C !important;
color: white !important;
}
@ -63,19 +75,19 @@
padding-bottom: 9px;
}
.accountq iframe{
.accountq iframe {
height: 360px !important;
height: 360px !important;
}
.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 {
@ -94,47 +106,47 @@
border: 2px solid #ff9800;
}
.gurl_slider .owl-carousel .owl-stage-outer{
.gurl_slider .owl-carousel .owl-stage-outer {
height: 300px !important;
height: 300px !important;
border: 1px solid gray;
border-radius: 10px;
}
.gurl_slider2 .owl-carousel .owl-stage-outer{
.gurl_slider2 .owl-carousel .owl-stage-outer {
height: 450px !important;
height: 450px !important;
border: 1px solid gray;
border-radius: 10px;
}
.userBannerTitle{
.userBannerTitle {
padding: 5px;
text-align: center;
}
.userBannerBg{
.userBannerBg {
background: #f37b1c;
color: white;
border-radius: 10px;
border-radius: 10px;
}
.userBannerBg:hover{
.userBannerBg:hover {
background: #904000;
color: white;
border-radius: 10px;
border-radius: 10px;
}
@ -162,8 +174,8 @@
border-bottom: 1px solid #d5d5d5;
}
.searchGurl{
border: 1px solid #e5e5e5 !important;
.searchGurl {
border: 1px solid #e5e5e5 !important;
}
.searchGurl:focus {
@ -175,7 +187,7 @@
font-size: 14.5px;
height: auto;
line-height: 1;
padding: 15px 10px;
padding: 15px 0;
}
@ -185,10 +197,15 @@
font-size: 14px;
}
p{
.classynav ul li .megamenu .single-mega.cn-col-4{
padding-top: 10px;
padding-bottom: 10px;
}
p {
word-wrap: break-word;
}
.nav-brand {
@ -208,5 +225,131 @@ p{
border: 1px solid #b2b2b2;
}
@media (max-width: 1200px) {
.customCarousel .owl-item img {
display: block !important;
width: 100% !important;
height: 80% !important;
object-fit: cover !important;
-o-object-fit: cover !important;
}
.customParentLink{
display: none !important;
}
.customModal{
max-width: 80%;
}
.header_box-search-input input {
width: calc(100% - 10px);
}
.nav-brand {
width: 130px;
}
.header_box-search-input button {
right: 2px;
}
.bigshop_box {
margin-bottom: 20px;
}
.welSlideTwo .single_slide::after {
height: 53%;
}
.single_slide {
height: 280px;
}
.welSlideTwo .owl-prev,
.welSlideTwo .owl-next {
top: 50%;
}
.header_area .classynav ul li a:nth-child(2) {
padding-left: 0;
}
.btn{
margin-top: 2px;
}
}
@media (max-width: 992px) {
.customCarousel .owl-item img {
display: block !important;
width: 100% !important;
height: 80% !important;
object-fit: cover !important;
-o-object-fit: cover !important;
}
.customParentLink{
display: none !important;
}
.customModal{
max-width: 100%;
}
.single_slide {
height: 215px;
}
.welSlideTwo .owl-prev,
.welSlideTwo .owl-next {
width: 35px;
height: 35px;
line-height: 35px;
}
.breakpoint-on .classy-navbar .classy-menu.menu-on {
padding: 0 10px;
}
.line {
display: none !important;
}
.header_area .classynav ul li {
margin: 5px 0;
}
.header_area .classynav ul li a {
padding: 15px 10px;
}
.btn{
margin-top: 2px;
}
}
@media (max-width: 600px) {
.customCarousel .owl-item img {
display: block !important;
width: 100% !important;
height: 80% !important;
object-fit: cover !important;
-o-object-fit: cover !important;
}
.customParentLink{
display: none !important;
}
.single_slide {
height: 145px;
}
}
</style>

View File

@ -5,7 +5,7 @@
<div class="row">
<!-- Single Feature Area -->
<div class="col-12 col-sm-12 col-lg-12" >
<p style=" text-align: center;font-weight: bold;color: #f8f8ff;background: #1d2536;padding: 6px;border-radius: 5px;">Goşmaça Maglumatlar üçin habarlaşyp bilersiňiz. 7/24</p>
<p style="text-align: center;font-weight: bold;color: #f8f8ff;background: #1d2536;padding: 6px;border-radius: 5px;">{{'layout.footer.7.24'|_}}</p>
</div>
</div>
</div>
@ -14,7 +14,7 @@
<div class="container">
<div class="row">
<!-- Single Footer Area -->
<div class="col-12 col-sm-6 col-md-5 col-lg-4 col-xl-3">
<div class="col-6 col-sm-6 col-md-5 col-lg-4 col-xl-3">
<div class="single_footer_area mb-100">
<div class="footer_heading mb-4">
<h6>Biziň bilen habarlaşmak</h6>
@ -33,7 +33,7 @@
</div>
<!-- Single Footer Area -->
<div class="col-12 col-sm-6 col-md col-lg-4 col-xl-2">
<div class="col-6 col-sm-6 col-md col-lg-4 col-xl-2">
<div class="single_footer_area mb-100">
<div class="footer_heading mb-4">
<h6>Sahypalar</h6>
@ -51,7 +51,7 @@
</div>
<!-- Single Footer Area -->
<div class="col-12 col-sm-6 col-md col-lg-4 col-xl-2">
<div class="col-6 col-sm-6 col-md col-lg-4 col-xl-2">
<div class="single_footer_area mb-100">
<div class="footer_heading mb-4">
<h6>Sahypalar</h6>
@ -64,7 +64,7 @@
</div>
<!-- Single Footer Area -->
<div class="col-12 col-sm-6 col-md-5 col-lg-4 col-xl-2">
<div class="col-6 col-sm-6 col-md-5 col-lg-4 col-xl-2">
<div class="single_footer_area mb-100">
<div class="footer_heading mb-4">
<h6>Sahypalar</h6>

View File

@ -44,13 +44,11 @@ pageNumber = "{{ :page }}"
{% if user %}
<li>
<a href="{{ 'addProduct'|page }}">
Haryt goşmak
</a>
<a href="{{ 'addProduct'|page }}">{{ 'header.addProduct'|_ }}</a>
</li>
<li>
<a class="customA" data-request="onLogout" data-request-data="redirect: '/'" role="button">
Çykmak
{{ 'header.logout'|_ }}
</a>
</li>
{% endif %}
@ -143,6 +141,12 @@ pageNumber = "{{ :page }}"
<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="{{ 'chat'|page }}">Hatlarym
{% if user.getUnreadMessagesCount() > 0 %}
<span class="badge badge-pill badge-primary" style="font-size: 10px;background: #f37b1c;">{{ user.getUnreadMessagesCount() }}</span></a></li>
{% endif %}
<li><a href="{{ 'my-orders'|page }}">Zakazlarym</a></li>
<li><a href="{{ 'vendor-settings'|page }}">Dükanyň sazlamalary</a></li>
<li><a href="{{ 'my-comments'|page }}">Teswirler</a></li>
@ -180,12 +184,12 @@ pageNumber = "{{ :page }}"
{% if not item.viewBag.isHidden and item.items|length %}
{% if key != 0 %}
<li style="font-size: 12px;color: #b2b2b2;margin-left: 15px;"> | </li>
<li class="line" style="font-size: 12px;color: #b2b2b2;margin-left: 15px;margin-right: 15px;"> | </li>
{% endif %}
<li class="megamenu-item"><a href="{{item.url}}">{{ 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>
<a href="{{item.url}}" class="customParentLink" style="{% if key == 0 %}padding-left: 0px;{% endif %}">{{ item.title }}</a>
<ul class="single-mega cn-col-4">
{% for item in item.items if item.viewBag.cssClass == 1 %}
<li><a href="{{ item.url }}">- {{ item.title }}</a></li>
@ -221,7 +225,7 @@ pageNumber = "{{ :page }}"
{% elseif not item.viewBag.isHidden %}
{% if key != 0 %}
<li style="font-size: 12px;color: #b2b2b2;margin-left: 15px;"> | </li>
<li class="line" style="font-size: 12px;color: #b2b2b2;margin-left: 15px;margin-right: 15px;"> | </li>
{% endif %}
<li><a href="{{ item.url }}" style="{% if key == 0 %}padding-left: 0px;{% endif %}">{{item.title}}</a></li>
@ -234,7 +238,7 @@ pageNumber = "{{ :page }}"
</ul>
</div>
<form class="header_box-search-input burger">
<form action="{{ 'search'|page }}" method="GET" 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">

View File

@ -1,20 +1,19 @@
[viewBag]
==
<!-- Single Popular Item -->
<div class="single_popular_item">
<a href="{{ 'product'|page({id: product.id}) }}">
<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 }}">
<img class="first_img" src="{{ product.images[0].thumb(680,700,{'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 }}">
<img class="hover_img" src="{{ product.images[1].thumb(680,700,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk Platforma, Bezeg, Gipsler merkezi, {{ product.name }}">
{% endif %}
<!-- Wishlist -->
<div class="product_wishlist">
{% if user %}
<a href="{{ 'wishlist'|page }}"><i class="icofont-heart"></i></a>
<a href="#" data-request="onCreateFav" data-request-data="product_id: {{product.id}}" data-request-flash><i class="icofont-heart"></i></a>
{% else %}
<a href="{{ 'login'|page }}"><i class="icofont-heart"></i></a>
{% endif %}

View File

@ -6,7 +6,7 @@
<!-- Modal -->
<div class="modal fade" id="exampleModalLong" tabindex="-1" role="dialog" aria-labelledby="exampleModalLongTitle" aria-hidden="true">
<div class="modal-dialog" role="document" style="max-width:50%;">
<div class="modal-dialog customModal" role="document">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLongTitle">{{userProfile.shop_title}}</h5>
@ -17,7 +17,7 @@
<div class="modal-body">
<div style="padding: 10px;border: 1px solid #c7c7c7;background: #ececec;margin-bottom: 30px;border-radius: 5px;">
<div class="row">
<div class="col-md-4" style="align-self: center;">
<div class="col-md-4 col-6" style="align-self: center;">
<div class="row">
<div class="col-md-12">
Iş Wagty: <a>{{userProfile.work_time}}</a>
@ -36,14 +36,14 @@
</div>
</div>
</div>
<div class="col-md-3" style="align-self: center;">
<div class="col-md-3 col-6" style="align-self: center;">
<div class="row" style="border-left: 1px solid gray;border-right: 1px solid gray;">
<div class="col-md-12" style="text-align:center;">
<img src="{{userProfile.qr|media}}" style="width: 150px;border: 1px solid;">
</div>
</div>
</div>
<div class="col-md-5" style="align-self: center;">
<div class="col-md-5 mt-2" style="align-self: center;">
<div class="row">
<div class="col-md-12">

View File

@ -84,14 +84,14 @@
<div class="row justify-content-start ">
{% for product in products %}
<!-- Single Product -->
<div class="col-4 col-sm-12 col-md-2 col-lg-2">
<div class="col-6 col-sm-6 col-md-2 col-lg-2">
<div class="single-product-area mb-30">
<a href="{{ 'product'|page({id: product.id}) }}">
<div class="product_image">
<!-- Product Image -->
<img class="normal_img" src="{{ product.images[0].thumb(680,700,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, 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 platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
<img class="hover_img" src="{{ product.images[1].thumb(680,700,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
{% endif %}
{% if product.type_title %}
@ -102,7 +102,12 @@
<div class="product_wishlist">
{% if user %}
<a href="{{ 'wishlist'|page }}"><i class="icofont-heart"></i></a>
<a
data-request="onCreateFav"
data-request-flash
data-request-validate
data-request-data="product_id: {{ product.id }}"
href="#"><i class="icofont-heart"></i></a>
{% else %}
<a href="{{ 'login'|page }}"><i class="icofont-heart"></i></a>
{% endif %}

View File

@ -49,15 +49,17 @@
<div class="shop_grid_product_area">
<div class="row justify-content-start ">
{% for product in products %}
<!-- Single Product -->
<div class="col-4 col-sm-12 col-md-2 col-lg-2">
<!-- Single Product col-4 col-sm-12 col-md-4 col-lg-4 -->
<div class="col-6 col-xs-6 col-sm-6 col-md-4 col-lg-4">
<div class="single-product-area mb-30">
<a href="{{ 'product'|page({id: product.id}) }}">
<a href="{{ 'haryt2'|page({id: product.id}) }}">
<div class="product_image">
<!-- Product Image -->
<img class="normal_img" src="{{ product.images[0].thumb(680,700,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, 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 platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
<img class="hover_img" src="{{ product.images[1].thumb(680,700,{'mode':'crop'}) }}" alt="Gurluşyk, Gurluşyk platform, bezeg gurluşyk, gipsler merkezi, {{ product.name }}">
{% endif %}
{% if product.type_title %}
@ -68,7 +70,12 @@
<div class="product_wishlist">
{% if user %}
<a href="{{ 'wishlist'|page }}"><i class="icofont-heart"></i></a>
<a
data-request="onCreateFav"
data-request-flash
data-request-validate
data-request-data="product_id: {{ product.id }}"
href="#"><i class="icofont-heart"></i></a>
{% else %}
<a href="{{ 'login'|page }}"><i class="icofont-heart"></i></a>
{% endif %}
@ -93,9 +100,24 @@
<div class="product_quick_view">
<a href="#" data-toggle="modal" data-target="#quickview{{product.id}}"><i class="icofont-eye-alt" style="font-size: 19px;"></i></a>
</div>
<!-- <div style="display: flex;justify-content: space-between;align-items: flex-end;margin-top: 10px;">
<a href="{{ 'product'|page({id: product.id}) }}" style="font-size: 18px;">{{ product.name }} </a>
<i class="icofont-angle-double-right" style="font-size: 30px;">
<svg width="45" height="auto" viewBox="0 0 1000 1000" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M208.9 100L204.9 100.2C190 101.5 176.9 110.6 170.6 124.1C164.9 136.3 165.5 150.4 171.9 162L174.2 165.8L412.1 504.1C416.7 510.7 417.3 519.2 413.8 526.3L412.1 529.2L174.2 867.6C165.3 880.4 164.2 897 171.4 910.9C178.6 924.7 192.9 933.3 208.5 933.3C220.8 933.4 232.4 928 240.2 918.7L242.7 915.5L506.2 540.6C515.4 527.4 516.2 510.3 508.5 496.4L506.2 492.7L242.7 117.9C234.9 106.7 222.3 100.1 208.9 100Z" fill="black"/>
<path opacity="0.4" d="M812.6 492.7L549.1 117.9C535.9 98.9 509.801 94.3 490.901 107.5C473.101 120 467.901 143.8 478.401 162.3L480.601 165.8L718.401 504.1C723.101 510.7 723.601 519.2 720.201 526.3L718.401 529.2L480.601 867.6C471.601 880.4 470.6 897 477.8 910.9C485 924.7 499.3 933.3 514.8 933.3C527.1 933.4 538.7 928 546.6 918.7L549.1 915.5L812.6 540.6C821.8 527.4 822.601 510.3 814.901 496.4L812.6 492.7Z" fill="black"/>
</svg>
</i>
</div> -->
<p class="brand_name"></p>
<a href="{{ 'product'|page({id: product.id}) }}">{{ product.name }}</a>
<h6 class="product-price">{{ product.price }} TMT</h6>
</div>
</div>
</div>
@ -128,6 +150,11 @@
</nav>
</div>
{% endif %}
<div style="margin-top: 70px;">
{{userProfile.description|raw}}
</div>
</div>
</div>
</div>