Beispiel #1
0
 function getOldPrice($full_id = '')
 {
     $old_price = 0;
     if ($this->get('skidka') > 0 && Ishop::gI()->sets['mod_skidki_product'] || Ishop::gI()->get_cumulative_discount() > 0) {
         //товары со скидкой
         $prod_info = explode('_', $full_id);
         $prod_id = $prod_info[0];
         if ($this->paramNotEmpty('param_palitra') && !empty($prod_info[1])) {
             $old_price = Ishop::gI()->get_palopts(1, $prod_info[1] - 1, $this->data['param_palitra']);
             //изменяемая цена (палитра)
         } else {
             $old_price = $this->data['tsena'];
             //цена
         }
     } elseif ($this->get('param_starayatsena') > 0 && Ishop::gI()->sets['mod_old_price']) {
         //старая цена
         $old_price = $this->get('param_starayatsena');
     }
     return $old_price;
 }
    ?>
ishop/add_vs/' + $(this).attr('prd'),
						cache: true,
						success: function(html){
							$('.count_vs').html(html);
						}
					});
				});
			});
		</script>
	<?php 
}
?>

	<?php 
if (Ishop::gI()->sets['show_kolvo']) {
    ?>
		<script>

		$.support.selectstart = "onselectstart" in document.createElement("div");
		$.fn.disableSelection = function() {
			return this.bind( ( $.support.selectstart ? "selectstart" : "mousedown" ) +	".ui-disableSelection", function( event ) {
				event.preventDefault();
			});
		};

		$(".noselect").disableSelection();



		$('.kolvo_arrow_up').click(function() {
Beispiel #3
0
		<td colspan="4" style="text-align: right;">Сумма:</td>
		<td><?php 
    echo $this->s_price($summa);
    ?>
</td>
	</tr>
	
	<?php 
    if ($this->sets['mod_skidki_summa'] && $this->get_summa_zakaz_discount($summa) > 0) {
        ?>
	<tr>
		<td colspan="4" style="text-align: right;"><?php 
        echo lg('Скидка от суммы заказа');
        ?>
 (<span><?php 
        echo Ishop::gI()->get_summa_zakaz_discount($summa);
        ?>
</span>%):</td>
		<td>
			<?php 
        echo $this->s_price($summa * $this->get_summa_zakaz_discount($summa) / 100);
        ?>
		</td>
	</tr>		
	<?php 
    }
    ?>
	
	<?php 
    if ($this->sets['mod_cards'] && isset($_SESSION['card_nomer']) && $this->card > 0) {
        ?>
Beispiel #4
0
}
?>
</div>



<?php 
//Вывод прикрепленных товаров
if (file_exists('modules/ishop')) {
    $products = $this->db->get_rows("SELECT product_id FROM " . TABLE_PRODUCT_TO_NEWS . " WHERE news_id=" . intval($_GET['id']));
    if (count($products)) {
        $arr = array();
        foreach ($products as $product) {
            $arr[] = $product['product_id'];
        }
        echo Ishop::gI()->news_to_products($arr);
    }
}
?>


<?php 
if (1 != 1) {
    function get_blog_cmt($parent_id = 0)
    {
        $db = Site::gI()->db;
        ob_start();
        ?>
	<div class="<?php 
        if ($parent_id != 0) {
            ?>
Beispiel #5
0
?>
</div></div>
	</div>
	
	<div class="filter_block">
		<div class="filter_top">Цвет</div>
		<div class="filter_mid"><div style="padding: 5px;"><?php 
echo Ishop::gI()->get_flt_check('param_tsvet');
?>
</div></div>
	</div>
	
	<div class="filter_block">
		<div class="filter_top">Размер</div>
		<div class="filter_mid"><div style="padding: 5px;"><?php 
echo Ishop::gI()->get_flt_select('param_razmer');
?>
</div></div>
	</div>
	
	<input type="hidden" name="la_grande_cate" value="1">
	
	<div class="poiskat">
		<div class="button button1" onclick="$(this).parents('form').submit();">Искать</div>
		<input type="hidden" value="" name="p999" />
	</div>
</form>
</div>

<script>
$(function(){
Beispiel #6
0
$form_data = array('fio' => array('Представьтесь', 'text', 1), 'tel' => array('Ваш телефон', 'phone', 1), 'email' => array('Электронная почта', 'email', 1), array('Сообщение', 'textarea', 0));
$form = '';
/* вставка формы обратной связи */
if (!empty($sets['allow_feedback']) && !isset($_POST['order_call_form'])) {
    $form = Site_Sitemenu::gI()->add_feedback($ebox['id_feedback'], $ebox['email'], $form_data);
}
if (empty($content['path']) || $content['path'] == '') {
    $site->_404();
}
if (!empty($content['html'])) {
    $content['html'] = fix_content($content['html']);
}
l('index');
$content['html'] = $content['html'] . $form;
if (is_ajax() && empty($_POST)) {
    $content['html'] = (class_exists('Ishop') && $sets['mod_spec'] && $_SERVER['REQUEST_URI'] == '/' ? Ishop::gI()->filteredProducts('spec', $sets['count_spec']) : '') . fix_content($content['html']);
    $content['url'] = SITE_URL . substr($_SERVER['REQUEST_URI'], 1);
    echo json_encode($content);
    exit;
}
/* подключение файла с версткой */
$ind_file = TEMP_FOLDER . 'html/i.php';
if (file_exists($ind_file)) {
    require TEMP_FOLDER . 'config.php';
    include $ind_file;
    //$c = ob_get_contents();
    //ob_end_clean();
    //echo str_replace("\n", "", str_replace("\r", "", str_replace("\t", "", $c)));
} else {
    header('HTTP/1.1 503 Service temporary down');
    die("Отсутствует файл " . $ind_file . "");
Beispiel #7
0
<?php

if ($_GET['module'] == 'ishop') {
    $content = Ishop::gI()->get();
}
Beispiel #8
0
        $text = substr2($text, 500);
        ?>
			<p style="padding-bottom: 5px;"><?php 
        echo $text;
        ?>
</p>
		<?php 
    }
    ?>
		
		<?php 
    if (!empty($row['tsena'])) {
        ?>
			<p style="padding-bottom: 5px;">Цена: <?php 
        echo Ishop::gI()->s_price($row['tsena']);
        ?>
</p>
			<?php 
        echo Ishop::gI()->view('ishop/buy_button', array('product' => new Product($row)));
        ?>
<p></p>
		<?php 
    }
    ?>
	</div>
<?php 
    if ($key > $page_content['end']) {
        break;
    }
}
echo get_pages(array('class' => 'prd_pages_bottom', 'count_pages' => $pages, 'curr_page' => $_GET['page'], 'link' => 'search/' . $string . '/'));
Beispiel #9
0
 public static function gI()
 {
     if (self::$instance === null) {
         self::$instance = new self();
     }
     if (self::$instance->ml == 0 && !empty($_GET['id'])) {
         self::$instance->get_menu($_GET['id'], self::$instance->getMenuRows());
         self::$instance->ml = 1;
     }
     return self::$instance;
 }
Beispiel #10
0
<?php

if (!empty($_POST['ajax']) && $_POST['ajax'] == 1) {
    if (!empty($_POST['prd_id'])) {
        $_GET['id'] = $_POST['prd_id'];
        $path = '';
        $html = '';
        $product = $db->get(TABLE_PRODUCTS, $_GET['id']);
        if (count($product) > 0) {
            $db->query("UPDATE " . TABLE_PRODUCTS . " SET views=views+1 where `id` = '" . $_GET['id'] . "'");
            $html = Ishop::gI()->view('ishop/product', array('product' => $product, 'sets' => Site::gI()->sets));
            $path = Ishop::gI()->get_path($product['cat_id']);
            $path = $path . ' » <span class="curr_page">' . htmlspecialchars($product['title']) . '</span>';
        }
        $content = array('html' => $html, 'meta_title' => !empty($product['title']) ? $product['metatitle'] : '', 'meta_keys' => !empty($product['metakeys']) ? $product['metakeys'] : '', 'meta_desc' => !empty($product['metadesc']) ? $product['metadesc'] : '', 'path' => $path);
        echo json_encode($content);
    }
    exit;
}
Beispiel #11
0
 function common_left_menu($parent_id1 = 0, $all_open = 0, $level = 0)
 {
     $level++;
     $ishop_rows = '';
     if (class_exists('Ishop')) {
         $ishop_rows = $this->db->get_rows("SELECT title, vlink, id, parent_id, link FROM " . TABLE_CATEGORIES . " WHERE parent_id = " . $parent_id1 . " && visible = 1 && enabled = 1 ORDER BY sort ASC");
     }
     $left_menu = '';
     if (count($ishop_rows) > 0 && class_exists('Ishop')) {
         $left_menu .= '<div class="nav_left"><ul class="menu_level_' . $level . '">';
         if (count($ishop_rows) > 0 && class_exists('Ishop')) {
             foreach ($ishop_rows as $row) {
                 $row['type'] = 'ishop';
                 if (!empty($row['title'])) {
                     $class = '';
                     $link = ' href="' . Ishop::gI()->link($row['id']) . '"';
                     if (Ishop::gI()->is_active($row)) {
                         $link = '';
                     }
                     if (Ishop::gI()->is_selected($row)) {
                         $class = ' class="selected"';
                     }
                     $cd = !empty(Ishop::gI()->menu[$row['id']]) ? Ishop::gI()->cnt_htd($row['id']) : 0;
                     $left_menu .= '<li' . $class . '>';
                     $left_menu .= '<a' . $link . '>' . $row['title'] . '</a>';
                     if ($cd > 0 && (Ishop::gI()->is_selected($row) || $all_open)) {
                         $left_menu .= Ishop::gI()->left_menu($row['id'], $all_open, $level);
                     }
                     $left_menu .= '</li>';
                 }
             }
         }
         $left_menu .= '</ul></div>';
     }
     return $left_menu;
 }
Beispiel #12
0
    foreach ($_POST['PARAM_NAME'] as $each) {
        $temp[] = 'PARAM_NAME = ' . quote_smart($each);
    }
    $sr[] = '(' . implode(' || ', $temp) . ')';
}
if (!empty($_POST['param_brend'])) {
    $temp = '';
    foreach ($_POST['param_brend'] as $each) {
        $temp[] = 'param_brend = ' . quote_smart($each);
    }
    $sr[] = '(' . implode(' || ', $temp) . ')';
}
if (!empty($_POST['la_grande_cate'])) {
    //категория+подкатегории
    $cat_ids[] = $_POST['la_grande_cate'];
    $cat_ids = array_merge($cat_ids, Ishop::gI()->select_subcats($_POST['la_grande_cate']));
    foreach ($cat_ids as $each) {
        $temp[] = 'cat_id = ' . quote_smart($each);
    }
    $sr[] = '(' . implode(' || ', $temp) . ')';
}
$_POST['search_str'] .= @implode(' && ', $sr);
//die(print_r('->  '.$_POST['search_str'].'  <-'));
///
$prd_list = '';
//СОРТИРОВКА
$sort_params = array('0' => array('name' => 'title', 'descr' => 'названию', 'sort' => 'asc'), '1' => array('name' => 'tsena', 'descr' => 'цене', 'sort' => 'asc'), '2' => array('name' => 'views', 'descr' => 'популярности', 'sort' => 'desc'));
if ($this->sets['mod_sort'] && isset($_SESSION['sort'])) {
    $sort_string = $_SESSION['sort']['name'] . " " . $_SESSION['sort']['sort'];
} else {
    $sort_string = 'sort ASC, id ASC';
Beispiel #13
0
    ?>
	
	<tr>
		<td colspan="3" style="text-align: right;">Итого к оплате:</td>
		<td><?php 
    echo Ishop::gI()->s_price($summa * (100 - $skidka) / 100 + $dostavka[1]);
    ?>
</td>
	</tr>
	
	</table>
	
	
	<span class="order_ok_title">Возможно Вам также понадобится:</span><br>
	<?php 
    echo Ishop::gI()->filteredProducts('spec', 3, '');
    ?>
</div>

<?php 
} else {
    ?>
	<span class="order_ok_title">Спасибо за заказ!</span><br>
	Мы свяжемся с Вами в ближайшее время
	
<?php 
    $goods_c = "";
    $query_get_babki = "SELECT * FROM newsite_ishop_order ORDER BY id DESC LIMIT 1";
    //ВЫБИРАЕМ ИНФУ С БАЗЫ
    mysql_query('SET NAMES UTF8');
    if ($result_babki = mysql_query($query_get_babki)) {
Beispiel #14
0
    }
    if (!empty($delivery_cost)) {
        ?>
<local_delivery_cost><?php 
        echo $delivery_cost;
        ?>
</local_delivery_cost>
<?php 
    }
    ?>
<name><?php 
    echo htmlspecialchars(strip_tags($prd['title']));
    ?>
</name>
<description><?php 
    echo htmlspecialchars(strip_tags($prd['opisanie']));
    ?>
</description><?php 
    if (Ishop::gI()->sets['show_min_summa_zakaza'] && $prd['tsena'] < Ishop::gI()->sets['min_summa_zakaza']) {
        ?>
<sales_notes>минимальная сумма заказа (<?php 
        echo Ishop::gI()->sets['min_summa_zakaza'];
        ?>
 руб.)</sales_notes>
<?php 
        //<sales_notes>предоплата</sales_notes>
    }
    ?>
</offer>
<?php 
}
Beispiel #15
0
 public function getPhotoH($width = 0, $height = 0)
 {
     if (empty($width)) {
         $width = Ishop::gI()->image_width;
     }
     if (empty($height)) {
         $height = Ishop::gI()->image_height;
     }
     $photo = '<div class="product_photo">';
     $product_size = '';
     if (Ishop::gI()->sets['mod_p_size']) {
         $product_size = 'class="highslide" onclick="return hs.expand(this, config1 )"';
         if (Ishop::gI()->sets['cloud_zoom']) {
             $product_size = ' class="cloud-zoom" rel="zoomWidth: 360, zoomHeight: 400, adjustX: 40, adjustY: -15"';
         }
     }
     $link = '' . SITE_URL . 'imgtmp/orign_w/' . ($this->product->get('foto') ? $this->product->get('foto') : 'data/nophoto.jpg') . '';
     if (Ishop::gI()->resize_big_image) {
         $link = '<img src="' . SITE_URL . 'imgtmp/800_800_w/' . $this->product->get('foto') . '" width="800" height="800" title="' . $this->getTitle() . '">';
     }
     $photo .= '<a id="flink" ' . $product_size . ' href="' . $link . '">';
     $width_str = '';
     $height_str = '';
     if ($width != 'auto') {
         $width_str = ' width="' . $width . '" ';
     }
     if ($height != 'auto') {
         $height_str = ' height="' . $height . '" ';
     }
     $result_path = '';
     if (preg_match('/(http.*?\\/\\/)/i', $this->product->get('foto'))) {
         $src = file_get_contents($this->product->get('foto'));
         $source_path = preg_replace('/(http.*?\\/\\/)/i', '', $this->product->get('foto'));
         $source_path = preg_replace('/(\\..*?\\/)/i', '/', $source_path);
         $result_path = preg_replace('/(^.*?$)/i', 'data/$1', $source_path);
         if (!file_exists($result_path)) {
             $source_path_array = explode('/', $source_path);
             $break_point = count($source_path_array) - 1;
             $path = 'data/';
             foreach ($source_path_array as $id => $dir) {
                 if ($id == $break_point) {
                     break;
                 }
                 $dir = str_replace('//', '', $dir);
                 $path = $path . '/' . $dir;
                 $rs = @mkdir($path, 0777);
                 chmod($path, 0777);
             }
             file_put_contents($result_path, $src);
         }
     }
     if (file_exists($this->product->get('foto')) || file_exists($result_path)) {
         $photo .= '<img src="' . SITE_URL . '' . $this->product->get('foto') . '" style="min-height:20px; max-height:200px;" title="' . $this->getTitle() . '">';
     } else {
         $photo .= '<img src="' . SITE_URL . 'imgtmp/' . $width . '_' . $height . '_w/data/nophoto.jpg" ' . $width_str . $height_str . '>';
     }
     $photo .= '<div class="prod_options">';
     //иконки доп опций (скидка, хит, новинка)
     if (!isset($options['icon']) || $options['icon'] == 1) {
         if (Site::gI()->sets['mod_new']) {
             $photo .= $this->product->paramNotEmpty('new') ? ' <img class="new_m" vspace="0" hspace="0" src="' . TEMP_FOLDER . '/images/new.png">' : '';
         }
         if (Site::gI()->sets['mod_hit']) {
             $photo .= $this->product->paramNotEmpty('hit') ? ' <img class="hit_m" vspace="0" hspace="0" src="' . TEMP_FOLDER . '/images/hit.png">' : '';
         }
         if (Site::gI()->sets['mod_spec']) {
             $photo .= $this->product->paramNotEmpty('spec') ? ' <img class="skidka_m" vspace="0" hspace="0" src="' . TEMP_FOLDER . '/images/spec.png">' : '';
         }
     }
     $photo .= '</div></a></div>';
     return $photo;
 }
Beispiel #16
0
<div class="alter_block" style="color: auto">
<?php 
$show_all = '';
foreach ($rows as $key => $row) {
    if (!empty($row['vlink'])) {
        $link = $row['vlink'];
    } elseif ($row['type'] == 'ishop' && !empty(Ishop::gI()->sets['mod_proizv'])) {
        $ids = Ishop::gI()->get_path_ids($row['id']);
        if (in_array(Ishop::gI()->ebox['id_proizv'], $ids) || $row['id'] == Ishop::gI()->ebox['id_proizv']) {
            $link = 'ishop/brand/' . $row['id'];
        }
    } else {
        $link = $row['type'] . '/' . $row['id'];
    }
    $foto_style = !empty($row['foto']) && file_exists($row['foto']) ? ' min-height: 60px;' : '';
    ?>
	<div class="search_box" style="padding: 5px 5px 0px;<?php 
    echo $foto_style;
    ?>
">
		<h3 style="padding-bottom: 5px;"><a href="<?php 
    echo $link;
    ?>
"><?php 
    echo $row['title'];
    ?>
</a></h3>
		
		<?php 
    if (!empty($row['foto']) && file_exists($row['foto'])) {
        ?>
Beispiel #17
0
		<div class="top_menu_center">
			<div class="mid_1000">
					<div class="top_div top_div_left">
						<a id="top_phone_s">+7(985)509-43-09</a>
						<span id="skidki" class="callme_viewform">Заказать обратный звонок</span>
					</div>
					<div class="top_div top_div_mid">
						<!--ЛОГОТИП LOGO-->
							<a href="/"><img src="/templates/_shablon/images/logo_new.jpg" alt="marykay"/></a>
						<!--ЛОГОТИП LOGO-->
						<a href="/site/3" id="dost" title="Бесплатная доставка">БЕСПЛАТНАЯ ДОСТАВКА ЗАКАЗОВ ОТ 1000 <del>P</del></a>
					</div>
					<div class="top_div top_div_right">
							<div id="shop-cart">
								<?php 
echo Ishop::gI()->cart();
?>
							</div>
							<!--ПОИСК ПОИСК ПОИСК-->
						<div class="ya-site-form ya-site-form_inited_no"
							 onclick="return { 'action':'http://yandex.ru/search/site/','bg': 'transparent', 'target': '_blank', 'language': 'ru', 'suggest': true, 'tld': 'ru','usebigdictionary':true, 'publicname':'поиск по сайту marykay.tv', 'site_suggest': true, 'webopt': true, 'fontsize': 12, 'arrow': false, 'fg': '#000000', 'searchid': '2242710', 'logo': 'rb', 'websearch': false, 'type': 2}">
							<form action="http://yandex.ru/sitesearch" method="get">
								<input name="searchid" type="hidden" value="2242710"/>
								<input name="l10n" type="hidden" value="ru"/>
								<input name="reqenc" type="hidden"/>
								<input name="text" type="text"/>
								<input type="submit" value=""/>
							</form>
						</div>
						<!--ПОИСК ПОИСК ПОИСК-->
						<div style="clear: both"></div>
			<?php 
        }
        ?>
			
		<?php 
    }
    ?>
	
	<!--Кнопка "Добавить в корзину"-->
		<?php 
    require 'buy_button.php';
    ?>
	
</div>
<?php 
    if (Ishop::gI()->sets['mod_prd_vs_new']) {
        ?>
	
<script>
$('.sravnenie').each(function(){
	$(this).click(function(){
		$.ajax({
			url: '<?php 
        echo SITE_URL;
        ?>
ishop/add_vs/' + $(this).attr('prd'),
			cache: true,
			success: function(html){
				$('.count_vs').html(html);
			}
		});