deploy
This commit is contained in:
parent
0c120b70c5
commit
012038b26a
File diff suppressed because one or more lines are too long
|
|
@ -8,6 +8,7 @@ use October\Rain\Network\Http;
|
||||||
use Redirect;
|
use Redirect;
|
||||||
use Flash;
|
use Flash;
|
||||||
use Session as SessionP;
|
use Session as SessionP;
|
||||||
|
use RainLab\Translate\Models\Message;
|
||||||
|
|
||||||
class Session extends ComponentBase
|
class Session extends ComponentBase
|
||||||
{
|
{
|
||||||
|
|
@ -26,12 +27,14 @@ class Session extends ComponentBase
|
||||||
$data = post();
|
$data = post();
|
||||||
// dd($data);
|
// dd($data);
|
||||||
// return $data ?? 'asdasd';
|
// return $data ?? 'asdasd';
|
||||||
|
// setAttributeTranslated('name', 'Jean-Claude', 'fr');
|
||||||
|
$success_msg = "logged.in.success";
|
||||||
|
|
||||||
SessionP::put('nurgulToken', $data['token']);
|
SessionP::put('nurgulToken', $data['token']);
|
||||||
SessionP::put('name', $data['name']);
|
SessionP::put('name', $data['name']);
|
||||||
SessionP::put('phone', $data['phone']);
|
SessionP::put('phone', $data['phone']);
|
||||||
|
|
||||||
Flash::success("Ustunlikli Icher Girdiniz");
|
Flash::success(Message::trans($success_msg));
|
||||||
return Redirect::to('/');
|
return Redirect::to('/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -44,10 +47,10 @@ class Session extends ComponentBase
|
||||||
|
|
||||||
$getToken = SessionP::get('nurgulToken');
|
$getToken = SessionP::get('nurgulToken');
|
||||||
if ($getToken == "") {
|
if ($getToken == "") {
|
||||||
Flash::success("Ustunlikli Shahsy Otagynyzdan Chykdynyz.");
|
Flash::success(Message::trans('logout.success'));
|
||||||
return Redirect::to('/');
|
return Redirect::to('/');
|
||||||
} else {
|
} else {
|
||||||
return Flash::error('Ýalňyşlyk Ýüze Çykdy!!!');
|
return Flash::error('error');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -74,10 +77,10 @@ class Session extends ComponentBase
|
||||||
$dataqq = json_decode($response);
|
$dataqq = json_decode($response);
|
||||||
|
|
||||||
if (!empty($dataqq)) {
|
if (!empty($dataqq)) {
|
||||||
Flash::success("Üstünlikli Sebede Goşuldy");
|
Flash::success(Message::trans('success.add.to.cart'));
|
||||||
return redirect()->refresh();
|
return redirect()->refresh();
|
||||||
} elseif (empty($dataqq)) {
|
} elseif (empty($dataqq)) {
|
||||||
Flash::error('Ýalňyşlyk Ýüze Çykdy!!!');
|
Flash::error(Message::trans('error'));
|
||||||
return redirect()->refresh();
|
return redirect()->refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -124,7 +127,7 @@ class Session extends ComponentBase
|
||||||
$dataqq = json_decode($response);
|
$dataqq = json_decode($response);
|
||||||
|
|
||||||
if (!empty($dataqq)) {
|
if (!empty($dataqq)) {
|
||||||
Flash::success("Üstünlikli Sebede Goşuldy");
|
Flash::success(Message::trans('remove.item.success.in.cart'));
|
||||||
return redirect()->refresh();
|
return redirect()->refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -166,10 +169,10 @@ class Session extends ComponentBase
|
||||||
$dataqq = json_decode($response);
|
$dataqq = json_decode($response);
|
||||||
|
|
||||||
if (!empty($dataqq)) {
|
if (!empty($dataqq)) {
|
||||||
Flash::success("Üstünlikli Salgy Goşuldy");
|
Flash::success(Message::trans('success.add.addr'));
|
||||||
return redirect()->refresh();
|
return redirect()->refresh();
|
||||||
} elseif (empty($dataqq)) {
|
} elseif (empty($dataqq)) {
|
||||||
Flash::error('Ýalňyşlyk Ýüze Çykdy!!!');
|
Flash::error(Message::trans('error'));
|
||||||
return redirect()->refresh();
|
return redirect()->refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -244,10 +247,10 @@ class Session extends ComponentBase
|
||||||
$dataqq = json_decode($response);
|
$dataqq = json_decode($response);
|
||||||
|
|
||||||
if (!empty($dataqq)) {
|
if (!empty($dataqq)) {
|
||||||
Flash::success("Sargydyňyz Üstünlikli Amala Aşyryldy");
|
Flash::success(Message::trans('success.make.order'));
|
||||||
return Redirect::to('/');
|
return Redirect::to('/');
|
||||||
} elseif (empty($dataqq)) {
|
} elseif (empty($dataqq)) {
|
||||||
Flash::error('Ýalňyşlyk Ýüze Çykdy!!!');
|
Flash::error(Message::trans('error'));
|
||||||
return redirect()->refresh();
|
return redirect()->refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -270,10 +273,10 @@ class Session extends ComponentBase
|
||||||
$dataqq = json_decode($response);
|
$dataqq = json_decode($response);
|
||||||
|
|
||||||
if (!empty($dataqq)) {
|
if (!empty($dataqq)) {
|
||||||
Flash::success("Halanlaryma Üstünlikli Goşuldy");
|
Flash::success(Message::trans('success.add.wishlist'));
|
||||||
return Redirect::to('/wishlist');
|
return Redirect::to('/wishlist');
|
||||||
} elseif (empty($dataqq)) {
|
} elseif (empty($dataqq)) {
|
||||||
Flash::error('Ýalňyşlyk Ýüze Çykdy!!!');
|
Flash::error(Message::trans('error'));
|
||||||
return redirect()->refresh();
|
return redirect()->refresh();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,9 +8,15 @@ use Model;
|
||||||
class Slider extends Model
|
class Slider extends Model
|
||||||
{
|
{
|
||||||
use \October\Rain\Database\Traits\Validation;
|
use \October\Rain\Database\Traits\Validation;
|
||||||
|
|
||||||
use \October\Rain\Database\Traits\SoftDelete;
|
use \October\Rain\Database\Traits\SoftDelete;
|
||||||
|
|
||||||
|
public $implement = [
|
||||||
|
\RainLab\Translate\Behaviors\TranslatableModel::class
|
||||||
|
];
|
||||||
|
|
||||||
|
public $translatable = ['header', 'header2', 'txt', 'btn_txt'];
|
||||||
|
|
||||||
protected $dates = ['deleted_at'];
|
protected $dates = ['deleted_at'];
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ plugin:
|
||||||
homepage: ''
|
homepage: ''
|
||||||
navigation:
|
navigation:
|
||||||
main-menu-item:
|
main-menu-item:
|
||||||
label: 'Slider (Nurgul)'
|
label: NURGUL
|
||||||
url: romanah/bagisto/slider
|
url: romanah/bagisto/slider
|
||||||
icon: icon-image
|
icon: icon-image
|
||||||
sideMenu:
|
sideMenu:
|
||||||
|
|
@ -14,3 +14,7 @@ navigation:
|
||||||
label: Brendlar
|
label: Brendlar
|
||||||
url: romanah/bagisto/brand
|
url: romanah/bagisto/brand
|
||||||
icon: icon-slack
|
icon: icon-slack
|
||||||
|
side-menu-item2:
|
||||||
|
label: Slider
|
||||||
|
url: romanah/bagisto/slider
|
||||||
|
icon: icon-sliders
|
||||||
|
|
|
||||||
|
|
@ -1,91 +0,0 @@
|
||||||
[staticMenu]
|
|
||||||
code = "top-menu"
|
|
||||||
|
|
||||||
[session]
|
|
||||||
==
|
|
||||||
<?php
|
|
||||||
function onStart(){
|
|
||||||
|
|
||||||
$this['nurgulToken'] = Session::get('nurgulToken');
|
|
||||||
$this['user_name'] = Session::get('name');
|
|
||||||
$this['user_phone'] = Session::get('phone');
|
|
||||||
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
==
|
|
||||||
<!doctype html>
|
|
||||||
<html class="no-js" lang="zxx">
|
|
||||||
|
|
||||||
<head>
|
|
||||||
<meta charset="utf-8">
|
|
||||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
|
||||||
<title>{{this.page.title}}</title>
|
|
||||||
<meta name="robots" content="noindex, follow" />
|
|
||||||
<meta name="description" content="">
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
||||||
|
|
||||||
<!-- Place favicon.png in the root directory -->
|
|
||||||
<link rel="shortcut icon" href="{{'assets/img/favicon.png'|theme}}" type="image/x-icon" />
|
|
||||||
<!-- Font Icons css -->
|
|
||||||
<link rel="stylesheet" href="{{'assets/css/font-icons.css'|theme}}">
|
|
||||||
<!-- plugins css -->
|
|
||||||
<link rel="stylesheet" href="{{'assets/css/plugins.css'|theme}}">
|
|
||||||
<!-- Main Stylesheet -->
|
|
||||||
<link rel="stylesheet" href="{{'assets/css/style.css'|theme}}">
|
|
||||||
<!-- Responsive css -->
|
|
||||||
<link rel="stylesheet" href="{{'assets/css/responsive.css'|theme}}">
|
|
||||||
|
|
||||||
{% styles %}
|
|
||||||
</head>
|
|
||||||
|
|
||||||
<body>
|
|
||||||
{% flash %}
|
|
||||||
<p data-control="flash-message" class="flash-message fade {{ type }}" data-interval="5">
|
|
||||||
{{ message }}
|
|
||||||
</p>
|
|
||||||
{% endflash %}
|
|
||||||
<!-- Body main wrapper start -->
|
|
||||||
<div class="body-wrapper">
|
|
||||||
|
|
||||||
{% partial 'header' %}
|
|
||||||
|
|
||||||
{% partial 'cart' %}
|
|
||||||
|
|
||||||
{% partial 'mobile-menu' %}
|
|
||||||
|
|
||||||
{% partial 'overlay' %}
|
|
||||||
|
|
||||||
{% page %}
|
|
||||||
|
|
||||||
{% partial 'footer' %}
|
|
||||||
|
|
||||||
{% partial 'modals' %}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<!-- Body main wrapper end -->
|
|
||||||
|
|
||||||
<!-- preloader area start -->
|
|
||||||
<div class="preloader d-none" id="preloader">
|
|
||||||
<div class="preloader-inner">
|
|
||||||
<div class="spinner">
|
|
||||||
<div class="dot1"></div>
|
|
||||||
<div class="dot2"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<!-- preloader area end -->
|
|
||||||
|
|
||||||
<!-- All JS Plugins -->
|
|
||||||
<script src="{{'assets/jquery.js'|theme}}"></script>
|
|
||||||
<script src="{{'assets/js/plugins.js'|theme}}"></script>
|
|
||||||
<!-- Main JS -->
|
|
||||||
<script src="{{'assets/js/main.js'|theme}}"></script>
|
|
||||||
|
|
||||||
|
|
||||||
{% framework extras %}
|
|
||||||
|
|
||||||
{% scripts %}
|
|
||||||
|
|
||||||
</body>
|
|
||||||
|
|
||||||
</html>
|
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
code = "top-menu"
|
code = "top-menu"
|
||||||
|
|
||||||
[session]
|
[session]
|
||||||
|
|
||||||
|
[localePicker]
|
||||||
|
forceUrl = 1
|
||||||
==
|
==
|
||||||
<?php
|
<?php
|
||||||
function onStart(){
|
function onStart(){
|
||||||
|
|
@ -14,18 +17,18 @@ function onStart(){
|
||||||
?>
|
?>
|
||||||
==
|
==
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html class="no-js" lang="zxx">
|
<html class="no-js" lang="{{activeLocale}}">
|
||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||||
<title>{{this.page.title}}</title>
|
<title>Nurgul - {{this.page.title}}</title>
|
||||||
<meta name="robots" content="noindex, follow" />
|
<meta name="robots" content="noindex, follow" />
|
||||||
<meta name="description" content="">
|
<meta name="description" content="">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||||
|
|
||||||
<!-- Place favicon.png in the root directory -->
|
<!-- Place favicon.png in the root directory -->
|
||||||
<link rel="shortcut icon" href="{{'assets/img/favicon.png'|theme}}" type="image/x-icon" />
|
<link rel="shortcut icon" href="https://nurgul.com.tm/app/vendor/webkul/ui/assets/images/favicon.ico" type="image/x-icon" />
|
||||||
<!-- Font Icons css -->
|
<!-- Font Icons css -->
|
||||||
<link rel="stylesheet" href="{{'assets/css/font-icons.css'|theme}}">
|
<link rel="stylesheet" href="{{'assets/css/font-icons.css'|theme}}">
|
||||||
<!-- plugins css -->
|
<!-- plugins css -->
|
||||||
|
|
@ -89,4 +92,4 @@ function onStart(){
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
||||||
|
|
@ -36,9 +36,13 @@ items:
|
||||||
items:
|
items:
|
||||||
-
|
-
|
||||||
title: 'Gelinlik Güller'
|
title: 'Gelinlik Güller'
|
||||||
|
nesting: null
|
||||||
type: url
|
type: url
|
||||||
url: /category/2
|
url: /category/2
|
||||||
code: ''
|
code: ''
|
||||||
|
reference: null
|
||||||
|
cmsPage: null
|
||||||
|
replace: null
|
||||||
viewBag:
|
viewBag:
|
||||||
locale:
|
locale:
|
||||||
ru:
|
ru:
|
||||||
|
|
@ -49,9 +53,13 @@ items:
|
||||||
isExternal: '0'
|
isExternal: '0'
|
||||||
-
|
-
|
||||||
title: 'Sowgatlyk Güller'
|
title: 'Sowgatlyk Güller'
|
||||||
|
nesting: null
|
||||||
type: url
|
type: url
|
||||||
url: /category/3
|
url: /category/3
|
||||||
code: ''
|
code: ''
|
||||||
|
reference: null
|
||||||
|
cmsPage: null
|
||||||
|
replace: null
|
||||||
viewBag:
|
viewBag:
|
||||||
locale:
|
locale:
|
||||||
ru:
|
ru:
|
||||||
|
|
@ -62,9 +70,13 @@ items:
|
||||||
isExternal: '0'
|
isExternal: '0'
|
||||||
-
|
-
|
||||||
title: 'Sebetli güller'
|
title: 'Sebetli güller'
|
||||||
|
nesting: null
|
||||||
type: url
|
type: url
|
||||||
url: /category/4
|
url: /category/4
|
||||||
code: ''
|
code: ''
|
||||||
|
reference: null
|
||||||
|
cmsPage: null
|
||||||
|
replace: null
|
||||||
viewBag:
|
viewBag:
|
||||||
locale:
|
locale:
|
||||||
ru:
|
ru:
|
||||||
|
|
@ -75,9 +87,13 @@ items:
|
||||||
isExternal: '0'
|
isExternal: '0'
|
||||||
-
|
-
|
||||||
title: 'Bedreli güller'
|
title: 'Bedreli güller'
|
||||||
|
nesting: null
|
||||||
type: url
|
type: url
|
||||||
url: /category/5
|
url: /category/5
|
||||||
code: ''
|
code: ''
|
||||||
|
reference: null
|
||||||
|
cmsPage: null
|
||||||
|
replace: null
|
||||||
viewBag:
|
viewBag:
|
||||||
locale:
|
locale:
|
||||||
ru:
|
ru:
|
||||||
|
|
@ -88,9 +104,13 @@ items:
|
||||||
isExternal: '0'
|
isExternal: '0'
|
||||||
-
|
-
|
||||||
title: 'Buket güller'
|
title: 'Buket güller'
|
||||||
|
nesting: null
|
||||||
type: url
|
type: url
|
||||||
url: /category/6
|
url: /category/6
|
||||||
code: ''
|
code: ''
|
||||||
|
reference: null
|
||||||
|
cmsPage: null
|
||||||
|
replace: null
|
||||||
viewBag:
|
viewBag:
|
||||||
locale:
|
locale:
|
||||||
ru:
|
ru:
|
||||||
|
|
@ -99,6 +119,19 @@ items:
|
||||||
isHidden: '0'
|
isHidden: '0'
|
||||||
cssClass: ''
|
cssClass: ''
|
||||||
isExternal: '0'
|
isExternal: '0'
|
||||||
|
-
|
||||||
|
title: Brendlar
|
||||||
|
type: cms-page
|
||||||
|
code: ''
|
||||||
|
reference: brands
|
||||||
|
viewBag:
|
||||||
|
locale:
|
||||||
|
ru:
|
||||||
|
title: ''
|
||||||
|
url: ''
|
||||||
|
isHidden: '0'
|
||||||
|
cssClass: ''
|
||||||
|
isExternal: '0'
|
||||||
-
|
-
|
||||||
title: 'Biz Barada'
|
title: 'Biz Barada'
|
||||||
nesting: null
|
nesting: null
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
url = "/about-us"
|
url = "/about-us"
|
||||||
layout = "main"
|
layout = "mainN"
|
||||||
title = "About Us"
|
title = "About Us"
|
||||||
==
|
==
|
||||||
{%partial "bread" title='about.title'|_ %}
|
{%partial "bread" title='about.title'|_ %}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,88 @@
|
||||||
|
url = "/brand/:brand/:id"
|
||||||
|
layout = "mainN"
|
||||||
|
title = "Brand Detail"
|
||||||
|
==
|
||||||
|
<?php
|
||||||
|
function onStart(){
|
||||||
|
$this['brandName'] = $this->param('brand');
|
||||||
|
$this['brandId'] = $this->param('id');
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
==
|
||||||
|
{% partial 'loader/loader' id='loader_brand' %}
|
||||||
|
|
||||||
|
<div id="detail_screen">
|
||||||
|
<!-- BREADCRUMB AREA START -->
|
||||||
|
<div class="ltn__breadcrumb-area ltn__breadcrumb-area-4 ltn__breadcrumb-color-white---">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="ltn__breadcrumb-inner text-center">
|
||||||
|
<h1 class="ltn__page-title" id="category_name_main">{{brandName}}</h1>
|
||||||
|
<div class="ltn__breadcrumb-list">
|
||||||
|
<ul>
|
||||||
|
<li><a href="/">{{'home.title'|_}}</a></li>
|
||||||
|
<li id="brand_name">{{brandName}}</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- BREADCRUMB AREA END -->
|
||||||
|
|
||||||
|
<div class="ltn__product-area mb-100">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<div class="ltn__shop-options">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<div class="showing-product-number text-right" id="show_title">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<!-- <div class="short-by text-center">
|
||||||
|
<select class="nice-select">
|
||||||
|
<option>Default sorting</option>
|
||||||
|
<option>Sort by popularity</option>
|
||||||
|
<option>Sort by new arrivals</option>
|
||||||
|
<option>Sort by price: low to high</option>
|
||||||
|
<option>Sort by price: high to low</option>
|
||||||
|
</select>
|
||||||
|
</div> -->
|
||||||
|
<div class="ltn__grid-list-tab-menu ">
|
||||||
|
<div class="nav">
|
||||||
|
<a class="active show" data-bs-toggle="tab"
|
||||||
|
href="#liton_product_grid"><i class="icon-grid"></i></a>
|
||||||
|
<a data-bs-toggle="tab" href="#liton_product_list"><i
|
||||||
|
class="icon-menu"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="tab-content">
|
||||||
|
<div class="tab-pane fade active show" id="liton_product_grid">
|
||||||
|
<div class="ltn__product-tab-content-inner ltn__product-grid-view">
|
||||||
|
<div class="row" id="products_brand">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% partial 'product/tab-pane' id='brand' %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% partial 'helper/pagination' %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- PRODUCT DETAILS AREA END -->
|
||||||
|
|
||||||
|
{% partial 'scripts/getByBrand' add='add.cart'|_ query='locale=' limit='8' id='brand' brandId=brandId %}
|
||||||
|
|
@ -0,0 +1,55 @@
|
||||||
|
url = "/brands"
|
||||||
|
layout = "mainN"
|
||||||
|
title = "Brands"
|
||||||
|
==
|
||||||
|
{%partial "bread" title='brands.title'|_ %}
|
||||||
|
|
||||||
|
{% partial 'loader/loader' id='loader_brand' %}
|
||||||
|
|
||||||
|
<div id="detail_screen">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row" id="brand_inside">
|
||||||
|
<!-- Blog Item -->
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% put scripts %}
|
||||||
|
<script>
|
||||||
|
$.ajax({
|
||||||
|
url: `https://nurgul.com.tm/app/api/attribute-options?locale={{activeLocale}}`,
|
||||||
|
type: 'GET',
|
||||||
|
dataType: 'json',
|
||||||
|
beforeSend: function () {
|
||||||
|
$('#detail_screen').hide();
|
||||||
|
$('#loader_brand').show();
|
||||||
|
},
|
||||||
|
success: function (data, textStatus, xhr) {
|
||||||
|
$('#detail_screen').show();
|
||||||
|
$('#loader_brand').hide();
|
||||||
|
|
||||||
|
var brands = data.data
|
||||||
|
for (var brand of brands) {
|
||||||
|
// console.log(product.name);
|
||||||
|
$('#brand_inside').append(`
|
||||||
|
<div class="col-lg-3 col-sm-6">
|
||||||
|
<div class="ltn__blog-item">
|
||||||
|
<div class="ltn__blog-img">
|
||||||
|
<a href="/brand/`+ brand.label +`/`+ brand.id + `"><img src="` + brand.image + `" alt="` + brand.label + `" style="width: 100%;"></a>
|
||||||
|
</div>
|
||||||
|
<div class="ltn__blog-brief">
|
||||||
|
<h3 class="ltn__blog-title blog-title-line"><a href="/brand/`+ brand.label +`/`+ brand.id + `">` + brand.label + `</a></h3>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
error: function (xhr, textStatus, errorThrown) {
|
||||||
|
console.log('Error in Operation');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
{% endput %}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
title = "Category"
|
|
||||||
url = "/category/:id"
|
url = "/category/:id"
|
||||||
layout = "main"
|
layout = "mainN"
|
||||||
|
title = "Category"
|
||||||
==
|
==
|
||||||
<?php
|
<?php
|
||||||
function onStart(){
|
function onStart(){
|
||||||
|
|
@ -84,4 +84,4 @@ function onStart(){
|
||||||
</div>
|
</div>
|
||||||
<!-- PRODUCT DETAILS AREA END -->
|
<!-- PRODUCT DETAILS AREA END -->
|
||||||
|
|
||||||
{% partial 'scripts/getByCat' add='add.cart'|_ query='locale=tm' limit='8' id='cat' catId=catId %}
|
{% partial 'scripts/getByCat' add='add.cart'|_ query='locale=' limit='8' id='cat' catId=catId %}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
title = "Checkout"
|
|
||||||
url = "/checkout"
|
url = "/checkout"
|
||||||
layout = "mainN"
|
layout = "mainN"
|
||||||
|
title = "Checkout"
|
||||||
==
|
==
|
||||||
{%partial "bread" title='checkout.title'|_ %}
|
{%partial "bread" title='checkout.title'|_ %}
|
||||||
<div class="ltn__checkout-area mb-100">
|
<div class="ltn__checkout-area mb-100">
|
||||||
|
|
@ -176,4 +176,4 @@ layout = "mainN"
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{% endput %}
|
{% endput %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
@ -1,38 +1,62 @@
|
||||||
url = "/contact-us"
|
url = "/contact-us"
|
||||||
layout = "main"
|
layout = "mainN"
|
||||||
title = "Contact Us"
|
title = "Contact Us"
|
||||||
|
|
||||||
|
[genericForm]
|
||||||
|
group = "Nurgul Contact Us"
|
||||||
|
messages_success = "Your form was successfully submitted"
|
||||||
|
messages_errors = "There were errors with your submission"
|
||||||
|
mail_enabled = 1
|
||||||
|
mail_subject = "Contact Us NURGUL"
|
||||||
|
mail_bcc[] = "shokki.a96@gmail.com"
|
||||||
|
mail_bcc[] = "isaanna98@gmail.com"
|
||||||
|
inline_errors = "disabled"
|
||||||
|
sanitize_data = "disabled"
|
||||||
|
anonymize_ip = "disabled"
|
||||||
|
recaptcha_theme = "light"
|
||||||
|
recaptcha_type = "image"
|
||||||
|
recaptcha_size = "normal"
|
||||||
|
emails_date_format = "Y-m-d"
|
||||||
==
|
==
|
||||||
{%partial "bread" title='contact.title'|_ %}
|
{%partial "bread" title='contact.title'|_ %}
|
||||||
|
|
||||||
{% partial 'contact/content' %}
|
{% partial 'contact/content' %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<!-- CONTACT MESSAGE AREA START -->
|
<!-- CONTACT MESSAGE AREA START -->
|
||||||
<div class="ltn__contact-message-area mt-100 mb-80">
|
<div class="ltn__contact-message-area mt-100 mb-80">
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<div class="ltn__form-box contact-form-box box-shadow--- white-bg---">
|
<div class="ltn__form-box contact-form-box box-shadow--- white-bg---">
|
||||||
<h3 class="text-center mb-50">Need Our Help! Please Send an Email.</h3>
|
<h3 class="text-center mb-50">{{'contact.header.txt'|_}}</h3>
|
||||||
<form id="contact-form" action="mail.php" method="post">
|
<form data-request="{{ genericForm }}::onFormSubmit" id="contact-form">
|
||||||
|
|
||||||
|
{{ form_token() }}
|
||||||
|
|
||||||
|
<div id="{{ genericForm }}_forms_flash"></div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<input type="text" name="name" placeholder="Name:">
|
<input type="text" name="name" placeholder="{{'form.name'|_}}:">
|
||||||
<input type="email" name="email" placeholder="Email:">
|
<input type="email" name="email" placeholder="Email:">
|
||||||
<input type="text" name="phone" placeholder="Phone Number:">
|
<input type="text" name="phone" placeholder="{{'form.phone'|_}}:">
|
||||||
<input type="text" name="subject" placeholder="Your Title:">
|
<input type="text" name="subject" placeholder="{{'form.subject'|_}}:">
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-7">
|
<div class="col-md-7">
|
||||||
<textarea name="message" placeholder="Enter message"></textarea>
|
<textarea name="message" placeholder="{{'form.enter.message'|_}}"></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-lg-12">
|
<div class="col-lg-12">
|
||||||
<div class="btn-wrapper mt-0">
|
<div class="btn-wrapper mt-0">
|
||||||
<button class="btn theme-btn-1 btn-effect-1 text-uppercase" type="submit">Send
|
<button class="btn theme-btn-1 btn-effect-1 text-uppercase" type="submit">{{'contact.send.msg'|_}}</button>
|
||||||
Message</button>
|
|
||||||
</div>
|
</div>
|
||||||
<p class="form-messege mb-0 mt-20"></p>
|
<p class="form-messege mb-0 mt-20"></p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -41,4 +65,4 @@ title = "Contact Us"
|
||||||
</div>
|
</div>
|
||||||
<!-- CONTACT MESSAGE AREA END -->
|
<!-- CONTACT MESSAGE AREA END -->
|
||||||
|
|
||||||
{% partial 'home/brand' %}
|
{% partial 'home/brand' %}
|
||||||
|
|
@ -1,8 +1,6 @@
|
||||||
url = "/"
|
url = "/"
|
||||||
layout = "mainN"
|
layout = "mainN"
|
||||||
title = "Home"
|
title = "Home"
|
||||||
|
|
||||||
[products]
|
|
||||||
==
|
==
|
||||||
{% partial 'home/slider' %}
|
{% partial 'home/slider' %}
|
||||||
|
|
||||||
|
|
@ -34,4 +32,4 @@ title = "Home"
|
||||||
<!-- BANNER AREA END -->
|
<!-- BANNER AREA END -->
|
||||||
|
|
||||||
|
|
||||||
{% partial 'home/brand' %}
|
{% partial 'home/brand' %}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
url = "/login"
|
url = "/login"
|
||||||
layout = "main"
|
layout = "mainN"
|
||||||
title = "Login"
|
title = "Login"
|
||||||
==
|
==
|
||||||
{%partial "bread" title='login.title'|_ %}
|
{%partial "bread" title='login.title'|_ %}
|
||||||
|
|
@ -65,4 +65,4 @@ title = "Login"
|
||||||
};
|
};
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
{% endput %}
|
{% endput %}
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
title = "Privacy"
|
|
||||||
url = "/privacy"
|
url = "/privacy"
|
||||||
layout = "main"
|
layout = "mainN"
|
||||||
|
title = "Privacy"
|
||||||
==
|
==
|
||||||
<div class="container privacy_policy whitespace-pre-line">
|
<div class="container privacy_policy whitespace-pre-line">
|
||||||
<p style="text-align: center;"><strong><u>Ulanyş Düzgünleriniň we Gizlinligiň </u></strong></p>
|
<p style="text-align: center;"><strong><u>Ulanyş Düzgünleriniň we Gizlinligiň </u></strong></p>
|
||||||
|
|
@ -70,4 +70,4 @@ layout = "main"
|
||||||
18:00 sagatlar arasynda hyzmat berýär.)</p>
|
18:00 sagatlar arasynda hyzmat berýär.)</p>
|
||||||
|
|
||||||
<p>Ýokarda ýazylan şertleri okadym, düşündim, kanuna we hukuklaryma laýyklykda hereket etjekdigime borçlanýaryn.</p>
|
<p>Ýokarda ýazylan şertleri okadym, düşündim, kanuna we hukuklaryma laýyklykda hereket etjekdigime borçlanýaryn.</p>
|
||||||
</div>...
|
</div>...
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
url = "/product/detail/:id"
|
url = "/product/detail/:id"
|
||||||
layout = "main"
|
layout = "mainN"
|
||||||
title = "Product/detail"
|
title = "Product/detail"
|
||||||
==
|
==
|
||||||
<?php
|
<?php
|
||||||
|
|
@ -147,4 +147,4 @@ function onStart(){
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{% partial 'scripts/productDetail' add='add.cart'|_ query= '?locale=tm' prodId=prodId %}
|
{% partial 'scripts/productDetail' add='add.cart'|_ query= '?locale=' prodId=prodId %}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
url = "/register"
|
url = "/register"
|
||||||
layout = "main"
|
layout = "mainN"
|
||||||
title = "Register"
|
title = "Register"
|
||||||
==
|
==
|
||||||
{%partial "bread" title='register.title'|_ %}
|
{%partial "bread" title='register.title'|_ %}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,70 @@
|
||||||
|
url = "/search"
|
||||||
|
layout = "mainN"
|
||||||
|
title = "Search"
|
||||||
|
==
|
||||||
|
<?php
|
||||||
|
function onStart(){
|
||||||
|
$this["keyword"] = post("keyword");
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
==
|
||||||
|
{% partial 'loader/loader' id='loader_search' %}
|
||||||
|
|
||||||
|
<div id="detail_screen">
|
||||||
|
|
||||||
|
{%partial "bread" title='search.result'|_ %}
|
||||||
|
<div class="ltn__product-area mb-100">
|
||||||
|
<div class="container">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-lg-12">
|
||||||
|
<h3 style="display: flex;">{{'search.keyword'|_}} <div style="color: #cc1155;"> {{keyword}} </div></h3>
|
||||||
|
<div class="ltn__shop-options">
|
||||||
|
<ul>
|
||||||
|
<li>
|
||||||
|
<div class="showing-product-number text-right" id="show_title">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<!-- <div class="short-by text-center">
|
||||||
|
<select class="nice-select">
|
||||||
|
<option>Default sorting</option>
|
||||||
|
<option>Sort by popularity</option>
|
||||||
|
<option>Sort by new arrivals</option>
|
||||||
|
<option>Sort by price: low to high</option>
|
||||||
|
<option>Sort by price: high to low</option>
|
||||||
|
</select>
|
||||||
|
</div> -->
|
||||||
|
<div class="ltn__grid-list-tab-menu ">
|
||||||
|
<div class="nav">
|
||||||
|
<a class="active show" data-bs-toggle="tab"
|
||||||
|
href="#liton_product_grid"><i class="icon-grid"></i></a>
|
||||||
|
<a data-bs-toggle="tab" href="#liton_product_list"><i
|
||||||
|
class="icon-menu"></i></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="tab-content">
|
||||||
|
<div class="tab-pane fade active show" id="liton_product_grid">
|
||||||
|
<div class="ltn__product-tab-content-inner ltn__product-grid-view">
|
||||||
|
<div class="row" id="products_search">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% partial 'product/tab-pane' id='search' %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% partial 'helper/pagination' %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- PRODUCT DETAILS AREA END -->
|
||||||
|
|
||||||
|
{% partial 'scripts/search' add='add.cart'|_ query='locale=tm' limit='8' id='search' key=keyword %}
|
||||||
|
|
@ -1,8 +1,7 @@
|
||||||
title = "wishlist"
|
|
||||||
url = "/wishlist"
|
url = "/wishlist"
|
||||||
layout = "mainN"
|
layout = "mainN"
|
||||||
|
title = "wishlist"
|
||||||
==
|
==
|
||||||
|
|
||||||
{%partial "bread" title='wishlist.title'|_ %}
|
{%partial "bread" title='wishlist.title'|_ %}
|
||||||
|
|
||||||
{% partial 'loader/loader' id='loader_wish' %}
|
{% partial 'loader/loader' id='loader_wish' %}
|
||||||
|
|
@ -58,4 +57,4 @@ layout = "mainN"
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% partial 'scripts/getWishlist' add='add.cart'|_ id='wish' %}
|
{% partial 'scripts/getWishlist' add='add.cart'|_ id='wish' %}
|
||||||
|
|
@ -36,10 +36,10 @@
|
||||||
<i class="icon-speedometer"></i>
|
<i class="icon-speedometer"></i>
|
||||||
</div>
|
</div>
|
||||||
<h3>{{'contact.open.title'|_}}</h3>
|
<h3>{{'contact.open.title'|_}}</h3>
|
||||||
<p>Müşderi Hyzmatlary, hepdäniň 7 güni 09:00 - 18:00 sagatlar arasynda hyzmat berýär.</p>
|
<p>{{'contact.open.desc'|_}}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- CONTACT ADDRESS AREA END -->
|
<!-- CONTACT ADDRESS AREA END -->
|
||||||
|
|
@ -23,8 +23,8 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- header-search-2 -->
|
<!-- header-search-2 -->
|
||||||
<div class="header-search-2">
|
<div class="header-search-2">
|
||||||
<form id="#123" method="get" action="#">
|
<form id="#searchForm" method="post" action="/search">
|
||||||
<input type="text" name="search" value="" placeholder="{{'search'|_}}..." />
|
<input type="text" name="keyword" value="" placeholder="{{'search'|_}}..." />
|
||||||
<button type="submit">
|
<button type="submit">
|
||||||
<span><i class="icon-magnifier"></i></span>
|
<span><i class="icon-magnifier"></i></span>
|
||||||
</button>
|
</button>
|
||||||
|
|
@ -139,7 +139,17 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
<li class="menu-icon">
|
||||||
|
<a href="#" style="color: #cc1155;text-transform:uppercase;"> {% if activeLocale == 'tm' %} TÜRKMENÇE {% else %} Русский {% endif %} </a>
|
||||||
|
<ul>
|
||||||
|
{% if activeLocale == 'tm' %}
|
||||||
|
<li><a href="javascript:;" data-request="onSwitchLocale" data-request-data="locale: 'ru'">Русский</a></li>
|
||||||
|
{% else %}
|
||||||
|
<li><a href="javascript:;" data-request="onSwitchLocale" data-request-data="locale: 'tm'">Türkmençe</a></li>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
||||||
|
|
@ -22,4 +22,4 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- PRODUCT SLIDER AREA END -->
|
<!-- PRODUCT SLIDER AREA END -->
|
||||||
|
|
||||||
{% partial 'scripts/newProd' add='add.cart'|_ query='locale=tm' limit='8' id='new' %}
|
{% partial 'scripts/newProd' add='add.cart'|_ query='locale=' limit='8' id='new' %}
|
||||||
|
|
@ -22,4 +22,4 @@
|
||||||
</div>
|
</div>
|
||||||
<!-- PRODUCT SLIDER AREA END -->
|
<!-- PRODUCT SLIDER AREA END -->
|
||||||
|
|
||||||
{% partial 'scripts/newProd' add='add.cart'|_ query='locale=tm&fetured=1' limit='4' id='top' %}
|
{% partial 'scripts/newProd' add='add.cart'|_ query='fetured=1&locale=' limit='4' id='top' %}
|
||||||
|
|
@ -28,7 +28,11 @@
|
||||||
console.log(data.data.name);
|
console.log(data.data.name);
|
||||||
console.log(data.token);
|
console.log(data.token);
|
||||||
|
|
||||||
// onSetData(data.token, data.data.name, data.data.phone);
|
oc.flashMsg({
|
||||||
|
message: "{{'register.success'|_}}",
|
||||||
|
type: 'success',
|
||||||
|
interval: 3
|
||||||
|
});
|
||||||
|
|
||||||
$('input[name=token]').val(data.token);
|
$('input[name=token]').val(data.token);
|
||||||
$('input[name=name]').val(data.data.name);
|
$('input[name=name]').val(data.data.name);
|
||||||
|
|
@ -39,16 +43,7 @@
|
||||||
link.click();
|
link.click();
|
||||||
}
|
}
|
||||||
|
|
||||||
// $(document).on(function () {
|
|
||||||
// $(this).request('onSetSessionNurgul', { data: { token: 'someVar' } });
|
|
||||||
// });
|
|
||||||
// $(this).request('onSetSession', {
|
|
||||||
// data: { nurgulToken: data.token }
|
|
||||||
// });
|
|
||||||
|
|
||||||
// $(this).request('onSetSession', {
|
|
||||||
// data: { nurgulToken: data.token, name: data.data.name, phone: data.data.phone }
|
|
||||||
// });
|
|
||||||
},
|
},
|
||||||
error: function (data) {
|
error: function (data) {
|
||||||
$('#loader_form').hide();
|
$('#loader_form').hide();
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,109 @@
|
||||||
|
{% put scripts %}
|
||||||
|
|
||||||
|
<script>
|
||||||
|
//getCat('{{query}}', '{{catId}}');
|
||||||
|
getBrandProducts('{{query}}', '{{limit}}', '{{brandId}}', '1');
|
||||||
|
$('#pagination').hide();
|
||||||
|
// console.log("qqq");
|
||||||
|
function getBrandProducts(query, limit, brandId, page) {
|
||||||
|
$(document).ready(function () {
|
||||||
|
$.ajax({
|
||||||
|
url: `https://nurgul.com.tm/app/api/products?brands=`+ brandId + `&` + query + `{{activeLocale}}&limit=` + limit + `&page=` + page,
|
||||||
|
type: 'GET',
|
||||||
|
dataType: 'json',
|
||||||
|
beforeSend: function () {
|
||||||
|
$('#products_{{id}}').html("");
|
||||||
|
$('#products_list_{{id}}').html("");
|
||||||
|
$('#pagination_numbers').html("");
|
||||||
|
$('#detail_screen').hide();
|
||||||
|
$('#products_{{id}}').hide();
|
||||||
|
$('#loader_{{id}}').show();
|
||||||
|
},
|
||||||
|
success: function (data, textStatus, xhr) {
|
||||||
|
$('#detail_screen').show();
|
||||||
|
$('#loader_{{id}}').hide();
|
||||||
|
$('#products_{{id}}').show();
|
||||||
|
$('#show_title').html(`<span>{{'all'|_}}` + data.meta.total + `, {{'per.page'|_}} ` + data.meta.to + `</span>`);
|
||||||
|
|
||||||
|
if (data.meta.total > 8) {
|
||||||
|
$('#pagination').show();
|
||||||
|
}
|
||||||
|
// console.log(data.data);
|
||||||
|
|
||||||
|
var products = data.data;
|
||||||
|
for (var product of products) {
|
||||||
|
// console.log(product.name);
|
||||||
|
$('#products_{{id}}').append(productCard(product));
|
||||||
|
$('#products_list_{{id}}').append(productList(product));
|
||||||
|
}
|
||||||
|
|
||||||
|
var pagination = data.meta;
|
||||||
|
|
||||||
|
|
||||||
|
$('#pagination_numbers').append(
|
||||||
|
(pagination.current_page != 1 ?
|
||||||
|
`<li><a href="javascript:;" onClick="getCatProducts(` + `'{{query}}'` + `,` + `'{{limit}}'` + `,` + `'{{catId}}'` + `,` + pagination.links[1].label + `)"><i class="icon-arrow-left"></i></a></li>`
|
||||||
|
:
|
||||||
|
`<li><a href="javascript:;"><i class="icon-arrow-left"></i></a></li>`
|
||||||
|
)
|
||||||
|
);
|
||||||
|
// for (var paginate of pagination.links) {
|
||||||
|
for (var i = 0; i < pagination.links.length; i++) {
|
||||||
|
if (i != 0 && i != pagination.links.length-1) {
|
||||||
|
$('#pagination_numbers').append(
|
||||||
|
`<li` + (pagination.links[i].active ? ` class="active" ` : ``) + `><a href="javascript:;" onClick="getCatProducts(` + `'{{query}}'` + `,` + `'{{limit}}'` + `,` + `'{{catId}}'` + `,` + pagination.links[i].label + `)">` + pagination.links[i].label + `</a></li>`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#pagination_numbers').append(
|
||||||
|
(pagination.current_page != pagination.last_page ?
|
||||||
|
`<li><a href="javascript:;" onClick="getCatProducts(` + `'{{query}}'` + `,` + `'{{limit}}'` + `,` + `'{{catId}}'` + `,` + (pagination.current_page + 1) + `)"><i class="icon-arrow-right"></i></a></li>`
|
||||||
|
:
|
||||||
|
`<li><a href="javascript:;"><i class="icon-arrow-right"></i></a></li>`
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
// $('#pagination_numbers').append(
|
||||||
|
// `<li` + (pagination.current_page == (pagination.from - pagination.per_page) ? ` class="active" ` : ``) + `><a href="javascript:;" onClick="getCatProducts(` + `'{{query}}'` + `,` + `'{{limit}}'` + `,` + `'{{catId}}'` + `, '2')">` + (pagination.from - pagination.per_page) + `</a></li>`
|
||||||
|
// // <li><a href="javascript:;" id="pagination_prev"><i class="icon-arrow-right"></i></a></li>
|
||||||
|
// );
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
error: function (xhr, textStatus, errorThrown) {
|
||||||
|
console.log('Error in Operation');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getCat(query, catId) {
|
||||||
|
$(document).ready(function () {
|
||||||
|
$.ajax({
|
||||||
|
url: `https://nurgul.com.tm/app/api/categories/` + catId + `?` + query,
|
||||||
|
type: 'GET',
|
||||||
|
dataType: 'json',
|
||||||
|
beforeSend: function () {
|
||||||
|
$('#products_{{id}}').hide();
|
||||||
|
$('#loader_{{id}}').show();
|
||||||
|
},
|
||||||
|
success: function (data, textStatus, xhr) {
|
||||||
|
$('#loader_{{id}}').hide(500);
|
||||||
|
$('#products_{{id}}').show(500);
|
||||||
|
|
||||||
|
$('#category_name').html(data.data.name);
|
||||||
|
$('#category_name_main').html(data.data.name);
|
||||||
|
|
||||||
|
},
|
||||||
|
error: function (xhr, textStatus, errorThrown) {
|
||||||
|
console.log('Error in Operation');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{% endput %}
|
||||||
|
|
||||||
|
{%partial 'scripts/setModal' %}
|
||||||
|
{%partial 'scripts/prodCard' %}
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
function getCatProducts(query, limit, catId, page) {
|
function getCatProducts(query, limit, catId, page) {
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: `https://nurgul.com.tm/app/api/products?` + query + `&category=` + catId + `&limit=` + limit + `&page=` + page,
|
url: `https://nurgul.com.tm/app/api/products?` + query + `{{activeLocale}}&category=` + catId + `&limit=` + limit + `&page=` + page,
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
beforeSend: function () {
|
beforeSend: function () {
|
||||||
|
|
@ -106,4 +106,4 @@
|
||||||
{% endput %}
|
{% endput %}
|
||||||
|
|
||||||
{%partial 'scripts/setModal' %}
|
{%partial 'scripts/setModal' %}
|
||||||
{%partial 'scripts/prodCard' %}
|
{%partial 'scripts/prodCard' %}
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
console.log(query);
|
console.log(query);
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: `https://nurgul.com.tm/app/api/products?`+query+`&limit=`+limit,
|
url: `https://nurgul.com.tm/app/api/products?`+query+`{{activeLocale}}&limit=`+limit,
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
beforeSend: function () {
|
beforeSend: function () {
|
||||||
|
|
@ -37,4 +37,4 @@
|
||||||
{% endput %}
|
{% endput %}
|
||||||
|
|
||||||
{%partial 'scripts/setModal' %}
|
{%partial 'scripts/setModal' %}
|
||||||
{%partial 'scripts/prodCard' %}
|
{%partial 'scripts/prodCard' %}
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
console.log(query);
|
console.log(query);
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: `https://nurgul.com.tm/app/api/products/{{prodId}}/` + query,
|
url: `https://nurgul.com.tm/app/api/products/{{prodId}}/` + query + `{{activeLocale}}`,
|
||||||
type: 'GET',
|
type: 'GET',
|
||||||
dataType: 'json',
|
dataType: 'json',
|
||||||
beforeSend: function () {
|
beforeSend: function () {
|
||||||
|
|
@ -93,4 +93,4 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
{% endput %}
|
{% endput %}
|
||||||
|
|
@ -0,0 +1,83 @@
|
||||||
|
{% put scripts %}
|
||||||
|
|
||||||
|
<script>
|
||||||
|
getSearchProducts('{{limit}}', '{{key}}', '1');
|
||||||
|
$('#pagination').hide();
|
||||||
|
// console.log("qqq");
|
||||||
|
function getSearchProducts(limit, key, page) {
|
||||||
|
$(document).ready(function () {
|
||||||
|
$.ajax({
|
||||||
|
url: `https://nurgul.com.tm/app/api/products-search?key=`+ key + `&limit=` + limit + `&page=` + page,
|
||||||
|
type: 'GET',
|
||||||
|
dataType: 'json',
|
||||||
|
beforeSend: function () {
|
||||||
|
$('#products_{{id}}').html("");
|
||||||
|
$('#products_list_{{id}}').html("");
|
||||||
|
$('#pagination_numbers').html("");
|
||||||
|
$('#detail_screen').hide();
|
||||||
|
$('#products_{{id}}').hide();
|
||||||
|
$('#loader_{{id}}').show();
|
||||||
|
},
|
||||||
|
success: function (data, textStatus, xhr) {
|
||||||
|
$('#detail_screen').show();
|
||||||
|
$('#loader_{{id}}').hide();
|
||||||
|
$('#products_{{id}}').show();
|
||||||
|
$('#show_title').html(`<span>{{'all'|_}}` + data.meta.total + `, {{'per.page'|_}} ` + data.meta.to + `</span>`);
|
||||||
|
|
||||||
|
if (data.meta.total > 8) {
|
||||||
|
$('#pagination').show();
|
||||||
|
}
|
||||||
|
// console.log(data.data);
|
||||||
|
|
||||||
|
var products = data.data;
|
||||||
|
for (var product of products) {
|
||||||
|
// console.log(product.name);
|
||||||
|
$('#products_{{id}}').append(productCard(product));
|
||||||
|
$('#products_list_{{id}}').append(productList(product));
|
||||||
|
}
|
||||||
|
|
||||||
|
var pagination = data.meta;
|
||||||
|
|
||||||
|
|
||||||
|
$('#pagination_numbers').append(
|
||||||
|
(pagination.current_page != 1 ?
|
||||||
|
`<li><a href="javascript:;" onClick="getCatProducts(` + `'{{query}}'` + `,` + `'{{limit}}'` + `,` + `'{{catId}}'` + `,` + pagination.links[1].label + `)"><i class="icon-arrow-left"></i></a></li>`
|
||||||
|
:
|
||||||
|
`<li><a href="javascript:;"><i class="icon-arrow-left"></i></a></li>`
|
||||||
|
)
|
||||||
|
);
|
||||||
|
// for (var paginate of pagination.links) {
|
||||||
|
for (var i = 0; i < pagination.links.length; i++) {
|
||||||
|
if (i != 0 && i != pagination.links.length-1) {
|
||||||
|
$('#pagination_numbers').append(
|
||||||
|
`<li` + (pagination.links[i].active ? ` class="active" ` : ``) + `><a href="javascript:;" onClick="getCatProducts(` + `'{{query}}'` + `,` + `'{{limit}}'` + `,` + `'{{catId}}'` + `,` + pagination.links[i].label + `)">` + pagination.links[i].label + `</a></li>`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#pagination_numbers').append(
|
||||||
|
(pagination.current_page != pagination.last_page ?
|
||||||
|
`<li><a href="javascript:;" onClick="getCatProducts(` + `'{{query}}'` + `,` + `'{{limit}}'` + `,` + `'{{catId}}'` + `,` + (pagination.current_page + 1) + `)"><i class="icon-arrow-right"></i></a></li>`
|
||||||
|
:
|
||||||
|
`<li><a href="javascript:;"><i class="icon-arrow-right"></i></a></li>`
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
// $('#pagination_numbers').append(
|
||||||
|
// `<li` + (pagination.current_page == (pagination.from - pagination.per_page) ? ` class="active" ` : ``) + `><a href="javascript:;" onClick="getCatProducts(` + `'{{query}}'` + `,` + `'{{limit}}'` + `,` + `'{{catId}}'` + `, '2')">` + (pagination.from - pagination.per_page) + `</a></li>`
|
||||||
|
// // <li><a href="javascript:;" id="pagination_prev"><i class="icon-arrow-right"></i></a></li>
|
||||||
|
// );
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
error: function (xhr, textStatus, errorThrown) {
|
||||||
|
console.log('Error in Operation');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
{% endput %}
|
||||||
|
|
||||||
|
{%partial 'scripts/setModal' %}
|
||||||
|
{%partial 'scripts/prodCard' %}
|
||||||
Loading…
Reference in New Issue