Инсталлятор + парсер характеристик виртуала

This commit is contained in:
root 2023-02-26 19:57:01 +03:00
parent 3025fbec54
commit 4bef5817c4
16 changed files with 433 additions and 54 deletions

View File

@ -68,7 +68,7 @@ $smarty->assign('oblozhka', $mainImg);
if ( $pieces[0] ) $catImg=\DB::getValue("SELECT `filename` FROM `tovar_category_img` WHERE `tovar_category_id`=? ORDER BY RANDOM() LIMIT 1", $pieces[0]);
$smarty -> assign( 'catImg', $catImg );
$kol = 40; //количество записей для вывода
$kol = 80; //количество записей для вывода
$art=($page>0)? ($page * $kol) - $kol : 0;// определяем, с какой записи нам выводить

View File

@ -1,6 +1,7 @@
<?php
ini_set( 'display_errors', 0 );
@mkdir( 'img/' . $_SERVER['SERVER_NAME'] . '/cert', 0700 );
@mkdir( 'img/' . $_SERVER['SERVER_NAME'] . '/tovar/square', 0700 );
$smarty -> caching = false;
$smarty -> cache_lifetime = 86400;
/* ----------------------------------------------------------------------
@ -104,8 +105,21 @@ $smarty -> assign( 'page', $page );
Получаем картинки
---------------------------------------------------------------------- */
$imagesTovar = \DB::getAll( "SELECT * FROM `tovar_img` WHERE `tovar_id`=?", $_GET['id'] );
$smarty -> assign( 'imagesTovar', $imagesTovar );
if ($_SERVER['SERVER_NAME']=='v.yurecnt.ru'){
require_once('api/php/thumbs/thumbs.php');
for ($i=0; $i<count($imagesTovar); $i++){
//Проверяем сущетсование картинки.....
if (!file_exists('img/' . $_SERVER['SERVER_NAME'] . '/tovar/square/' . $imagesTovar[$i]['filename'] . '.jpg')) {
$image = new Thumbs('img/' . $_SERVER['SERVER_NAME'] . '/tovar/' . $imagesTovar[$i]['filename'] . '.jpg');
$image->thumb(600, 400);
$image->save('img/' . $_SERVER['SERVER_NAME'] . '/tovar/square/' . $imagesTovar[$i]['filename'] . '.jpg');
unset ($image);
}
}
}
$smarty -> assign( 'imagesTovar', $imagesTovar );
$countImg=count($imagesTovar);
\DB::set("UPDATE `tovar` SET `countImg`=? WHERE `id`=?", array( $countImg, $_GET['id'] ) );

1
api/php/thumbs Submodule

@ -0,0 +1 @@
Subproject commit 966837625203c4c1b8a88ab3384916cd6bd3d880

View File

@ -0,0 +1,7 @@
46.165.16.184;1677384893;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/0-1.html;
46.165.16.184;1677385000;Chrome 10+;Linux;https://tk-ligat.ru/tovar_cat/0-1.html;
46.165.16.184;1677411508;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/1652;
46.165.16.184;1677417938;Firefox 10+;Linux;https://tk-ligat.ru/tovar_show/1652;
46.165.16.184;1677418106;Firefox 10+;Linux;https://tk-ligat.ru/new_find/;
46.165.16.184;1677419885;Firefox 10+;Linux;https://tk-ligat.ru/tovar_cat/0-1.html;
46.165.16.184;1677419897;Firefox 10+;Linux;https://tk-ligat.ru/tovar_cat/0-25.html;
1 46.165.16.184 1677384893 Chrome 10+ Linux https://tk-ligat.ru/tovar_cat/0-1.html
2 46.165.16.184 1677385000 Chrome 10+ Linux https://tk-ligat.ru/tovar_cat/0-1.html
3 46.165.16.184 1677411508 Firefox 10+ Linux https://tk-ligat.ru/tovar_show/1652
4 46.165.16.184 1677417938 Firefox 10+ Linux https://tk-ligat.ru/tovar_show/1652
5 46.165.16.184 1677418106 Firefox 10+ Linux https://tk-ligat.ru/new_find/
6 46.165.16.184 1677419885 Firefox 10+ Linux https://tk-ligat.ru/tovar_cat/0-1.html
7 46.165.16.184 1677419897 Firefox 10+ Linux https://tk-ligat.ru/tovar_cat/0-25.html

