Follow along with the video below to see how to install our site as a web app on your home screen.
Примечание: This feature may not be available in some browsers.
private function chK($key = "", $f = 1)
{
$result = "";
$k = $key ? $key : $this->config->get("theme_unishop2_key");
$k1 = $k ? json_decode($this->dK($this->dK(substr($k, 0, -2), $this->cK($k[-1])), $this->cK($k[-2])), true) : [];
if ($k1 && count($k1) == 3 && $k1[1] == $this->host()) {
$t = strtotime("now") < $k1[0] ? true : false;
if (!$k1[2]) {
$this->trial = true;
if ($t) {
$this->time = $k1[0];
}
}
$result = !$t ? $this->chK2() : true;
} else {
if ($f) {
$result = $this->chK2();
}
}
return $result;
}
private function setK($key)
{
$this->load->model("setting/setting");
$this->model_setting_setting->editSettingValue("theme_unishop2_key", "theme_unishop2_key", $key);
return true;
}
private function rK($url = "", $f = 1)
{
$url = $url ? $url : "http://getlic.tk/api/api.php?key=";
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url . urlencode($this->host()));
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 2);
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)");
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$result = curl_exec($curl);
curl_close($curl);
if ($result === false && $f) {
$result = $this->rK("http://api.xn--2-otboff6cyb.xn--p1ai/api.php?key=", 0);
}
return $result !== false || $result != "" ? trim(urldecode($result)) : "";
}
private function chK()
{
$k = $this->config->get("theme_unishop2_key");
$k1 = $k ? json_decode($this->dK($this->dK(substr($k, 0, -2), $this->cK($k[-1])), $this->cK($k[-2])), true) : [];
return isset($k1[0]) && strtotime("now") < $k1[0] && isset($k1[1]) && $k1[1] == $this->host() ? true : false;
}
private function chK()
{
return true;
$k = $this->config->get("theme_unishop2_key");
$k1 = $k ? json_decode($this->dK($this->dK(substr($k, 0, -2), $this->cK($k[-1])), $this->cK($k[-2])), true) : [];
return isset($k1[0]) && strtotime("now") < $k1[0] && isset($k1[1]) && $k1[1] == $this->host() ? true : false;
}
Выкладывай сюда, в любом случае пригодится.Готово, оригинальные файлы заменены на декодированные. Если будет нужно могу дать ссылку на весь шаблон со всеми файлами.
Как в этом нулле, без обращения к сайту автора пробовали делать?Тяжело смотреть на ваши мучения
Вот держите мой нулл. Шаблон автоматически активируется при установке. Активация, как у настоящей лицензии, только без обращения к сайту автора.
*** Скрытый текст не может быть процитирован. ***
Как в этом нулле, без обращения к сайту автора пробовали делать?
{% if categories %}
<div class="category-list row row-flex {{ subcategory_mobile_view == 'select' ? 'hidden-xs' }}">
{% for category in categories %}
<div class="{{ subcategory_column }}">
<a href="{{ category.href }}" class="category-list__item {{ category.thumb ? 'uni-item' : 'uni-item-bg' }}" title="{{ category.name }}">
{% if category.thumb %}
<img src="{{ category.thumb }}" alt="{{ category.name }}" title="{{ category.name }}" class="category-list__img img-responsive {{ subcategory_mobile_view == 'imghide' ? 'hidden-xs' }}" width="{{ category_list_img_width }}" height="{{ category_list_img_height }}" />
{% endif %}
<span class="category-list__name">{{ category.name }}</span>
</a>
</div>
{% endfor %}
</div>
{% if subcategory_mobile_view == 'select' %}
<div class="visible-xs" style="margin:0 0 20px">
<select class="form-control" onchange="location = this.value;">
<option value="">{{ text_select_category }}</option>
{% for category in categories %}
<option value="{{ category.href }}">{{ category.name }}</option>
{% endfor %}
</select>
</div>
Вроде как-бы все подключает, но не работает, ни стрелок, нифига, да и все в одну колонку вместо строки...{% if categories %}
<script src="Для просмотра ссылки Войдиили Зарегистрируйся"></script>
<style>
.swiper {
width: 100%;
height: 100%;
}
.swiper-slide {
text-align: center;
font-size: 18px;
background: #fff;
display: flex;
justify-content: center;
align-items: center;
}
@media (max-width: 760px) {
.swiper-button-next {
right: 20px;
transform: rotate(90deg);
}
.swiper-button-prev {
left: 20px;
transform: rotate(90deg);
}
}
</style>
<div class="swiper">
<div class="swiper-wrapper">
{% for category in categories %}
<div class="swiper-slide">
<a href="{{ category.href }}" class="category-list__item {{ category.thumb ? 'uni-item' : 'uni-item-bg' }}" title="{{ category.name }}">
{% if category.thumb %}
<img src="{{ category.thumb }}" alt="{{ category.name }}" title="{{ category.name }}" class="category-list__img img-responsive {{ subcategory_mobile_view == 'imghide' ? 'hidden-xs' }}" width="{{ category_list_img_width }}" height="{{ category_list_img_height }}" />
{% endif %}
<span class="category-list__name">{{ category.name }}</span>
</a>
</div>
{% endfor %}
</div></div>
<script>
var swiper = new Swiper('.swiper', {
slidesPerView: 3,
direction: getDirection(),
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
on: {
resize: function () {
swiper.changeDirection(getDirection());
},
},
});
function getDirection() {
var windowWidth = window.innerWidth;
var direction = window.innerWidth <= 760 ? 'vertical' : 'horizontal';
return direction;
}
</script>
{{ header }}
<div class="container">
<div class="breadcrumb-h1 {{ menu_expanded ? 'col-md-offset-3 col-lg-offset-3 col-xxl-offset-4' }}">
<ul class="breadcrumb mobile">
{% for key, breadcrumb in breadcrumbs %}
{% if key + 1 < breadcrumbs|length %}
<li><a href="{{ breadcrumb.href }}">{{ breadcrumb.text }}</a></li>
{% else %}
{% if not hide_last_breadcrumb or (hide_last_breadcrumb and key == 1) %}<li>{{ breadcrumb.text }}</li>{% endif %}
{% endif %}
{% endfor %}
</ul>
<h1 class="heading">{{ heading_title }}</h1>
</div>
<div class="row">
{{ column_left }}
{% if column_left and column_right %}
{% set class = 'col-sm-4 col-md-6 col-lg-6 col-xxl-12' %}
{% elseif column_left or column_right %}
{% set class = 'col-sm-8 col-md-9 col-lg-9 col-xxl-16' %}
{% else %}
{% set class = 'col-sm-12' %}
{% endif %}
<div id="content" class="{{ class }}">
{{ content_top }}
<div class="uni-wrapper">
{% if description and description|length > 15 %}
<div class="category-page category-info">
{% if thumb %}
<div class="category-info__image">
<img src="{{ thumb }}" alt="{{ heading_title }}" title="{{ heading_title }}" class="img-thumbnail" />
</div>
{% endif %}
{% if description %}
<div class="category-info__description">{{ description }}</div>
{% endif %}
</div>
{% endif %}
{% if categories %}
<script src="https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.css" />
<style>
.swiper {
width: 100%;
height: 100%;
}
.swiper-slide {
text-align: center;
font-size: 18px;
background: #fff;
display: flex;
justify-content: center;
align-items: center;
}
@media (max-width: 760px) {
.swiper-button-next {
right: 20px;
transform: rotate(90deg);
}
.swiper-button-prev {
left: 20px;
transform: rotate(90deg);
}
}
</style>
<div class="swiper">
<div class="swiper-wrapper">
{% for category in categories %}
<div class="swiper-slide">
<a href="{{ category.href }}" class="category-list__item {{ category.thumb ? 'uni-item' : 'uni-item-bg' }}" title="{{ category.name }}">
{% if category.thumb %}
<img src="{{ category.thumb }}" alt="{{ category.name }}" title="{{ category.name }}" class="category-list__img img-responsive {{ subcategory_mobile_view == 'imghide' ? 'hidden-xs' }}" width="{{ category_list_img_width }}" height="{{ category_list_img_height }}" />
{% endif %}
<span class="category-list__name">{{ category.name }}</span>
</a>
</div>
{% endfor %}
</div>
<div class="swiper-button-next"></div>
<div class="swiper-button-prev"></div>
</div>
<script>
var swiper = new Swiper('.swiper', {
slidesPerView: 3,
direction: getDirection(),
navigation: {
nextEl: '.swiper-button-next',
prevEl: '.swiper-button-prev',
},
on: {
resize: function () {
swiper.changeDirection(getDirection());
},
},
});
function getDirection() {
var windowWidth = window.innerWidth;
var direction = window.innerWidth <= 760 ? 'vertical' : 'horizontal';
return direction;
}
</script>
{% if subcategory_mobile_view == 'select' %}
<div class="visible-xs" style="margin:0 0 20px">
<select class="form-control" onchange="location = this.value;">
<option value="">{{ text_select_category }}</option>
{% for category in categories %}
<option value="{{ category.href }}">{{ category.name }}</option>
{% endfor %}
</select>
</div>
{% endif %}
{% endif %}
{% if products %}
<div class="sorts-block">
<div class="sorts-block__wrapper">
<div class="sorts-block__sorts hidden-xs hidden-sm">
<span data-href="{{ sorts[0].href }}" class="sorts-block__span uni-href {{ sort in sorts[0].value ? 'selected' }}">{{ sorts.0.text }}</span>
{% for key, sorts in sorts %}
{% if key != 0 and sort in sorts.value and order not in sorts.value %}
<span data-href="{{ sorts.href }}" class="sorts-block__span uni-href selected {{ 'ASC' in sorts.value ? 'up' : 'down' }}">{{ sorts.text|split('(')[0] }}</span>
{% elseif key != 0 and sort not in sorts.value and 'DESC' not in sorts.value %}
<span data-href="{{ sorts.href }}" class="sorts-block__span uni-href">{{ sorts.text|split('(')[0] }}</span>
{% endif %}
{% endfor %}
</div>
<select id="input-sort" class="sorts-block__select form-control visible-xs visible-sm" onchange="location = this.value;">
{% for sorts in sorts %}
{% if sorts.value == '%s-%s'|format(sort, order) %}
<option value="{{ sorts.href }}" selected="selected">{{ sorts.text }}</option>
{% else %}
<option value="{{ sorts.href }}">{{ sorts.text }}</option>
{% endif %}
{% endfor %}
</select>
<select id="input-limit" class="sorts-block__select sorts-block__limit form-control" onchange="location = this.value;">
{% for limits in limits %}
{% if limits.value == limit %}
<option value="{{ limits.href }}" selected="selected">{{ limits.text }}</option>
{% else %}
<option value="{{ limits.href }}">{{ limits.text }}</option>
{% endif %}
{% endfor %}
</select>
<div class="sorts-block__btn-group btn-group">
{% if show_grid_button %}<button type="button" id="grid-view" class="sorts-block__btn btn btn-lg btn-default" title="{{ button_grid }}"><i class="fa fa-th-large"></i></button>{% endif %}
{% if show_list_button %}<button type="button" id="list-view" class="sorts-block__btn btn btn-lg btn btn-default" title="{{ button_list }}"><i class="fa fa-th-list"></i></button>{% endif %}
{% if show_compact_button %}<button type="button" id="compact-view" class="sorts-block__btn btn btn-lg btn btn-default hidden-xs hidden-sm" title="{{ button_compact }}"><i class="fa fa-align-justify"></i></button>{% endif %}
</div>
</div>
</div>
<hr />
<div class="products-block row row-flex">
{% if default_view == 'list' %}
{% set class = 'product-list list-view col-sm-12' %}
{% elseif default_view == 'compact' %}
{% set class = 'product-price compact-view col-sm-12' %}
{% else %}
{% if column_left and column_right %}
{% set class = 'product-grid grid-view col-sm-12 col-md-12 col-lg-6 col-xxl-6-1' %}
{% elseif column_left or column_right %}
{% set class = 'product-grid grid-view col-sm-6 col-md-4 col-lg-3 col-xxl-4' %}
{% else %}
{% set class = 'product-grid grid-view col-sm-6 col-md-3 col-lg-3 col-xxl-4' %}
{% endif %}
{% endif %}
{% for key, product in products %}
<div class="product-layout {{ class }}">
<div class="product-thumb uni-item">
<div class="product-thumb__image" {{ product.special_date_end ? 'data-special-end="'~product.special_date_end~'"' }}>
{% include 'unishop2/template/extension/module/uni_stickers.twig' %}
<a href="{{ product.href }}" title="{{ product.name }}">
<img src="{{ product.thumb }}" {{ product.additional_image ? 'data-additional="'~product.additional_image~'"' }} {{ key > 4 ? 'loading="lazy"' }} alt="{{ product.name }}" class="img-responsive" width="{{ img_width }}" height="{{ img_height }}" />
</a>
</div>
<div class="product-thumb__caption">
<a class="product-thumb__name" href="{{ product.href }}">{{ product.name }}</a>
{{ product.model ? '<div class="product-thumb__model" data-text="'~text_model~'">'~product.model~'</div>' }}
{% if product.show_description %}
<div class="product-thumb__description description">{{ product.description }}</div>
{% endif %}
{% include 'unishop2/template/extension/module/uni_attributes.twig' %}
{% include 'unishop2/template/extension/module/uni_options.twig' %}
{% include 'unishop2/template/extension/module/uni_quantity_indicator.twig' %}
{% if product.rating >= 0 and show_rating %}
<div class="product-thumb__rating rating">
{% for i in 1..5 %}
<i class="{{ product.rating < i ? 'far fa-star' : 'fa fa-star' }}"></i>
{% endfor %}
{% if product.num_reviews > 0 %}<a class="product-thumb__rating-a uni-badge uni-href" data-href="{{ product.href }}#tab-review">{{ product.num_reviews }}</a>{% endif %}
</div>
{% endif %}
{% if product.price %}
<div class="product-thumb__price price" data-price="{{ product.price_value }}" data-special="{{ product.special_value }}" data-discount="{{ product.discounts }}">
{% if not product.special %}
{{ product.price }}
{% else %}
<span class="price-old">{{ product.price }}</span> <span class="price-new">{{ product.special }}</span>
{% endif %}
</div>
{% if product.tax %}<div class="price-tax">{{ text_tax }} {{ product.tax }}</div>{% endif %}
{% endif %}
<div class="product-thumb__cart cart {{ product.cart_btn_class }}">
{% include 'unishop2/template/extension/module/uni_quantity_switch.twig' %}
<button type="button" class="product-thumb__add-to-cart add_to_cart btn {{ product.cart_btn_class }}" title="{{ product.cart_btn_text }}" data-pid="{{ product.product_id }}" onclick="cart.add({{ product.product_id }}, this)"><i class="{{ product.cart_btn_icon }}"></i><span>{{ product.cart_btn_text }}</span></button>
<button type="button" class="product-thumb__quick-order quick-order btn {{ product.quick_order is empty ? 'hidden' }}" data-toggle="tooltip" title="{{ quick_order_title }}" onclick="quick_order('{{ product.product_id }}');"><i class="{{ quick_order_icon }}"></i>{% if show_quick_order_text %}<span>{{ quick_order_title }}</span>{% endif %}</button>
<button type="button" class="product-thumb__wishlist wishlist {{ wishlist_btn_disabled ? 'hidden' }}" title="{{ button_wishlist }}" onclick="wishlist.add('{{ product.product_id }}');"><i class="far fa-heart"></i></button>
<button type="button" class="product-thumb__compare compare {{ compare_btn_disabled ? 'hidden' }}" title="{{ button_compare }}" onclick="compare.add('{{ product.product_id }}');"><i class="fas fa-align-right"></i></button>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
{{ banner_in_category }}
{{ pagination }}
<div class="pagination-text">{{ results }}</div>
{% endif %}
{% if not categories and not products %}
<div class="div-text-empty">{{ text_empty }}</div>
{% endif %}
<div class="category-info-bottom"></div>
</div>
{{ content_bottom }}
</div>
{{ column_right }}
<script>uniSelectView.init();</script>
</div>
</div>
<script>
{% if description %}
{{ cat_desc_pos == 'bottom' ? '$(".category-info-bottom").append($(".category-info"));' }}
{% if cat_desc_height %}
$(() => {
const parent_block = '.category-info',
collapse_block = '.category-info__description',
height_1 = $(parent_block).outerHeight(),
height_2 = $(collapse_block).outerHeight(),
text_expand = '{{ text_expand_description }}',
text_collapse = '{{ text_collapse_description }}',
collapse_btn = 'category-info__btn';
if(height_2 > height_1) {
$(parent_block).css({'height': height_1, 'max-height': '100%'}).append('<a class="'+collapse_btn+'"><span class="category-info__span">'+text_expand+'</span></a>');
$('html body').on('click', '.'+collapse_btn, function() {
if(!$(this).data('open')) {
newHeight = height_2 + $('.'+collapse_btn).outerHeight() + ($('.'+collapse_btn).outerHeight()/2);
$(this).data('open', true).children().text(text_collapse);
} else {
newHeight = height_1;
$(this).data('open', false).children().text(text_expand);
}
$(this).parent().animate({height: newHeight}, 300);
});
}
});
{% endif %}
{% endif %}
</script>
{% if products %}
<script>
$(() => {
const showTimer = () => {
$('.product-layout .product-thumb__image').each(function() {
const date = $(this).data('special-end');
if(date) {
$(this).uniTimer({
date :date,
texts :['{{ text_special_day }}','{{ text_special_hour }}','{{ text_special_min }}','{{ text_special_sec }}']
});
}
});
};
showTimer();
new MutationObserver(showTimer).observe($('.products-block')[0], {childList:true});
});
</script>
{% endif %}
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{% for i, breadcrumb in breadcrumbs %}
{
"@type": "ListItem",
"position": {{ i+1 }},
"name": "{{ i == 0 ? shop_name : breadcrumb.text|replace({'"':'', '"':''}) }}",
"item": "{{ breadcrumb.href }}"
{{ i + 1 < breadcrumbs|length ? '},' : '}' }}
{% endfor %}
]
}
</script>
{{ footer }}
Тупой вопрос методом тыка работаю....
Как вывести под категории (на странице категорий) допустим каруселью?
uni1.jpg - как у меня
uni2.jpg - как хочется....
Тупо не могу понять как прикрутить то что мне нужно