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 Flash;
|
||||
use Session as SessionP;
|
||||
use RainLab\Translate\Models\Message;
|
||||
|
||||
class Session extends ComponentBase
|
||||
{
|
||||
|
|
@ -26,12 +27,14 @@ class Session extends ComponentBase
|
|||
$data = post();
|
||||
// dd($data);
|
||||
// return $data ?? 'asdasd';
|
||||
// setAttributeTranslated('name', 'Jean-Claude', 'fr');
|
||||
$success_msg = "logged.in.success";
|
||||
|
||||
SessionP::put('nurgulToken', $data['token']);
|
||||
SessionP::put('name', $data['name']);
|
||||
SessionP::put('phone', $data['phone']);
|
||||
|
||||
Flash::success("Ustunlikli Icher Girdiniz");
|
||||
Flash::success(Message::trans($success_msg));
|
||||
return Redirect::to('/');
|
||||
}
|
||||
|
||||
|
|
@ -44,10 +47,10 @@ class Session extends ComponentBase
|
|||
|
||||
$getToken = SessionP::get('nurgulToken');
|
||||
if ($getToken == "") {
|
||||
Flash::success("Ustunlikli Shahsy Otagynyzdan Chykdynyz.");
|
||||
Flash::success(Message::trans('logout.success'));
|
||||
return Redirect::to('/');
|
||||
} 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);
|
||||
|
||||
if (!empty($dataqq)) {
|
||||
Flash::success("Üstünlikli Sebede Goşuldy");
|
||||
Flash::success(Message::trans('success.add.to.cart'));
|
||||
return redirect()->refresh();
|
||||
} elseif (empty($dataqq)) {
|
||||
Flash::error('Ýalňyşlyk Ýüze Çykdy!!!');
|
||||
Flash::error(Message::trans('error'));
|
||||
return redirect()->refresh();
|
||||
}
|
||||
}
|
||||
|
|
@ -124,7 +127,7 @@ class Session extends ComponentBase
|
|||
$dataqq = json_decode($response);
|
||||
|
||||
if (!empty($dataqq)) {
|
||||
Flash::success("Üstünlikli Sebede Goşuldy");
|
||||
Flash::success(Message::trans('remove.item.success.in.cart'));
|
||||
return redirect()->refresh();
|
||||
}
|
||||
}
|
||||
|
|
@ -166,10 +169,10 @@ class Session extends ComponentBase
|
|||
$dataqq = json_decode($response);
|
||||
|
||||
if (!empty($dataqq)) {
|
||||
Flash::success("Üstünlikli Salgy Goşuldy");
|
||||
Flash::success(Message::trans('success.add.addr'));
|
||||
return redirect()->refresh();
|
||||
} elseif (empty($dataqq)) {
|
||||
Flash::error('Ýalňyşlyk Ýüze Çykdy!!!');
|
||||
Flash::error(Message::trans('error'));
|
||||
return redirect()->refresh();
|
||||
}
|
||||
}
|
||||
|
|
@ -244,10 +247,10 @@ class Session extends ComponentBase
|
|||
$dataqq = json_decode($response);
|
||||
|
||||
if (!empty($dataqq)) {
|
||||
Flash::success("Sargydyňyz Üstünlikli Amala Aşyryldy");
|
||||
Flash::success(Message::trans('success.make.order'));
|
||||
return Redirect::to('/');
|
||||
} elseif (empty($dataqq)) {
|
||||
Flash::error('Ýalňyşlyk Ýüze Çykdy!!!');
|
||||
Flash::error(Message::trans('error'));
|
||||
return redirect()->refresh();
|
||||
}
|
||||
}
|
||||
|
|
@ -270,10 +273,10 @@ class Session extends ComponentBase
|
|||
$dataqq = json_decode($response);
|
||||
|
||||
if (!empty($dataqq)) {
|
||||
Flash::success("Halanlaryma Üstünlikli Goşuldy");
|
||||
Flash::success(Message::trans('success.add.wishlist'));
|
||||
return Redirect::to('/wishlist');
|
||||
} elseif (empty($dataqq)) {
|
||||
Flash::error('Ýalňyşlyk Ýüze Çykdy!!!');
|
||||
Flash::error(Message::trans('error'));
|
||||
return redirect()->refresh();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,6 +11,12 @@ class Slider extends Model
|
|||
|
||||
use \October\Rain\Database\Traits\SoftDelete;
|
||||
|
||||
public $implement = [
|
||||
\RainLab\Translate\Behaviors\TranslatableModel::class
|
||||
];
|
||||
|
||||
public $translatable = ['header', 'header2', 'txt', 'btn_txt'];
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ plugin:
|
|||
homepage: ''
|
||||
navigation:
|
||||
main-menu-item:
|
||||
label: 'Slider (Nurgul)'
|
||||
label: NURGUL
|
||||
url: romanah/bagisto/slider
|
||||
icon: icon-image
|
||||
sideMenu:
|
||||
|
|
@ -14,3 +14,7 @@ navigation:
|
|||
label: Brendlar
|
||||
url: romanah/bagisto/brand
|
||||
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"
|
||||
|
||||
[session]
|
||||
|
||||
[localePicker]
|
||||
forceUrl = 1
|
||||
==
|
||||
<?php
|
||||
function onStart(){
|
||||
|
|
@ -14,18 +17,18 @@ function onStart(){
|
|||
?>
|
||||
==
|
||||
<!doctype html>
|
||||
<html class="no-js" lang="zxx">
|
||||
<html class="no-js" lang="{{activeLocale}}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<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="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" />
|
||||
<link rel="shortcut icon" href="https://nurgul.com.tm/app/vendor/webkul/ui/assets/images/favicon.ico" type="image/x-icon" />
|
||||
<!-- Font Icons css -->
|
||||
<link rel="stylesheet" href="{{'assets/css/font-icons.css'|theme}}">
|
||||
<!-- plugins css -->
|
||||
|
|
|
|||
|
|
@ -36,9 +36,13 @@ items:
|
|||
items:
|
||||
-
|
||||
title: 'Gelinlik Güller'
|
||||
nesting: null
|
||||
type: url
|
||||
url: /category/2
|
||||
code: ''
|
||||
reference: null
|
||||
cmsPage: null
|
||||
replace: null
|
||||
viewBag:
|
||||
locale:
|
||||
ru:
|
||||
|
|
@ -49,9 +53,13 @@ items:
|
|||
isExternal: '0'
|
||||
-
|
||||
title: 'Sowgatlyk Güller'
|
||||
nesting: null
|
||||
type: url
|
||||
url: /category/3
|
||||
code: ''
|
||||
reference: null
|
||||
cmsPage: null
|
||||
replace: null
|
||||
viewBag:
|
||||
locale:
|
||||
ru:
|
||||
|
|
@ -62,9 +70,13 @@ items:
|
|||
isExternal: '0'
|
||||
-
|
||||
title: 'Sebetli güller'
|
||||
nesting: null
|
||||
type: url
|
||||
url: /category/4
|
||||
code: ''
|
||||
reference: null
|
||||
cmsPage: null
|
||||
replace: null
|
||||
viewBag:
|
||||
locale:
|
||||
ru:
|
||||
|
|
@ -75,9 +87,13 @@ items:
|
|||
isExternal: '0'
|
||||
-
|
||||
title: 'Bedreli güller'
|
||||
nesting: null
|
||||
type: url
|
||||
url: /category/5
|
||||
code: ''
|
||||
reference: null
|
||||
cmsPage: null
|
||||
replace: null
|
||||
viewBag:
|
||||
locale:
|
||||
ru:
|
||||
|
|
@ -88,9 +104,26 @@ items:
|
|||
isExternal: '0'
|
||||
-
|
||||
title: 'Buket güller'
|
||||
nesting: null
|
||||
type: url
|
||||
url: /category/6
|
||||
code: ''
|
||||
reference: null
|
||||
cmsPage: null
|
||||
replace: null
|
||||
viewBag:
|
||||
locale:
|
||||
ru:
|
||||
title: ''
|
||||
url: ''
|
||||
isHidden: '0'
|
||||
cssClass: ''
|
||||
isExternal: '0'
|
||||
-
|
||||
title: Brendlar
|
||||
type: cms-page
|
||||
code: ''
|
||||
reference: brands
|
||||
viewBag:
|
||||
locale:
|
||||
ru:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
url = "/about-us"
|
||||
layout = "main"
|
||||
layout = "mainN"
|
||||
title = "About Us"
|
||||
==
|
||||
{%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"
|
||||
layout = "main"
|
||||
layout = "mainN"
|
||||
title = "Category"
|
||||
==
|
||||
<?php
|
||||
function onStart(){
|
||||
|
|
@ -84,4 +84,4 @@ function onStart(){
|
|||
</div>
|
||||
<!-- 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"
|
||||
layout = "mainN"
|
||||
title = "Checkout"
|
||||
==
|
||||
{%partial "bread" title='checkout.title'|_ %}
|
||||
<div class="ltn__checkout-area mb-100">
|
||||
|
|
|
|||
|
|
@ -1,38 +1,62 @@
|
|||
url = "/contact-us"
|
||||
layout = "main"
|
||||
layout = "mainN"
|
||||
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 'contact/content' %}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- CONTACT MESSAGE AREA START -->
|
||||
<div class="ltn__contact-message-area mt-100 mb-80">
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<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>
|
||||
<form id="contact-form" action="mail.php" method="post">
|
||||
<h3 class="text-center mb-50">{{'contact.header.txt'|_}}</h3>
|
||||
<form data-request="{{ genericForm }}::onFormSubmit" id="contact-form">
|
||||
|
||||
{{ form_token() }}
|
||||
|
||||
<div id="{{ genericForm }}_forms_flash"></div>
|
||||
|
||||
<div class="row">
|
||||
<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="text" name="phone" placeholder="Phone Number:">
|
||||
<input type="text" name="subject" placeholder="Your Title:">
|
||||
<input type="text" name="phone" placeholder="{{'form.phone'|_}}:">
|
||||
<input type="text" name="subject" placeholder="{{'form.subject'|_}}:">
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<textarea name="message" placeholder="Enter message"></textarea>
|
||||
<textarea name="message" placeholder="{{'form.enter.message'|_}}"></textarea>
|
||||
</div>
|
||||
<div class="col-lg-12">
|
||||
<div class="btn-wrapper mt-0">
|
||||
<button class="btn theme-btn-1 btn-effect-1 text-uppercase" type="submit">Send
|
||||
Message</button>
|
||||
<button class="btn theme-btn-1 btn-effect-1 text-uppercase" type="submit">{{'contact.send.msg'|_}}</button>
|
||||
</div>
|
||||
<p class="form-messege mb-0 mt-20"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
url = "/"
|
||||
layout = "mainN"
|
||||
title = "Home"
|
||||
|
||||
[products]
|
||||
==
|
||||
{% partial 'home/slider' %}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
url = "/login"
|
||||
layout = "main"
|
||||
layout = "mainN"
|
||||
title = "Login"
|
||||
==
|
||||
{%partial "bread" title='login.title'|_ %}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
title = "Privacy"
|
||||
url = "/privacy"
|
||||
layout = "main"
|
||||
layout = "mainN"
|
||||
title = "Privacy"
|
||||
==
|
||||
<div class="container privacy_policy whitespace-pre-line">
|
||||
<p style="text-align: center;"><strong><u>Ulanyş Düzgünleriniň we Gizlinligiň </u></strong></p>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
url = "/product/detail/:id"
|
||||
layout = "main"
|
||||
layout = "mainN"
|
||||
title = "Product/detail"
|
||||
==
|
||||
<?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"
|
||||
layout = "main"
|
||||
layout = "mainN"
|
||||
title = "Register"
|
||||
==
|
||||
{%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"
|
||||
layout = "mainN"
|
||||
title = "wishlist"
|
||||
==
|
||||
|
||||
{%partial "bread" title='wishlist.title'|_ %}
|
||||
|
||||
{% partial 'loader/loader' id='loader_wish' %}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
<i class="icon-speedometer"></i>
|
||||
</div>
|
||||
<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>
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@
|
|||
</div>
|
||||
<!-- header-search-2 -->
|
||||
<div class="header-search-2">
|
||||
<form id="#123" method="get" action="#">
|
||||
<input type="text" name="search" value="" placeholder="{{'search'|_}}..." />
|
||||
<form id="#searchForm" method="post" action="/search">
|
||||
<input type="text" name="keyword" value="" placeholder="{{'search'|_}}..." />
|
||||
<button type="submit">
|
||||
<span><i class="icon-magnifier"></i></span>
|
||||
</button>
|
||||
|
|
@ -139,8 +139,18 @@
|
|||
{% endif %}
|
||||
{% 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>
|
||||
</div>
|
||||
</nav>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -22,4 +22,4 @@
|
|||
</div>
|
||||
<!-- 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>
|
||||
<!-- 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.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=name]').val(data.data.name);
|
||||
|
|
@ -39,16 +43,7 @@
|
|||
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) {
|
||||
$('#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) {
|
||||
$(document).ready(function () {
|
||||
$.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',
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
console.log(query);
|
||||
$(document).ready(function () {
|
||||
$.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',
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
console.log(query);
|
||||
$(document).ready(function () {
|
||||
$.ajax({
|
||||
url: `https://nurgul.com.tm/app/api/products/{{prodId}}/` + query,
|
||||
url: `https://nurgul.com.tm/app/api/products/{{prodId}}/` + query + `{{activeLocale}}`,
|
||||
type: 'GET',
|
||||
dataType: 'json',
|
||||
beforeSend: function () {
|
||||
|
|
|
|||
|
|
@ -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