View File

@ -11,7 +11,7 @@ require_once 'api/php/json.php';
require_once 'api/php/core.php';
require_once 'api/php/clean.php';
require_once 'set/' . $_SERVER['SERVER_NAME'] . '.php';
#if (file_exists('set/install/install_' . $db['type'] . '.php'))require_once 'set/install/install_' . $db['type'] . '.php';
if (file_exists('set/install/install_' . $db['type'] . '.php'))require_once 'set/install/install_' . $db['type'] . '.php';
/* ----------------------------------------------------------------------
09.12.2022
Выбираем модуль по умолчанию
@ -19,6 +19,9 @@ require_once 'set/' . $_SERVER['SERVER_NAME'] . '.php';
$authModule = \core::getSettings( 'default_mod_auth' );
$mod = ( $authModule ? $authModule : \core::getSettings( 'default_mod' ) );
define( 'MOD', ( @$_GET['mod'] ? $_GET['mod'] : $mod ) );
//Инсталлятор модулей
if (file_exists('set/install/' . MOD . '_' . $db['type'] . '.php'))require_once 'set/install/' . MOD . '_' . $db['type'] . '.php';
/* ----------------------------------------------------------------------
09.12.2022
Определяем город
@ -44,6 +47,14 @@ $smarty -> assign( 'cart', $cart );
if ($_SERVER['SERVER_NAME']=='tk-ligat.ru')$smarty -> assign( 'menu_internet_magazin', \DB::getAll( "SELECT * FROM `tovar_category` WHERE `category`=0 AND `status`=1" ) );
if ($_SERVER['SERVER_NAME']=='v.yurecnt.ru')$smarty -> assign( 'menu_internet_magazin', \DB::getAll( "SELECT * FROM `tovar_category` WHERE `category`=1 AND `status`=1" ) );
/* ----------------------------------------------------------------------
26.02.2023
Получаем количество товара в корзин
---------------------------------------------------------------------- */
$smarty -> assign( 'kolvo_tovar_in_cart', \DB::getAll("SELECT COUNT(*) FROM `cart` WHERE `user_id`=?", ($_SESSION['user_id'])?$_SESSION['user_id']:session_id() )[0]['COUNT(*)'] );
/* ----------------------------------------------------------------------
09.12.2022

View File

@ -40,7 +40,123 @@ return $pass;}
$a=file_get_contents('nix.xml');
#print_r(html_to_obj($a['children'][0]['children'][0])); 337854
/*
$xml = simplexml_load_string($a, "SimpleXMLElement", LIBXML_NOCDATA);
$json = json_encode($xml);
$array = json_decode($json,TRUE);
print_r ($array);
*/
function XMLtoArray($xml) {
$previous_value = libxml_use_internal_errors(true);
$dom = new DOMDocument('1.0', 'UTF-8');
$dom->preserveWhiteSpace = false;
$dom->loadXml($xml);
libxml_use_internal_errors($previous_value);
if (libxml_get_errors()) {
return [];
}
return DOMtoArray($dom);
}
function DOMtoArray($root) {
$result = array();
if ($root->hasAttributes()) {
$attrs = $root->attributes;
foreach ($attrs as $attr) {
$result['@attributes'][$attr->name] = $attr->value;
}
}
if ($root->hasChildNodes()) {
$children = $root->childNodes;
if ($children->length == 1) {
$child = $children->item(0);
if (in_array($child->nodeType,[XML_TEXT_NODE,XML_CDATA_SECTION_NODE])) {
$result['_value'] = $child->nodeValue;
return count($result) == 1
? $result['_value']
: $result;
}
}
$groups = array();
foreach ($children as $child) {
if (!isset($result[$child->nodeName])) {
$result[$child->nodeName] = DOMtoArray($child);
} else {
if (!isset($groups[$child->nodeName])) {
$result[$child->nodeName] = array($result[$child->nodeName]);
$groups[$child->nodeName] = 1;
}
$result[$child->nodeName][] = DOMtoArray($child);
}
}
}
return $result;
}
$xml = $a;
$b=XMLtoArray($xml);
$tovar=$b['yml_catalog'][1]['shop']['offers']['offer'];
for ($i=0; $i<count($tovar); $i++){
unset($artikul);
unset($id_tovar);
$artikul=$tovar[$i]['@attributes']['id'];
$id_tovar=DB::getValue("SELECT `id` FROM `tovar` WHERE `artikul`=? LIMIT 1", $artikul);
if ($id_tovar){
//Собираем характеристики
$hars=$tovar[$i]['param'];
for ($j=0;$j<count($hars);$j++){
$tip_har = $hars[$j]['@attributes']['name'];
$har = $hars[$j]['_value'];
echo $tip_har . "\n";
$id_sp_har=DB::getValue("SELECT `id` FROM `tovar_har_sp` WHERE `txt`=? LIMIT 1", $tip_har);
if (!$id_sp_har)$id_sp_har = DB::add("INSERT INTO `tovar_har_sp` (`txt`) VALUES (?)", $tip_har);
echo $id_sp_har . "\n";
DB::add("INSERT INTO `tovar_har` (`tovar_har_sp_id`, `tovar_id`, `txt`) VALUES (?, ?, ?)",
array(
$id_sp_har,
$id_tovar, $har
)
);
}
}
unset($hars);
unset($tip_har);
unset($har);
}
//print_r($hars);
/*#print_r(html_to_obj($a['children'][0]['children'][0])); 337854
$b=html_to_obj($a);
//print_r($b['children'][0]['children'][0]['children'][0]['children'][5]['children']);
@ -100,5 +216,5 @@ if ($id_tovar){
}
*/
?>

