JoomShopping - настройка и небольшая допилка

Небольшие заметки о html, css, sql, php

Модератор: Valery

Правила форума
Гость видит 250 символов 1 сообщения
Аватара пользователя
Valery
Без группы
Без группы
Сообщения: 22325
На борту с: 07.02.2005 10:00
Награды: 5
Из: Тридевятое царство

Решено JoomShopping - настройка и небольшая допилка

Сообщение Valery »

Jshopping - нормальный просмотр картинок превью - полное изображение с возможностью перелистывания. По умолчанию после клика ставится среднее изображение, клик по нему - большое, т.е. слишком много тыкать.

\components\com_jshopping\templates\default\product\product_default.php

Код: Выделить всё

<?php if ( (count($this->images)>1) || (count($this->videos) && count($this->images)) ) {?>
                <?php foreach($this->images as $k=>$image){?>
                    <img class="jshop_img_thumb" src="<?php print $this->image_product_path?>/<?php print $image->image_thumb?>" alt="<?php print htmlspecialchars($image->_title)?>" title="<?php print htmlspecialchars($image->_title)?>" onclick="showImage(<?php print $image->image_id?>)" />
Заменить на:

Код: Выделить всё

<!-- Превью -->
<?php if ( (count($this->images)>0) || (count($this->videos) && count($this->images)) ) {?>
                <?php foreach($this->images as $k=>$image){?>
					<a id="main_image_full_<?php print $image->image_id?>" href="<?php print $this->image_product_path?>/<?php print $image->image_full;?>" data-lightbox="0001" title="<?php print htmlspecialchars($image->_title)?>" target="_blank" rel="lightbox" >
                    <img class="image_thumb" src="<?php print $this->image_product_path?>/<?php print $image->image_thumb?>" alt="<?php print htmlspecialchars($image->_title)?>" title="<?php print htmlspecialchars($image->_title)?>" /></a>
Найти:

Код: Выделить всё

                <span id=list_product_image_middle>
                    <?php print $this->_tmp_product_html_body_image?>
                    
                    <?php if(!count($this->images)){?>
                        <img id = "main_image" src = "<?php print $this->image_product_path?>/<?php print $this->noimage?>" alt = "<?php print htmlspecialchars($this->product->name)?>" />
                    <?php }?>
                    
                    <?php foreach($this->images as $k=>$image){?>
                        <a class="lightbox" id="main_image_full_<?php print $image->image_id?>" href="<?php print $this->image_product_path?>/<?php print $image->image_full;?>" <?php if ($k!=0){?>style="display:none"<?php }?> title="<?php print htmlspecialchars($image->_title)?>">
                            <img id = "main_image_<?php print $image->image_id?>" src = "<?php print $this->image_product_path?>/<?php print $image->image_name;?>" alt="<?php print htmlspecialchars($image->_title)?>" title="<?php print htmlspecialchars($image->_title)?>" />
                            <div class="text_zoom">
                                <img src="<?php print $this->path_to_image?>search.png" alt="zoom" />
                                <?php print _JSHOP_ZOOM_IMAGE?>
                            </div>
                        </a>
                    <?php }?>
                </span>
Заменить на:

Код: Выделить всё

	        <span id=list_product_image_middle>
				<?php print $this->_tmp_product_html_body_image?>
				<?php if(!count($this->images)){?>
					<img id = "main_image" src = "<?php print $this->image_product_path?>/<?php print $this->noimage?>" data-lightbox="0001" alt = "50-<?php print htmlspecialchars($this->product->name)?>" title="<?php print htmlspecialchars($image->_title)?>" />
				<?php }?>
				<?php foreach($this->images as $k=>$image){?>
				<a id="main_image_full_<?php print $image->image_id?>" href="<?php print $this->image_product_path?>/<?php print $image->image_full;?>" <?php if ($k!=0){?>style="display:none"<?php }?> title="<?php print htmlspecialchars($image->_title)?>" target="_blank" data-lightbox="001" rel="lightbox" >
					<img id = "main_image_<?php print $image->image_id?>" src = "<?php print $this->image_product_path?>/<?php print $image->image_name;?>" class="main_image" alt="<?php print htmlspecialchars($image->_title)?>" title="<?php print htmlspecialchars($image->_title)?>" />
				</a>
				<?php }?>
            </span>
Последний раз редактировалось Valery 20.12.2015 09:58, всего редактировалось 1 раз.
По суше: велосипед, Соболь 4х4 самый западный и LR Defender 110.
Отдохнул – отчитайся, лучшее слово – дело.
Аватара пользователя
Valery
Без группы
Без группы
Сообщения: 22325
На борту с: 07.02.2005 10:00
Награды: 5
Из: Тридевятое царство

Re: Jshopping - интеграциия Jcomments

Сообщение Valery »

Интеграциия Jcomments

\com_jshopping\templates\default\product\review.php
Добавить в самом внизу:

Код: Выделить всё

<?php 
    $comments = JPATH_SITE./components/com_jcomments/jcomments.php;
    if (file_exists($comments)) {
        require_once($comments);
        print  JComments::showComments($this->product->product_id, com_jshopping, $this->product->name);
    }
?>
+ скопировать плагин "com_jshopping.plugin.php" в папку /components/com_jcomments/plugins
По суше: велосипед, Соболь 4х4 самый западный и LR Defender 110.
Отдохнул – отчитайся, лучшее слово – дело.
Аватара пользователя
Valery
Без группы
Без группы
Сообщения: 22325
На борту с: 07.02.2005 10:00
Награды: 5
Из: Тридевятое царство

Re: Jshopping - Вставка позиции модуля в товар

Сообщение Valery »

Вставка позиции модуля в товар:
product_default.php
После:
</form>
Добавить:

Код: Выделить всё

<?php
	jimport(joomla.application.module.helper);
	$mods = JModuleHelper::getModules(user5);
	echo JModuleHelper::renderModule($mods[0]);
?>
По суше: велосипед, Соболь 4х4 самый западный и LR Defender 110.
Отдохнул – отчитайся, лучшее слово – дело.
Аватара пользователя
Valery
Без группы
Без группы
Сообщения: 22325
На борту с: 07.02.2005 10:00
Награды: 5
Из: Тридевятое царство

Re: Jshopping -

Сообщение Valery »

factory.php

Код: Выделить всё

            $config->copyrightText = 
			<div align="center">
				<script type="text/javascri0"><!--
				google_ad_client = "ca-pub-0248011642297673";
				/* Новый оранжевый блок */
				google_ad_slot = "1488057763";
				google_ad_width = 468;
				google_ad_height = 60;
				//-->
				</script>
				<script type="text/javascri0"
				src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
				</script>
			</div>;
По суше: велосипед, Соболь 4х4 самый западный и LR Defender 110.
Отдохнул – отчитайся, лучшее слово – дело.
Аватара пользователя
Valery
Без группы
Без группы
Сообщения: 22325
На борту с: 07.02.2005 10:00
Награды: 5
Из: Тридевятое царство

Jshopping - 4.4.3 подключаем lightbox

Сообщение Valery »

product_default.php
Найти:

Код: Выделить всё

<a class="lightbox" id="main_image_full_<?php print $image->image_id?>" href="<?php print $this->image_product_path?>/<?php print $image->image_full;?>" <?php if ($k!=0){?>style="display:none"<?php }?>>
Заменить на:

Код: Выделить всё

<a rel="lightbox" id="main_image_full_<?php print $image->image_id?>" href="<?php print $this->image_product_path?>/<?php print $image->image_full;?>" <?php if ($k!=0){?>style="display:none"<?php }?>>
По суше: велосипед, Соболь 4х4 самый западный и LR Defender 110.
Отдохнул – отчитайся, лучшее слово – дело.
Аватара пользователя
Valery
Без группы
Без группы
Сообщения: 22325
На борту с: 07.02.2005 10:00
Награды: 5
Из: Тридевятое царство

JoomShopping - H1 на странице товара

Сообщение Valery »

При Внешняя ссылка: ВНУТРИ ТЕГА H1 ЕСТЬ ВЛОЖЕННЫЕ ТЕГИ!

product_default.php
Найти:

Код: Выделить всё

<h1><?php print $this->product->name?><?php if ($this->config->show_product_code){?> <span class="jshop_code_prod">(<?php print _JSHOP_EAN?>: <span id="product_code"><?php print $this->product->getEan();?></span>)</span><?php }?></h1>
Заменить на:

Код: Выделить всё

<h1><?php print $this->product->name?><?php if ($this->config->show_product_code){?> <?php print $this->product->getEan();?><?php }?></h1>
В таком случае Код товара на странице товара попадает в H1.
По суше: велосипед, Соболь 4х4 самый западный и LR Defender 110.
Отдохнул – отчитайся, лучшее слово – дело.