View File

@ -4,6 +4,101 @@
*/
\DB::set("CREATE TABLE IF NOT EXISTS `users` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`login` varchar(50) DEFAULT NULL,
`email` varchar(100) DEFAULT NULL,
`pwd` varchar(50) DEFAULT NULL,
`act` tinyint(1) DEFAULT 1,
`actcode` varchar(10) DEFAULT NULL,
`site` varchar(256) DEFAULT NULL,
`ip` varchar(256) DEFAULT NULL,
`regdata` varchar(256) DEFAULT NULL,
`lostdata` varchar(256) DEFAULT NULL,
`ref` int(10) DEFAULT NULL,
`repa` int(10) DEFAULT NULL,
`reg_ip` varchar(20) DEFAULT NULL,
`ava` varchar(20) DEFAULT NULL,
`balans` longtext DEFAULT NULL,
`pd` varchar(1) DEFAULT NULL,
`yad` longtext DEFAULT NULL,
`qiwi` longtext DEFAULT NULL,
`fio` varchar(255) DEFAULT NULL,
`tel` varchar(255) DEFAULT NULL,
`adres` varchar(255) DEFAULT NULL,
`org` varchar(255) DEFAULT NULL,
`dostup` varchar(1) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;");
\DB::set("ALTER TABLE `users` ADD `dostup` varchar(1) COLLATE 'utf8_general_ci' NULL;");
\DB::set("CREATE TABLE IF NOT EXISTS `site_speed` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`t` varchar(40) DEFAULT NULL,
`mod` varchar(20) DEFAULT NULL,
`mod_id` varchar(20) DEFAULT NULL,
`speed` double DEFAULT NULL,
`user_id` varchar(30) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;");
\DB::set("CREATE TABLE IF NOT EXISTS `pages` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`title` varchar(250) DEFAULT NULL,
`txt` longtext DEFAULT NULL,
`t` varchar(30) DEFAULT NULL,
`keywords` text DEFAULT NULL,
`alias` varchar(200) DEFAULT NULL,
`description` text DEFAULT NULL,
`status` int(1) DEFAULT NULL,
`category` int(10) DEFAULT NULL,
`user_id` int(10) DEFAULT NULL,
`d` varchar(30) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
CONSTRAINT `pages_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;");
\DB::set("CREATE TABLE IF NOT EXISTS `pages_category` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`title` varchar(250) DEFAULT NULL,
`keywords` text DEFAULT NULL,
`description` text DEFAULT NULL,
`status` int(1) DEFAULT 1,
`category` int(10) DEFAULT NULL,
`user_id` int(10) DEFAULT NULL,
`reyt` int(10) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
CONSTRAINT `pages_category_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;");
/*
\DB::set("CREATE TABLE IF NOT EXISTS `tovar_history` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`session_id` varchar(30) DEFAULT NULL,
`tovar_id` int(10) DEFAULT NULL,
`t` varchar(30) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `tovar_id` (`tovar_id`),
CONSTRAINT `tovar_history_ibfk_1` FOREIGN KEY (`tovar_id`) REFERENCES `tovar` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;");
\DB::set("CREATE TABLE IF NOT EXISTS `tovar` (
`id` int(10)NULL,
@ -34,7 +129,7 @@
`title` varchar(300) NULL,
`alt` varchar(300) NULL);");
/*
\DB::set("CREATE TABLE IF NOT EXISTS `blog_category` (
`id` int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,

View File

@ -0,0 +1,92 @@
<?php
\DB::set("CREATE TABLE IF NOT EXISTS `tovar` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`title` varchar(300) DEFAULT NULL,
`txt` longtext DEFAULT NULL,
`keywords` longtext DEFAULT NULL,
`artikul` varchar(50) DEFAULT NULL,
`description` longtext DEFAULT NULL,
`tovar_id_1c` varchar(100) DEFAULT NULL,
`tovar_cat_1c` varchar(100) DEFAULT NULL,
`status` int(1) DEFAULT NULL,
`category` int(10) DEFAULT NULL,
`countImg` int(2) DEFAULT NULL,
`partner` varchar(100) DEFAULT NULL,
`json` longtext DEFAULT NULL,
`brand_id` int(10) DEFAULT NULL,
`check_img` int(1) DEFAULT NULL,
`code` varchar(30) DEFAULT NULL,
`linkimg` longtext DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;");
\DB::set("CREATE TABLE IF NOT EXISTS `cart` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`kolvo` int(9) DEFAULT NULL,
`t` varchar(30) DEFAULT NULL,
`tovar_id` int(10) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `tovar_id` (`tovar_id`),
CONSTRAINT `cart_ibfk_1` FOREIGN KEY (`tovar_id`) REFERENCES `tovar` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;");
\DB::set("CREATE TABLE IF NOT EXISTS `tovar_barcode` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`barcode` varchar(20) DEFAULT NULL,
`tovar_id` int(10) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `tovar_id` (`tovar_id`),
CONSTRAINT `tovar_barcode_ibfk_2` FOREIGN KEY (`tovar_id`) REFERENCES `tovar` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;");
\DB::set("CREATE TABLE IF NOT EXISTS `tovar_har_sp`(
`id` int(11) NOT NULL AUTO_INCREMENT,
`txt` varchar(200) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;");
\DB::set("CREATE TABLE IF NOT EXISTS `tovar_har` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`tovar_har_sp_id` int(11) DEFAULT NULL,
`tovar_id` int(10) DEFAULT NULL,
`txt` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `tovar_har_sp_id` (`tovar_har_sp_id`),
KEY `tovar_id` (`tovar_id`),
CONSTRAINT `tovar_har_ibfk_1` FOREIGN KEY (`tovar_har_sp_id`) REFERENCES `tovar_har_sp` (`id`),
CONSTRAINT `tovar_har_ibfk_2` FOREIGN KEY (`tovar_id`) REFERENCES `tovar` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;");
\DB::set("CREATE TABLE IF NOT EXISTS `tovar_otzyv` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`user_id` int(10) NOT NULL,
`t` varchar(30) NOT NULL,
`txt` longtext NOT NULL,
`tovar_id` int(10) NOT NULL,
`status` int(1) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
KEY `tovar_id` (`tovar_id`),
CONSTRAINT `tovar_otzyv_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`),
CONSTRAINT `tovar_otzyv_ibfk_2` FOREIGN KEY (`tovar_id`) REFERENCES `tovar` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;");
\DB::set("CREATE TABLE IF NOT EXISTS `tovar_history` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`session_id` varchar(30) DEFAULT NULL,
`tovar_id` int(10) DEFAULT NULL,
`t` varchar(30) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `tovar_id` (`tovar_id`),
CONSTRAINT `tovar_history_ibfk_1` FOREIGN KEY (`tovar_id`) REFERENCES `tovar` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;");
?>

View File

@ -226,7 +226,7 @@
<li>
<a href="/cart/">
<i class="icon-shopping-cart"></i>
<span class="wishlist-item-count pos-absolute">{$cart_count}</span>
<span class="wishlist-item-count pos-absolute">{$kolvo_tovar_in_cart}</span>
</a>
</li>
<!-- End Header Add Cart Box -->

View File

@ -152,7 +152,7 @@
{$plugins}
<script src="/api/jquery/plugins/lazyload/jquery.lazyload.min1.9.5.js"></script>
<script src="js/js.js"></script>
{$js_mod}
<script src="/api/modules/{$smarty.const.MOD}/mod.js"></script>
</body>
</html>

View File

@ -82,16 +82,27 @@
<div class="row">
<!-- Logo -->
<div class="navbar-logo col-md-3 col-sm-12 col-xs-7">
<a href="/"><img src="img/logo.png" title="virtual-nt.ru" alt="virtual-nt"></a>
<a href="/"><img src="img/logo.png" title="virtual-nt.ru" alt="virtual-nt" style="margin-top: -15px;"></a>
</div>
<!-- //end Logo -->
<!-- Search -->
<div id="sosearchpro" class="col-xs-12 col-sm-8 col-md-5 search-pro">
<form method="GET" action="index.html">
{*
<form class="header-search m-tb-15" action="#" method="post">
<div class="header-search__content pos-relative">
<input type="search" name="header-search" placeholder="Поиск" required>
<button class="pos-absolute" type="submit"><i class="icon-search"></i></button>
</div>
</form>
*}
<form method="post" action="#" class="header-search m-tb-15">
<div id="search0" class="search input-group">
<input class="autosearch-input form-control" type="text" value="" size="50" autocomplete="off" placeholder="Search product..." name="search">
<input class="autosearch-input form-control" type="text" value="" size="50" autocomplete="off" placeholder="Поиск..." name="search" required>
<span class="input-group-btn">
<button type="submit" class="button-search btn btn-primary" name="submit_search"><i class="fa fa-search"></i></button>
</span>
@ -112,7 +123,7 @@
<a data-loading-text="Loading..." class="top_cart dropdown-toggle" data-toggle="dropdown">
<div class="shopcart">
<span class="handle pull-left"></span>
<span class="number-shopping-cart">2</span>
<span class="number-shopping-cart">{$kolvo_tovar_in_cart}</span>
<span class="title">My Cart</span>
<p class="text-shopping-cart cart-total-full"> $0.00 </p>
</div>
@ -683,7 +694,7 @@
</header>
<!-- //Header Container -->
{if ($smarty.get.mod!='tovar_show')}
{if ($smarty.get.mod!='tovar_show' && $smarty.get.mod!='login' && $smarty.get.mod!='page') }
<!-- Block Spotlight1 -->
<section class="so-spotlight1 ">
<div class="container">

View File

@ -615,7 +615,7 @@
<div class="right-block">
<div class="caption">
<h4><a href="product.html">Dummy product #07</a></h4>
<div class="ratings">
<!--div class="ratings">
<div class="rating-box">
<span class=""><i class="fa fa-star "></i></span>
<span class=""><i class="fa fa-star "></i></span>
@ -623,7 +623,7 @@
<span class=""><i class="fa fa-star "></i></span>
<span class="gray"><i class="fa fa-star "></i></span>
</div>
</div>
</div -->
<div class="price">
<span class="price-new">$74.00</span>
@ -676,7 +676,7 @@
<div class="right-block">
<div class="caption">
<h4><a href="product.html">Dummy product #08</a></h4>
<div class="ratings">
<!-- div class="ratings">
<div class="rating-box">
<span class=""><i class="fa fa-star "></i></span>
<span class=""><i class="fa fa-star "></i></span>
@ -684,7 +684,7 @@
<span class=""><i class="fa fa-star "></i></span>
<span class="gray"><i class="fa fa-star "></i></span>
</div>
</div>
</div -->
<div class="price">
<span class="price-new">$74.00</span>
@ -737,7 +737,7 @@
<div class="right-block">
<div class="caption">
<h4><a href="product.html">Dummy product #09</a></h4>
<div class="ratings">
<!-- div class="ratings">
<div class="rating-box">
<span class=""><i class="fa fa-star "></i></span>
<span class=""><i class="fa fa-star "></i></span>
@ -745,7 +745,7 @@
<span class=""><i class="fa fa-star "></i></span>
<span class="gray"><i class="fa fa-star "></i></span>
</div>
</div>
</div -->
<div class="price">
<span class="price-new">$74.00</span>

View File

@ -18,25 +18,25 @@
<div class="product-view row">
<div class="left-content-product col-lg-12 col-xs-12">
<div class="row">
<div class="content-product-left class-honizol col-md-4 col-sm-12 col-xs-12 ">
<div class="content-product-left class-honizol col-md-5 col-sm-12 col-xs-12 ">
<div class="large-image ">
<img itemprop="image" class="product-image-zoom"
src="/img/{$smarty.server.SERVER_NAME}/tovar/{$imagesTovar[0]['filename']}.jpg"
data-zoom-image="/img/{$smarty.server.SERVER_NAME}/tovar/{$imagesTovar[0]['filename']}.jpg"
title="Bint Beef" alt="Bint Beef">
src="/img/{$smarty.server.SERVER_NAME}/tovar/square/{$imagesTovar[0]['filename']}.jpg"
{* data-zoom-image="/img/{$smarty.server.SERVER_NAME}/tovar/{$imagesTovar[0]['filename']}.jpg" *}
title="{$page[0].title}" alt="{$page[0].title}" style="width: 100%;">
</div>
<div id="thumb-slider"
class="owl-theme owl-loaded owl-drag full_slider owl-carousel " data-nav='yes'
data-loop="no" data-margin="10" data-items_xs="2" data-items_sm="3"
data-items_md="4">
data-items_md="3">
{section name=customer loop=$imagesTovar} {if $imagesTovar[customer].id}
<a data-index="0" class="img thumbnail "
data-image="/img/{$smarty.server.SERVER_NAME}/tovar/{$imagesTovar[customer]['filename']}.jpg" title="Bint Beef">
<img src="/img/{$smarty.server.SERVER_NAME}/tovar/{$imagesTovar[customer]['filename']}.jpg" title="Bint Beef"
alt="Bint Beef">
<a data-index="{$customer}" class="img thumbnail "
data-image="/img/{$smarty.server.SERVER_NAME}/tovar/square/{$imagesTovar[customer]['filename']}.jpg" title="{$page[0].title}">
<img src="/img/{$smarty.server.SERVER_NAME}/tovar/square/{$imagesTovar[customer]['filename']}.jpg" title="{$page[0].title}"
alt="{$page[0].title}" class="yurec-thumbnail">
</a>
@ -93,9 +93,10 @@
<div class="option quantity">
<div class="input-group quantity-control" unselectable="on"
style="-webkit-user-select: none;">
<label>Qty: </label>
<input class="form-control" type="text" name="quantity" value="1">
<label>Количество: </label>
<input class="form-control" type="text" name="quantity" value="1" id="number">
<input type="hidden" name="product_id" value="50">
<input type="hidden" id="pages_id" value="{$smarty.get.id}">
<span class="input-group-addon product_quantity_down"><i
class="fa fa-angle-down" aria-hidden="true"></i></span>
<span class="input-group-addon product_quantity_up"><i
@ -106,10 +107,10 @@
<div class="info-product-right">
<div class="cart">
<input type="button" data-toggle="tooltip" title=""
value="Add to Cart" data-loading-text="Loading..."
id="button-cart" class="btn btn-mega btn-lg"
value="Купить" data-loading-text="Loading..."
id="button-cart" class="btn btn-mega btn-lg btn-add-to-cart"
onclick="cart.add('42', '1');"
data-original-title="Add to Cart">
data-original-title="Купить">
</div>
<!-- div class="add-to-links wish_comp">
<ul class="blank list-inline">
@ -163,25 +164,47 @@
</li>
<li class="item_nonactive "><a data-toggle="tab"
href="#tab-2">Отзывы</a></li>
<li class="item_nonactive "><a data-toggle="tab"
href="#tab-3">Вопросы по товару</a></li>
</ul>
<div class="tab-content col-xs-12">
<div id="tab-1" class="tab-pane fade active in">
<p>
The 30-inch Apple Cinema HD Display delivers an amazing 2560 x
1600 pixel resolution. Designed specifically for the creative
professional, this display provides more space for easier access
to all the tools and palettes needed to edit, format and
composite your work. Combine this display with a Mac Pro,
MacBook Pro, or PowerMac G5 and there's no limit to what you can
achieve. <br>
<br>
</p>
<table class="table">
{section name=customer loop=$har} {if $har[customer].id}
<tr>
<td>{$har[customer].opt}</td>
<td>{$har[customer].txt}</td>
</tr>
{/if} {/section}
</table>
</div>
<div id="tab-2" class="tab-pane fade in">
{if $smarty.session.user_id}
<form>
<textarea class="form-control" placeholder="Оставьте отзыв!" style="height: 200px;"></textarea>
<button class="btn btn-primary" type="button" style="padding: 10px;">Добавить</button>
</form>
{/if}
</div>
<div id="tab-3" class="tab-pane fade in">
</div>
<div id="tab-2" class="tab-pane fade in"></div>
</div>
</div>
</div>

View File

@ -1,3 +1,12 @@
//Костыль для виртуала - в карточке товара показ других картинок
$(".yurec-thumbnail").click(function(){
$(".product-image-zoom").attr('src', $(this).attr('src'));
})
$(function(){
$("a.ancLinks").click(function(){
var elementClick=$(this).attr("href");

View File

@ -773,7 +773,7 @@ $(document).ready(function() {
});
})
var zoomCollection = '.large-image img';
/*var zoomCollection = '.large-image img';
$( zoomCollection ).elevateZoom({
zoomType : "inner",
lensSize :"200",
@ -782,13 +782,13 @@ $(document).ready(function() {
cursor: 'pointer',
loadingIcon: '../destino/img/theme/lazy-loader.gif',
galleryActiveClass: "active"
});
$('.large-image').magnificPopup({
});*/
/*$('.large-image').magnificPopup({
items: [
{src: 'img/demo/shop/product/resize/product-1.jpg' },
{src: 'img/demo/shop/product/resize/product-2.jpg' },
{src: 'img/demo/shop/product/resize/product-3.jpg' },
{src: 'img/demo/shop/product/resize/product-4.jpg' },
//{src: 'img/demo/shop/product/resize/product-1.jpg' },
//{src: 'img/demo/shop/product/resize/product-2.jpg' },
//{src: 'img/demo/shop/product/resize/product-3.jpg' },
//{src: 'img/demo/shop/product/resize/product-4.jpg' },
],
gallery: { enabled: true, preload: [0,2] },
type: 'image',
@ -801,7 +801,7 @@ $(document).ready(function() {
magnificPopup.goTo(activeIndex);
}
}
});
});*/
$("#thumb-slider .thumbnail").each(function() {
$(this).find("[data-index='0']").addClass('active');
});

View File

@ -2,5 +2,5 @@
git add .
#git commit -m $(date "+%Y-%m-%d")
git commit -m "virtual"
git commit -m "Инсталлятор + парсер характеристик виртуала"
git push -u origin master