0 Пользователей и 1 Гость просматривают эту тему.
  • 54 Ответов
  • 8189 Просмотров
*

cirip

  • Захожу иногда
  • 112
  • 0 / 0
Re: LightBox на странице списка товаров
« Ответ #30 : 10.10.2016, 13:51:33 »
в предыдущем посте я вам дал прямую ссылку на тег а. посмотрите, как его правильно писать.
Все получилось вот так
Код
<a class="lightbox images" href="<?php print str_replace('thumb','full',$product->image);?>" />
Подскажите. Подключать
Код
JSFactory::loadJsFilesLightBox();
Нужно не один раз? Что бы получилось так как мы сделали! На главной в НОВОЕ ПОСТУПЛЕНИЕ.
*

dmitry_stas

  • Легенда
  • 13151
  • 1234 / 8
Re: LightBox на странице списка товаров
« Ответ #31 : 10.10.2016, 13:57:15 »
Все получилось вот так
это неправильно. тег <a> - парный. где вы видите по ссылке чтобы он так вставлялся?

JSFactory::loadJsFilesLightBox() достаточно 1 раз, но ничего не поменяется если будет и несколько раз. в методе есть проверка, если был загружен, второй раз уже не загрузится
Тут дарят бакс просто за регистрацию! Успей получить!
Все советы на форуме раздаю бесплатно, то есть даром. Индивидуально бесплатно консультирую только по вопросам стоимости индивидуальных консультаций
*

cirip

  • Захожу иногда
  • 112
  • 0 / 0
Re: LightBox на странице списка товаров
« Ответ #32 : 10.10.2016, 14:01:57 »
это неправильно. тег <a> - парный. где вы видите по ссылке чтобы он так вставлялся?

JSFactory::loadJsFilesLightBox() достаточно 1 раз, но ничего не поменяется если будет и несколько раз. в методе есть проверка, если был загружен, второй раз уже не загрузится
Пока оставлю все как есть так как открывается как мне нужно. По мере изучения переделаю. А вот на главной в НОВОЕ ПОСТУПЛЕНИЕ lightbox не открывается. Картинка на весь экран в окне. Модуль Jshopping Label Products
Изначальный код
Код
<a class="images" href="<?php print $product->product_link?>">
И мой код
Код
<a class="lightbox images" href="<?php print str_replace('thumb','full',$product->image);?>" />
*

dmitry_stas

  • Легенда
  • 13151
  • 1234 / 8
Re: LightBox на странице списка товаров
« Ответ #33 : 10.10.2016, 14:25:19 »
что мне еще добавить? могу только еще раз сказать - это неправильно. тег <a> - парный тег. оно и не должно работать, если написано так, как вы написали.
Тут дарят бакс просто за регистрацию! Успей получить!
Все советы на форуме раздаю бесплатно, то есть даром. Индивидуально бесплатно консультирую только по вопросам стоимости индивидуальных консультаций
*

cirip

  • Захожу иногда
  • 112
  • 0 / 0
Re: LightBox на странице списка товаров
« Ответ #34 : 10.10.2016, 14:34:18 »
что мне еще добавить? могу только еще раз сказать - это неправильно. тег <a> - парный тег. оно и не должно работать, если написано так, как вы написали.
В том и дело что работает тут http://vovkas6l.bget.ru/shop/category/view/307.html , вот тут http://vovkas6l.bget.ru/ не работает.
*

dmitry_stas

  • Легенда
  • 13151
  • 1234 / 8
Re: LightBox на странице списка товаров
« Ответ #35 : 10.10.2016, 15:11:07 »
как еще объяснить? помогите, машина без бензина не едет в гору. что делать? залить бензин. та нет, я попробовал, с горы она отлично едет. значит не в бензине дело. что еще можно сделать?

может быть есть еще причины, почему не работает. но без устранения основной говорить о них нет смысла.
« Последнее редактирование: 10.10.2016, 15:15:42 от dmitry_stas »
Тут дарят бакс просто за регистрацию! Успей получить!
Все советы на форуме раздаю бесплатно, то есть даром. Индивидуально бесплатно консультирую только по вопросам стоимости индивидуальных консультаций
*

cirip

  • Захожу иногда
  • 112
  • 0 / 0
Re: LightBox на странице списка товаров
« Ответ #36 : 10.10.2016, 15:37:54 »
Цитировать
может быть есть еще причины, почему не работает. но без устранения основной говорить о них нет смысла.
Можно закрыть тему. Все равно не догоняю что нужно поменять что бы было правильно. Спасибо всем за подсказки!
*

nevigen

  • Moderator
  • 10431
  • 862 / 25
  • http://n*****n.com
Re: LightBox на странице списка товаров
« Ответ #37 : 10.10.2016, 15:48:29 »
ну вроде ж работает ? :)
Профессиональные / Бесплатные решения для JoomShopping
Не лечи бесплатно, ибо тот, кто лечится бесплатно, рано или поздно перестает ценить свое здоровье,
а тот, кто лечит бесплатно, рано или поздно перестает ценить результаты своего труда/ (с) Гиппократ?
Не ищите ответов, ищите решение !
*

dmitry_stas

  • Легенда
  • 13151
  • 1234 / 8
Re: LightBox на странице списка товаров
« Ответ #38 : 10.10.2016, 16:00:14 »
приближение да, модал нет.

можем и закрыть конечно. но что мешает добавить класс modal точно также как вы уже добавили в http://vovkas6l.bget.ru/shop/category/view/307.html - я понять не могу.
Тут дарят бакс просто за регистрацию! Успей получить!
Все советы на форуме раздаю бесплатно, то есть даром. Индивидуально бесплатно консультирую только по вопросам стоимости индивидуальных консультаций
*

cirip

  • Захожу иногда
  • 112
  • 0 / 0
Re: LightBox на странице списка товаров
« Ответ #39 : 10.10.2016, 16:36:00 »
приближение да, модал нет.

можем и закрыть конечно. но что мешает добавить класс modal точно также как вы уже добавили в http://vovkas6l.bget.ru/shop/category/view/307.html - я понять не могу.
Вот код
Код
<?php 
/**
* @version      4.4.0 05.11.2013
* @author       MAXXmarketing GmbH
* @package      Jshopping
* @copyright    Copyright (C) 2010 webdesigner-profi.de. All rights reserved.
* @license      GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');
$jshop_product = JTable::getInstance('product', 'jshop');
$jshop_product->product_id = $product->product_id;
$images = $jshop_product->getImages();

?>
<?php print $product->_tmp_var_start?>
<div class="product item_inner shadow-radial productitem_<?php print $product->product_id?>">
    <div class = "image">
        <?php if ($product->image){?>
        <div class="image_block">
<?php print $product->_tmp_var_image_block;?>
            <?php if ($product->label_id){?>
                <div class="product_label">
                    <?php if ($product->_label_image){?>
                        <img src="<?php print $product->_label_image?>" alt="<?php print htmlspecialchars($product->_label_name)?>" />
                    <?php }else{?>
                        <span class="label_name"><?php print $product->_label_name;?></span>
                    <?php }?>
                </div>
            <?php }?>
  <a class="lightbox images" href="<?php print str_replace('thumb','full',$product->image);?>" />
<?php if(isset($images[1])) {
$image_second = ($this->config->image_product_live_path).'/'.($images[1]->image_thumb); ?>
<img class="jshop_img first-image" src="<?php print $product->image?>" alt="<?php print htmlspecialchars($product->name);?>" title="<?php print htmlspecialchars($product->name);?>"  />
<img class="jshop_img second-image" src = "<?php print $image_second; ?>" alt="" />
<?php } else{ ?>
<img class="jshop_img single-image" src="<?php print $product->image?>" alt="<?php print htmlspecialchars($product->name);?>" title="<?php print htmlspecialchars($product->name);?>"  />
<?php } ?>
</a>
        </div>
        <?php }?>
    </div>
    <div class = "vina_content">
<!-- Title Block -->
        <div class="name">
            <?php if ($this->config->product_list_show_product_code){?><span class="jshop_code_prod">(<?php print _JSHOP_EAN?>: <span><?php print $product->product_ean;?></span>)</span><?php }?>
        </div>

<!-- Review Mark -->
        <?php if ($this->allow_review){?>
<!-- <div class="review_mark"><?php print showMarkStar($product->average_rating);?></div>
<div class="count_commentar">
<?php print sprintf(_JSHOP_X_COMENTAR, $product->reviews_count);?>
</div> -->
        <?php }?>
        <?php print $product->_tmp_var_bottom_foto;?>

<!-- Price and Old Price -->
<?php if($product->_display_price || $product->product_old_price ) { ?>
<div class="vina_price">
<?php if ($product->product_old_price > 0){?>
<div class="old_price"><?php if ($this->config->product_list_show_price_description) print _JSHOP_OLD_PRICE.": ";?><span><?php print formatprice($product->product_old_price)?></span></div>
<?php }?>
<?php if ($product->_display_price){?>
<div class = "jshop_price">
<?php if ($this->config->product_list_show_price_description) print _JSHOP_PRICE.": ";?>
<?php if ($product->show_price_from) print _JSHOP_FROM." ";?>
<span><?php print formatprice($product->product_price);?><?php print $product->_tmp_var_price_ext;?></span>
</div>
<?php }?>
<?php print $product->_tmp_var_bottom_old_price;?>
<?php if ($product->product_price_default > 0 && $this->config->product_list_show_price_default){?>
<div class="default_price"><?php print _JSHOP_DEFAULT_PRICE.": ";?><span><?php print formatprice($product->product_price_default)?></span></div>
<?php }?>
</div>
<?php }?>
       <!-- <div class="description">
            <?php print $product->short_description?>
        </div> -->
        <?php if ($product->manufacturer->name){?>
            <div class="manufacturer_name"><?php print _JSHOP_MANUFACTURER;?>: <span><?php print $product->manufacturer->name?></span></div>
        <?php }?>
        <?php if ($product->product_quantity <=0 && !$this->config->hide_text_product_not_available){?>
            <div class="not_available"><?php print _JSHOP_PRODUCT_NOT_AVAILABLE;?></div>
        <?php }?>       
        <?php print $product->_tmp_var_bottom_price;?>
        <?php if ($this->config->show_tax_in_product && $product->tax > 0){?>
            <span class="taxinfo"><?php print productTaxInfo($product->tax);?></span>
        <?php }?>
        <?php if ($this->config->show_plus_shipping_in_product){?>
            <span class="plusshippinginfo"><?php print sprintf(_JSHOP_PLUS_SHIPPING, $this->shippinginfo);?></span>
        <?php }?>
        <?php if ($product->basic_price_info['price_show']){?>
            <div class="base_price"><?php print _JSHOP_BASIC_PRICE?>: <?php if ($product->show_price_from) print _JSHOP_FROM;?> <span><?php print formatprice($product->basic_price_info['basic_price'])?> / <?php print $product->basic_price_info['name'];?></span></div>
        <?php }?>
        <?php if ($this->config->product_list_show_weight && $product->product_weight > 0){?>
            <div class="productweight"><?php print _JSHOP_WEIGHT?>: <span><?php print formatweight($product->product_weight)?></span></div>
        <?php }?>
        <?php if ($product->delivery_time != ''){?>
            <div class="deliverytime"><?php print _JSHOP_DELIVERY_TIME?>: <span><?php print $product->delivery_time?></span></div>
        <?php }?>
        <?php if (is_array($product->extra_field)){?>
            <div class="extra_fields">
            <?php foreach($product->extra_field as $extra_field){?>
                <div><?php print $extra_field['name'];?>: <?php print $extra_field['value']; ?></div>
            <?php }?>
            </div>
        <?php }?>
        <?php if ($product->vendor){?>
            <div class="vendorinfo"><?php print _JSHOP_VENDOR?>: <a href="<?php print $product->vendor->products?>"><?php print $product->vendor->shop_name?></a></div>
        <?php }?>
        <?php if ($this->config->product_list_show_qty_stock){?>
            <div class="qty_in_stock"><?php print _JSHOP_QTY_IN_STOCK?>: <span><?php print sprintQtyInStock($product->qty_in_stock)?></span></div>
        <?php }?>
    </div>
<?php print $product->_tmp_var_top_buttons;?>
<div class="buttons vina_bottons">
<?php if ($product->buy_link){?>
<a class="button_buy" href="<?php print $product->buy_link?>" title="<?php print JText::_('JSHOP_ADD_TO_CART'); ?>"><i style="display: inline-block;" class="icon-shopping-cart"></i><?php //print JText::_('JSHOP_ADD_TO_CART'); ?></a>
<?php }?>
<?php print $product->_tmp_var_buttons;?>
</div>
<?php print $product->_tmp_var_bottom_buttons;?>
</div>
<?php print $product->_tmp_var_end?>
Но там нет класс modal как тут http://vovkas6l.bget.ru/shop/category/view/307.html
А это код модуля на главной
Код
<div class="label_products jshop">
<?php
$i = 0;
$row_product = 4;
?>
<?php foreach($rows as $product){
$jshop_product = JTable::getInstance('product', 'jshop');
$jshop_product->product_id = $product->product_id;
$images = $jshop_product->getImages();

?>
<?php if($i%$row_product == 0) print '<div class="row-fluid">';?>
<div class="block_item span<?php echo 12/$row_product; ?>">
<div class="item_inner">
<?php /*------------ Image Block ---------------*/?>
<?php if ($show_image && $product->image){// option modul  show_image ?>
<div class="image">
<div class="image_block">
<?php print $product->_tmp_var_image_block;?>
<?php if($product->label_id && $show_image_label){?>
<div class="product_label">
<?php if($product->_label_image){?>
<img src="<?php print $product->_label_image?>" alt="<?php print htmlspecialchars($product->_label_name)?>" />
<?php }else{ ?>
<span class="label_name"><?php print $product->_label_name;?></span>
<?php } ?>
</div>
<?php } ?>

  <a class="lightbox images" href="<?php print str_replace('thumb','full',$product->image);?>" />
<?php if(isset($images[1])) {
$image_second = $jshopConfig->image_product_live_path.'/'.$images[1]->image_thumb; ?>
<img class="jshop_img first-image" src="<?php print $product->image ? $product->image : $noimage;?>" alt="<?php print htmlspecialchars($product->name);?>" />
<img class="jshop_img second-image" src = "<?php print $image_second ?>" alt="" />
<?php } else{ ?>
<img class="jshop_img single-image" src="<?php print $product->image ? $product->image : $noimage;?>" alt="<?php print htmlspecialchars($product->name);?>" />
<?php } ?>

</a>
</div>
</div>
<?php } ?>
<div class="vina_content">
<?php /*------------ Title Block ---------------*/?>
<div class="name">
<a href="<?php print $product->product_link?>"><?php print $product->name?></a>
<?php if ($jshopConfig->product_list_show_product_code){?><span class="jshop_code_prod">(<?php print _JSHOP_EAN?>: <span><?php print $product->product_ean;?></span>)</span><?php }?>
</div>

<?php /*------------ Description Block ---------------*/?>
<?php if($short_description){ // option modul short_description ?>
<div class="description">
<?php print $product->short_description?>
</div>
<?php } ?>

<?php /*------------ Price + Old Price + Default Price Block ---------------*/?>
<?php if($display_price || $product_old_price ) { ?>
<div class="vina_price">
<?php // Price Block ?>
<?php if($display_price){?>
<?php if ($product->_display_price){// option modul display_price?>
<p class = "jshop_price">
<?php if ($jshopConfig->product_list_show_price_description) print _JSHOP_PRICE.": ";?>
<?php if ($product->show_price_from) print _JSHOP_FROM." ";?>
<span><?php print formatprice($product->product_price);?></span>
</p>
<?php } ?>
<?php print $product->_tmp_var_bottom_price;?>
<?php } ?>

<?php // Old Price Block ?>
<?php if( $product_old_price){?>
<?php if ($product->product_old_price > 0){// option modul product_old_price?>
<p class="old_price">
<?php if ($jshopConfig->product_list_show_price_description) print _JSHOP_OLD_PRICE.": ";?><span><?php print formatprice($product->product_old_price)?></span>
</p>
<?php } ?>
<?php print $product->_tmp_var_bottom_old_price;?>
<?php } ?>

<?php // Default Price Block ?>
<?php if ($product->product_price_default > 0 && $jshopConfig->product_list_show_price_default && $product_price_default){ // option modul product_price_default?>
<p class="default_price">
<?php print _JSHOP_DEFAULT_PRICE.": ";?><span><?php print formatprice($product->product_price_default)?></span>
</p>
<?php } ?>
</div>
<?php } ?>

<?php /*------------ Review Block ---------------*/?>
<?php if($allow_review){ // option modul allow_review ?>
<div class="review_mark">
<?php print showMarkStar($product->average_rating);?>
</div>
<!--<div class="count_commentar">
<?php print sprintf(_JSHOP_X_COMENTAR, $product->reviews_count);?>
</div> -->
<?php } ?>

<?php print $product->_tmp_var_bottom_foto;?>

<?php /*------------ Manufacturer Name Block ---------------*/?>
<?php if ($product->manufacturer->name && $manufacturer_name){// option modul manufacturer_name ?>
<div class="manufacturer_name">
<?php print _JSHOP_MANUFACTURER;?>: <span><?php print $product->manufacturer->name?></span>
</div>
<?php }?>

<?php /*------------ Availability Block ---------------*/?>
<?php if ($product->product_quantity <=0 && !$jshopConfig->hide_text_product_not_available && $product_quantity){// option modul product_quantity?>
<div class="not_available"><?php print _JSHOP_PRODUCT_NOT_AVAILABLE;?></div>
<?php }?>

<?php /*------------ Tax info Block ---------------*/?>
<?php if ($jshopConfig->show_tax_in_product && $product->tax > 0 && $show_tax_product){// option modul show_tax_product?>
<span class="taxinfo"><?php print productTaxInfo($product->tax);?></span>
<?php } ?>

<?php /*------------ Plus Shipping Info Block ---------------*/?>
<?php if ($jshopConfig->show_plus_shipping_in_product && $show_plus_shipping_in_product){?>
<span class="plusshippinginfo"><?php print sprintf(_JSHOP_PLUS_SHIPPING, $shippinginfo);?></span>
<?php } ?>

<?php /*------------ Basic Price Info Block ---------------*/?>
<?php if ($product->basic_price_info['price_show'] && $basic_price_info){// option modul basic_price_info?>
<div class="base_price">
<?php print _JSHOP_BASIC_PRICE?>: <?php if ($product->show_price_from) print _JSHOP_FROM;?>
<span><?php print formatprice($product->basic_price_info['basic_price'])?> / <?php print $product->basic_price_info['name'];?></span>
</div>
<?php } ?>

<?php /*------------ Product Weight Block ---------------*/?>
<?php if ($jshopConfig->product_list_show_weight && $product->product_weight > 0 && $product_weight){// option modul product_weight?>
<div class="productweight"><?php print _JSHOP_WEIGHT?>: <span><?php print formatweight($product->product_weight)?></span></div>
<?php }?>

<?php /*------------ Delivery Time Block ---------------*/?>
<?php if ($product->delivery_time != '' && $delivery_time){// option modul delivery_time?>
<div class="deliverytime"><?php print _JSHOP_DELIVERY_TIME?>: <span><?php print $product->delivery_time?></span></div>
<?php } ?>

<?php /*------------ Extra Field Block ---------------*/?>
<?php if (is_array($product->extra_field) && $extra_field){// option modul extra_field?>
<div class="extra_fields">
<?php foreach($product->extra_field as $extra_field){?>
<div>
<?php print $extra_field['name'];?>: <?php print $extra_field['value']; ?>
</div>
<?php } ?>
</div>
<?php } ?>

<?php /*------------ Vendor Block ---------------*/?>
<?php if ($product->vendor && $vendor){// option modul vendor?>
<div class="vendorinfo">
<?php print _JSHOP_VENDOR?>: <a href="<?php print $product->vendor->products?>"><?php print $product->vendor->shop_name?></a>
</div>
<?php } ?>

<?php /*------------ Qty Stock Block ---------------*/?>
<?php if ($jshopConfig->product_list_show_qty_stock && $product_list_qty_stock){// option modul product_list_qty_stock?>
<div class="qty_in_stock">
<?php print _JSHOP_QTY_IN_STOCK?>: <span><?php print sprintQtyInStock($product->qty_in_stock)?></span>
</div>
<?php } ?>
</div>
<?php /*------------ Button buy + Button Detail + Button Wishlist ---------------*/?>
<?php if($show_button){?>
<?php print $product->_tmp_var_top_buttons;?>
<div class="buttons vina_bottons">
<?php if ($product->buy_link && $show_button_buy){?>
<a class="button_buy" href="<?php print $product->buy_link?>" title="<?php print JText::_('JSHOP_ADD_TO_CART'); ?>"><i style="display: inline-block;" class="icon-shopping-cart"></i><?php //print JText::_('JSHOP_ADD_TO_CART'); ?></a>
<?php } ?>
<?php if ($show_button_detal){?>
<a class="button_detail" href="<?php print $product->product_link?>" title="<?php print JText::_('JSHOP_VIEW_DETAIL'); ?>" ><i style="display: inline-block;" class="icon-eye-open"></i><?php //print JText::_('JSHOP_VIEW_DETAIL'); ?></a>
<?php } ?>
<a class="button_wishlist" href = "<?php print SEFLink('index.php?option=com_jshopping&controller=cart&task=add&category_id='.$product->category_id.'&product_id='.$product->product_id.'&to=wishlist', 1);?>" title="<?php print JText::_('JSHOP_ADD_TO_WISHLIST'); ?>"><i style="display: inline-block;" class="icon-heart"></i><?php //print JText::_('JSHOP_ADD_TO_WISHLIST'); ?></a>
<?php print $product->_tmp_var_buttons;?>
</div>
<?php print $product->_tmp_var_bottom_buttons;?>
<?php } ?>
</div>
</div>
<?php print $product->_tmp_var_end?>
<?php if(($i+1)%$row_product == 0)
print '</div>';
$i++;?>
<?php } ?>
<?php if($i%$row_product != 0) print '</div>';?>
</div>
*

dmitry_stas

  • Легенда
  • 13151
  • 1234 / 8
Re: LightBox на странице списка товаров
« Ответ #40 : 10.10.2016, 16:47:06 »
http://vovkas6l.bget.ru/components/com_jshopping/js/jquery/jquery.lightbox.js - где на главной? вы ж сам скрипт Lightbox не загрузили.
Тут дарят бакс просто за регистрацию! Успей получить!
Все советы на форуме раздаю бесплатно, то есть даром. Индивидуально бесплатно консультирую только по вопросам стоимости индивидуальных консультаций
*

cirip

  • Захожу иногда
  • 112
  • 0 / 0
Re: LightBox на странице списка товаров
« Ответ #41 : 10.10.2016, 17:07:39 »
http://vovkas6l.bget.ru/components/com_jshopping/js/jquery/jquery.lightbox.js - где на главной? вы ж сам скрипт Lightbox не загрузили.
я вообще не лазил в jquery.lightbox.js что бы Lightbox работал тут http://vovkas6l.bget.ru/shop/category/view/307.html
Код
/**
 * @preserve jQuery lightBox plugin
 * This jQuery plugin was inspired and based on Lightbox 2 by Lokesh Dhakar (http://www.huddletogether.com/projects/lightbox2/)
 * and adapted to me for use like a plugin from jQuery.
 * @name jquery-lightbox-0.5.js
 * @author Leandro Vieira Pinho - http://leandrovieira.com
 * @version 0.5.1
 * @date April 11, 2008
 * @category jQuery plugin
 * @copyright (c) 2008 Leandro Vieira Pinho (leandrovieira.com)
 * @license CCAttribution-ShareAlike 2.5 Brazil - http://creativecommons.org/licenses/by-sa/2.5/br/deed.en_US
 * @example Visit http://leandrovieira.com/projects/jquery/lightbox/ for more informations about this jQuery plugin
 *
 * @updates by Ivaylo Stamatov aka avioli @ FULLER http://fuller.com.au/
 * @date 2011-08-04
 */

/**
 * Informations for developers:
 *
 * The minified file can be generated with Google Closure Compiler (https://github.com/google/closure-compiler)
 * The "preserve" keyword at the top enables to keep the content of the header in the minified file
 * You can compile the file by running the following command in the javascript directory
 * java -jar /path/to/compiler --js_output_file=jquery.lightbox.min.js jquery.lightbox.js
 *
 */

// Offering a Custom Alias suport - More info: http://docs.jquery.com/Plugins/Authoring#Custom_Alias
var lightbox_path = lightbox_path || '';
(function($) {
/**
* $ is an alias to jQuery object
*
*/
$.fn.lightBox = function(settings) {
// Settings to configure the jQuery lightBox plugin how you like
settings = jQuery.extend({
// Configuration related to overlay
overlayBgColor: '#000', // (string) Background color to overlay; inform a hexadecimal value like: #RRGGBB. Where RR, GG, and BB are the hexadecimal values for the red, green, and blue values of the color.
overlayOpacity: 0.8, // (integer) Opacity value to overlay; inform: 0.X. Where X are number from 0 to 9
// Configuration related to navigation
fixedNavigation: false, // (boolean) Boolean that informs if the navigation (next and prev button) will be fixed or not in the interface.
// Configuration related to images
imageLoading: lightbox_path+'images/lightbox-ico-loading.gif', // (string) Path and the name of the loading icon
imageBtnPrev: lightbox_path+'images/lightbox-btn-prev.gif', // (string) Path and the name of the prev button image
imageBtnNext: lightbox_path+'images/lightbox-btn-next.gif', // (string) Path and the name of the next button image
imageBtnClose: lightbox_path+'images/lightbox-btn-close.gif', // (string) Path and the name of the close btn
imageBlank: lightbox_path+'images/lightbox-blank.gif', // (string) Path and the name of a blank image (one pixel)
// Configuration related to container image box
containerBorderSize: 10, // (integer) If you adjust the padding in the CSS for the container, #lightbox-container-image-box, you will need to update this value
containerResizeSpeed: 400, // (integer) Specify the resize duration of container image. These number are miliseconds. 400 is default.
// Configuration related to texts in caption. For example: Image 2 of 8. You can alter either "Image" and "of" texts.
txtImage: 'Image', // (string) Specify text "Image"
txtOf: 'of', // (string) Specify text "of"
// Configuration related to keyboard navigation
keyToClose: 'c', // (string) (c = close) Letter to close the jQuery lightBox interface. Beyond this letter, the letter X and the SCAPE key is used to.
keyToPrev: 'p', // (string) (p = previous) Letter to show the previous image
keyToNext: 'n', // (string) (n = next) Letter to show the next image.
// Don´t alter these variables in any way
imageArray: [],
activeImage: 0,
captionPosition:        ''
,shrinkToFit: true // (boolean) Shrinks the image to fit withing the current viewport *** FULLER
,shrinkPadding: 50 // (integer) The padding amount for the shrinking calculation *** FULLER
,grouping: true // (boolean) Treats the all the same rel="ligthbox[groupName]" as singular group set *** FULLER
},settings);
// Caching the jQuery object with all elements matched
var jQueryMatchedObj = this; // This, in this context, refer to jQuery object
/**
* Initializing the plugin calling the start function
*
* @return boolean false
*/
function _initialize() {
_start(this,jQueryMatchedObj); // This, in this context, refer to object (link) which the user have clicked
return false; // Avoid the browser following the link
}
/**
* Start the jQuery lightBox plugin
*
* @param object objClicked The object (link) whick the user have clicked
* @param object jQueryMatchedObj The jQuery object with all elements matched
*/
function _start(objClicked,jQueryMatchedObj) {
// Hime some elements to avoid conflict with overlay in IE. These elements appear above the overlay.
$('embed, object, select').css({ 'visibility' : 'hidden' });
// Call the function to create the markup structure; style some elements; assign events in some elements.
_set_interface();
// Unset total images in imageArray
settings.imageArray.length = 0;
// Unset image active information
settings.activeImage = 0;


/* FULLER */
var allImages = false, rel;
if ( settings.grouping ) {
if ( ( rel = objClicked.getAttribute( 'rel' ) ) ) {
allImages = jQueryMatchedObj;
jQueryMatchedObj = [];
allImages.each( function( i, el ) {
if ( rel == el.getAttribute( 'rel' ) )
jQueryMatchedObj.push( el );
});
}
}
/* F */


// We have an image set? Or just an image? Let´s see it.
if ( jQueryMatchedObj.length == 1 ) {
if( settings.captionPosition == 'gallery' ) var position = jQuery(objClicked).parent().next().html();
else var position = objClicked.getAttribute('title');
settings.imageArray.push(new Array(objClicked.getAttribute('href'),position));
} else {
// Add an Array (as many as we have), with href and title atributes, inside the Array that storage the images references
for ( var i = 0; i < jQueryMatchedObj.length; i++ ) {
if( settings.captionPosition != 'gallery' ) {
var position = jQueryMatchedObj[i].getAttribute('title');
settings.imageArray.push(new Array(jQueryMatchedObj[i].getAttribute('href'),position));
} else {
if( i > 1 ) {
if( !(jQueryMatchedObj[i-1].getAttribute('href')!= jQueryMatchedObj[i].getAttribute('href') && jQuery(jQueryMatchedObj[i-1]).parent().parent().children().children().attr('href') == jQuery(jQueryMatchedObj[i]).parent().parent().children().children().attr('href'))) {
var position = jQuery(jQueryMatchedObj[i]).parent().next().html();
settings.imageArray.push(new Array(jQuery(jQueryMatchedObj[i]).parent().parent().children().children().attr('href'),position));
}
} else {
var position = jQuery(jQueryMatchedObj[i]).parent().next().html();
settings.imageArray.push(new Array(jQuery(jQueryMatchedObj[i]).parent().parent().children().children().attr('href'),position));
}
}
}
}
while ( settings.imageArray[settings.activeImage][0] != objClicked.getAttribute('href') ) {
settings.activeImage++;
}


/* FULLER */
if ( settings.grouping && allImages ) {
jQueryMatchedObj = allImages;
allImages = false;
}
/* F */


// Call the function that prepares image exibition
_set_image_to_view();
}
/**
* Create the jQuery lightBox plugin interface
*
* The HTML markup will be like that:
<div id="jquery-overlay"></div>
<div id="jquery-lightbox">
<div id="lightbox-container-image-box">
<div id="lightbox-container-image">
<img src="../fotos/XX.jpg" id="lightbox-image">
<div id="lightbox-nav">
<a href="#" id="lightbox-nav-btnPrev"></a>
<a href="#" id="lightbox-nav-btnNext"></a>
</div>
<div id="lightbox-loading">
<a href="#" id="lightbox-loading-link">
<img src="../images/lightbox-ico-loading.gif">
</a>
</div>
</div>
</div>
<div id="lightbox-container-image-data-box">
<div id="lightbox-container-image-data">
<div id="lightbox-image-details">
<span id="lightbox-image-details-caption"></span>
<span id="lightbox-image-details-currentNumber"></span>
</div>
<div id="lightbox-secNav">
<a href="#" id="lightbox-secNav-btnClose">
<img src="../images/lightbox-btn-close.gif">
</a>
</div>
</div>
</div>
</div>
*
*/
function _set_interface() {
// Apply the HTML markup into body tag
$('body').append('<div id="jquery-overlay"></div><div id="jquery-lightbox"><div id="lightbox-container-image-box"><div id="lightbox-container-image"><img id="lightbox-image"><div style="" id="lightbox-nav"><a href="#" id="lightbox-nav-btnPrev"></a><a href="#" id="lightbox-nav-btnNext"></a></div><div id="lightbox-loading"><a href="#" id="lightbox-loading-link"><img src="' + settings.imageLoading + '"></a></div></div></div><div id="lightbox-container-image-data-box"><div id="lightbox-container-image-data"><div id="lightbox-image-details"><span id="lightbox-image-details-caption"></span><span id="lightbox-image-details-currentNumber"></span></div><div id="lightbox-secNav"><a href="#" id="lightbox-secNav-btnClose"><img src="' + settings.imageBtnClose + '"></a></div></div></div></div>');
// Style overlay and show it
$('#jquery-overlay').css({
backgroundColor: settings.overlayBgColor,
opacity: settings.overlayOpacity
}).fadeIn();
// Set modal dimensions
_resize_jquery_lightbox();
// Assigning click events in elements to close overlay
$('#jquery-overlay,#jquery-lightbox').click(function() {
_finish();
});
// Assign the _finish function to lightbox-loading-link and lightbox-secNav-btnClose objects
$('#lightbox-loading-link,#lightbox-secNav-btnClose').click(function() {
_finish();
return false;
});
// If window was resized, calculate the new overlay dimensions
$(window).resize(function() {
_resize_jquery_lightbox();
});
}
/**
* Prepares image exibition; doing a image´s preloader to calculate it´s size
*
*/
function _set_image_to_view() { // show the loading
// Show the loading
$('#lightbox-loading').show();
if ( settings.fixedNavigation ) {
$('#lightbox-image,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();
} else {
// Hide some elements
$('#lightbox-image,#lightbox-nav,#lightbox-nav-btnPrev,#lightbox-nav-btnNext,#lightbox-container-image-data-box,#lightbox-image-details-currentNumber').hide();
}
// Image preload process
var objImagePreloader = new Image();
objImagePreloader.onload = function() {
$('#lightbox-image').attr('src',settings.imageArray[settings.activeImage][0]);
// Perfom an effect in the image container resizing it
_resize_container_image_box(objImagePreloader.width,objImagePreloader.height);
// clear onLoad, IE behaves irratically with animated gifs otherwise
objImagePreloader.onload=function(){};
};
objImagePreloader.src = settings.imageArray[settings.activeImage][0];
};
/**
* Resize the lightbox depending on the current screen resolution
*
*/
function _resize_jquery_lightbox() {
// Get page sizes
var arrPageSizes = ___getPageSize();
// Style overlay and show it
$('#jquery-overlay').css({
width: arrPageSizes[0],
height: arrPageSizes[1]
});
// Get page scroll
var arrPageScroll = ___getPageScroll();
// Calculate top and left offset for the jquery-lightbox div object and show it
$('#jquery-lightbox').css({
// If the shrinkToFit feature is enabled, the shrinkPadding property is used. If not, top is 10th of the page height
top: arrPageScroll[1] + (settings.shrinkToFit ? settings.shrinkPadding : arrPageSizes[3] / 10),
left: arrPageScroll[0]
});
};
/**
* Perfom an effect in the image container resizing it
*
* @param integer intImageWidth The image´s width that will be showed
* @param integer intImageHeight The image´s height that will be showed
*/
function _resize_container_image_box(intImageWidth,intImageHeight) {
// Get current width and height
var intCurrentWidth = $('#lightbox-container-image-box').width();
var intCurrentHeight = $('#lightbox-container-image-box').height();


/* FULLER */
if ( settings.shrinkToFit ) {
var arrPageSizes = ___getPageSize();

// The 0.9 percentage ensures that controls under the modal are (mostly) visible even with a very small shrinkPadding
// shrinkPadding is doubled to give same padding all around the modal
var imageRatio = intImageWidth / intImageHeight;
if ( intImageHeight > arrPageSizes[3] * 0.9 - settings.shrinkPadding * 2 ) {
intImageHeight = arrPageSizes[3] * 0.9 - settings.shrinkPadding * 2;
intImageWidth = intImageHeight * imageRatio;
}
if ( intImageWidth > arrPageSizes[0] - settings.shrinkPadding * 2 ) {
intImageWidth = arrPageSizes[0] - settings.shrinkPadding * 2;
intImageHeight = intImageWidth / imageRatio;
}
}
/* F */


// Get the width and height of the selected image plus the padding
var intWidth = (intImageWidth + (settings.containerBorderSize * 2)); // Plus the image´s width and the left and right padding value
var intHeight = (intImageHeight + (settings.containerBorderSize * 2)); // Plus the image´s height and the left and right padding value
// Diferences
var intDiffW = intCurrentWidth - intWidth;
var intDiffH = intCurrentHeight - intHeight;
// Perfom the effect
$('#lightbox-container-image-box').animate({ width: intWidth, height: intHeight },settings.containerResizeSpeed,function() { _show_image(); });
if ( ( intDiffW == 0 ) && ( intDiffH == 0 ) ) {
if ( $.browser.msie ) {
___pause(250);
} else {
___pause(100);
}
}
$('#lightbox-container-image-data-box').css({ width: intImageWidth });
$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ height: intImageHeight + (settings.containerBorderSize * 2) });
};
/**
* Show the prepared image
*
*/
function _show_image() {
$('#lightbox-loading').hide();
$('#lightbox-image').fadeIn(function() {
_show_image_data();
_set_navigation();
});
_preload_neighbor_images();
};
/**
* Show the image information
*
*/
function _show_image_data() {
$('#lightbox-container-image-data-box').slideDown('fast');
$('#lightbox-image-details-caption').hide();
if ( settings.imageArray[settings.activeImage][1] ) {
$('#lightbox-image-details-caption').html(settings.imageArray[settings.activeImage][1]).show();
}
// If we have a image set, display 'Image X of X'
if ( settings.imageArray.length > 1 ) {
$('#lightbox-image-details-currentNumber').html(settings.txtImage + ' ' + ( settings.activeImage + 1 ) + ' ' + settings.txtOf + ' ' + settings.imageArray.length).show();
}
}
/**
* Display the button navigations
*
*/
function _set_navigation() {
$('#lightbox-nav').show();

// Instead to define this configuration in CSS file, we define here. And it´s need to IE. Just.
$('#lightbox-nav-btnPrev,#lightbox-nav-btnNext').css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });

// Show the prev button, if not the first image in set
if ( settings.activeImage != 0 ) {
if ( settings.fixedNavigation ) {
$('#lightbox-nav-btnPrev').css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' })
.unbind()
.bind('click',function() {
settings.activeImage = settings.activeImage - 1;
_set_image_to_view();
return false;
});
} else {
// Show the images button for Next buttons
$('#lightbox-nav-btnPrev').unbind().hover(function() {
$(this).css({ 'background' : 'url(' + settings.imageBtnPrev + ') left 15% no-repeat' });
},function() {
$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
}).show().bind('click',function() {
settings.activeImage = settings.activeImage - 1;
_set_image_to_view();
return false;
});
}
}

// Show the next button, if not the last image in set
if ( settings.activeImage != ( settings.imageArray.length -1 ) ) {
if ( settings.fixedNavigation ) {
$('#lightbox-nav-btnNext').css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' })
.unbind()
.bind('click',function() {
settings.activeImage = settings.activeImage + 1;
_set_image_to_view();
return false;
});
} else {
// Show the images button for Next buttons
$('#lightbox-nav-btnNext').unbind().hover(function() {
$(this).css({ 'background' : 'url(' + settings.imageBtnNext + ') right 15% no-repeat' });
},function() {
$(this).css({ 'background' : 'transparent url(' + settings.imageBlank + ') no-repeat' });
}).show().bind('click',function() {
settings.activeImage = settings.activeImage + 1;
_set_image_to_view();
return false;
});
}
}
// Enable keyboard navigation
_enable_keyboard_navigation();
}
/**
* Enable a support to keyboard navigation
*
*/
function _enable_keyboard_navigation() {
$(document).keydown(function(objEvent) {
_keyboard_action(objEvent);
});
}
/**
* Disable the support to keyboard navigation
*
*/
function _disable_keyboard_navigation() {
$(document).unbind();
}
/**
* Perform the keyboard actions
*
*/
function _keyboard_action(objEvent) {
// To ie
if ( objEvent == null ) {
keycode = event.keyCode;
escapeKey = 27;
// To Mozilla
} else {
keycode = objEvent.keyCode;
escapeKey = objEvent.DOM_VK_ESCAPE;
}
// Get the key in lower case form
key = String.fromCharCode(keycode).toLowerCase();
// Verify the keys to close the ligthBox
if ( ( key == settings.keyToClose ) || ( key == 'x' ) || ( keycode == escapeKey ) ) {
_finish();
}
// Verify the key to show the previous image
if ( ( key == settings.keyToPrev ) || ( keycode == 37 ) ) {
// If we´re not showing the first image, call the previous
if ( settings.activeImage != 0 ) {
settings.activeImage = settings.activeImage - 1;
_set_image_to_view();
_disable_keyboard_navigation();
}
}
// Verify the key to show the next image
if ( ( key == settings.keyToNext ) || ( keycode == 39 ) ) {
// If we´re not showing the last image, call the next
if ( settings.activeImage != ( settings.imageArray.length - 1 ) ) {
settings.activeImage = settings.activeImage + 1;
_set_image_to_view();
_disable_keyboard_navigation();
}
}
}
/**
* Preload prev and next images being showed
*
*/
function _preload_neighbor_images() {
if ( (settings.imageArray.length -1) > settings.activeImage ) {
objNext = new Image();
objNext.src = settings.imageArray[settings.activeImage + 1][0];
}
if ( settings.activeImage > 0 ) {
objPrev = new Image();
objPrev.src = settings.imageArray[settings.activeImage -1][0];
}
}
/**
* Remove jQuery lightBox plugin HTML markup
*
*/
function _finish() {
$('#jquery-lightbox').remove();
$('#jquery-overlay').fadeOut(function() { $('#jquery-overlay').remove(); });
// Show some elements to avoid conflict with overlay in IE. These elements appear above the overlay.
$('embed, object, select').css({ 'visibility' : 'visible' });
}
/**
/ THIRD FUNCTION
* getPageSize() by quirksmode.com
*
* @return Array Return an array with page width, height and window width, height
*/
function ___getPageSize() {
var xScroll, yScroll;
if (window.innerHeight && window.scrollMaxY) {
xScroll = window.innerWidth + window.scrollMaxX;
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
xScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}
var windowWidth, windowHeight;
if (self.innerHeight) { // all except Explorer
if(document.documentElement.clientWidth){
windowWidth = document.documentElement.clientWidth;
} else {
windowWidth = self.innerWidth;
}
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
} else if (document.body) { // other Explorers
windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
}
// for small pages with total height less then height of the viewport
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else {
pageHeight = yScroll;
}
// for small pages with total width less then width of the viewport
if(xScroll < windowWidth){
pageWidth = xScroll;
} else {
pageWidth = windowWidth;
}
arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight);
return arrayPageSize;
};
/**
/ THIRD FUNCTION
* getPageScroll() by quirksmode.com
*
* @return Array Return an array with x,y page scroll values.
*/
function ___getPageScroll() {
var xScroll, yScroll;
if (self.pageYOffset) {
yScroll = self.pageYOffset;
xScroll = self.pageXOffset;
} else if (document.documentElement && document.documentElement.scrollTop) { // Explorer 6 Strict
yScroll = document.documentElement.scrollTop;
xScroll = document.documentElement.scrollLeft;
} else if (document.body) {// all other Explorers
yScroll = document.body.scrollTop;
xScroll = document.body.scrollLeft;
}
arrayPageScroll = new Array(xScroll,yScroll);
return arrayPageScroll;
};
/**
  * Stop the code execution from a escified time in milisecond
  *
  */
function ___pause(ms) {
var date = new Date();
curDate = null;
do { var curDate = new Date(); }
while ( curDate - date < ms);
};
// Return the jQuery object for chaining. The unbind method is used to avoid click conflict when the plugin is called more than once
return this.unbind('click').click(_initialize);
};
})(jQuery); // Call and execute the function immediately passing the jQuery object
*

nevigen

  • Moderator
  • 10431
  • 862 / 25
  • http://n*****n.com
Re: LightBox на странице списка товаров
« Ответ #42 : 10.10.2016, 17:09:37 »
там он грузится ЖШ
а на главной ЖШ нету:)
так что ручками :) или подгружайте главную как главную ЖШ :)
Профессиональные / Бесплатные решения для JoomShopping
Не лечи бесплатно, ибо тот, кто лечится бесплатно, рано или поздно перестает ценить свое здоровье,
а тот, кто лечит бесплатно, рано или поздно перестает ценить результаты своего труда/ (с) Гиппократ?
Не ищите ответов, ищите решение !
*

dmitry_stas

  • Легенда
  • 13151
  • 1234 / 8
Re: LightBox на странице списка товаров
« Ответ #43 : 10.10.2016, 17:10:25 »
это фантасмагория какая то :) в него и не нужно лазить. его загрузить нужно на главной странице :) вы про JSFactory::loadJsFilesLightBox() зачем спрашивали?
Тут дарят бакс просто за регистрацию! Успей получить!
Все советы на форуме раздаю бесплатно, то есть даром. Индивидуально бесплатно консультирую только по вопросам стоимости индивидуальных консультаций
*

cirip

  • Захожу иногда
  • 112
  • 0 / 0
Re: LightBox на странице списка товаров
« Ответ #44 : 10.10.2016, 17:21:45 »
Друзья. Я уже сам запутался что куда вставлять да и какой код. ПОМОГИТЕ ПОЖАЛУЙСТА. Куда нужно загрузить и что. Если есть у вас возможность то напишите имя файла. Я понимаю что уже вам поднадоел  со своими глупостями.
*

nevigen

  • Moderator
  • 10431
  • 862 / 25
  • http://n*****n.com
Re: LightBox на странице списка товаров
« Ответ #45 : 10.10.2016, 17:25:15 »
та не то чтобы надоел :)
просто как то по кругу...
вы вроде пытаетсь разобраться деалете одно а другого не делаете :)
у вас на главной не грузится ЛайтБокс библиотека, ее необходимо подклюить. например в том модуле который вы используете для вывода товаров. не лазить в ней, не править а просто чтобы она грузилась на главной.
либо сделать главную сайта,  главной ЖШ, тогда будут и пути короче, и будет подгружаться латбокс и стили ЖШ на главной.
Профессиональные / Бесплатные решения для JoomShopping
Не лечи бесплатно, ибо тот, кто лечится бесплатно, рано или поздно перестает ценить свое здоровье,
а тот, кто лечит бесплатно, рано или поздно перестает ценить результаты своего труда/ (с) Гиппократ?
Не ищите ответов, ищите решение !
*

dmitry_stas

  • Легенда
  • 13151
  • 1234 / 8
Re: LightBox на странице списка товаров
« Ответ #46 : 10.10.2016, 17:39:52 »
просто как то по кругу...
как тот дедушка :) достал он всех, застрелили его :)

ТС, вы зачем спрашивали про JSFactory::loadJsFilesLightBox()? ну вызовите же этот метод на главной странице. в модуле его вызовете, не знаю, в любом, что грузится на главной. в модуле проще всего.
Тут дарят бакс просто за регистрацию! Успей получить!
Все советы на форуме раздаю бесплатно, то есть даром. Индивидуально бесплатно консультирую только по вопросам стоимости индивидуальных консультаций
*

cirip

  • Захожу иногда
  • 112
  • 0 / 0
Re: LightBox на странице списка товаров
« Ответ #47 : 10.10.2016, 19:46:23 »
как тот дедушка :) достал он всех, застрелили его :)

ТС, вы зачем спрашивали про JSFactory::loadJsFilesLightBox()? ну вызовите же этот метод на главной странице. в модуле его вызовете, не знаю, в любом, что грузится на главной. в модуле проще всего.
Я не догоняю где мне нужно прописать JSFactory::loadJsFilesLightBox() и какой файл, папка отвечает за главную страницу! Уже всю папку сайт\components перерыл где есть код
Код
function view(){
« Последнее редактирование: 10.10.2016, 19:50:33 от cirip »
*

nevigen

  • Moderator
  • 10431
  • 862 / 25
  • http://n*****n.com
Re: LightBox на странице списка товаров
« Ответ #48 : 10.10.2016, 19:47:01 »
в шаблоне модуля, которым вы выводите товары.
Профессиональные / Бесплатные решения для JoomShopping
Не лечи бесплатно, ибо тот, кто лечится бесплатно, рано или поздно перестает ценить свое здоровье,
а тот, кто лечит бесплатно, рано или поздно перестает ценить результаты своего труда/ (с) Гиппократ?
Не ищите ответов, ищите решение !
*

cirip

  • Захожу иногда
  • 112
  • 0 / 0
Re: LightBox на странице списка товаров
« Ответ #49 : 10.10.2016, 19:52:55 »
в шаблоне модуля, которым вы выводите товары.
Спасибо большое. Ну наконец то я нашел куда. ВСЕМ ПРИ БОЛЬШОЕ СПАСИБО!
Если мне надо вывести lightbox в модуле, то мне нужно прописывать везде то что сегодня делал?
« Последнее редактирование: 10.10.2016, 20:52:00 от cirip »
*

dmitry_stas

  • Легенда
  • 13151
  • 1234 / 8
Re: LightBox на странице списка товаров
« Ответ #50 : 10.10.2016, 22:08:10 »
скажем так этот код нужен для того, чтобы JavaScript модального окна загрузился. если он у вас уже загружен на странице - то можете не загружать дополнительно. если ен уверены - то лучше сделайте. все равно как я уже сказал даже если вы 50 раз вызовите метод, JavaScript все равно загрузится только 1 раз.
Тут дарят бакс просто за регистрацию! Успей получить!
Все советы на форуме раздаю бесплатно, то есть даром. Индивидуально бесплатно консультирую только по вопросам стоимости индивидуальных консультаций
*

Zhanadil1509

  • Захожу иногда
  • 126
  • 0 / 0
Re: LightBox на странице списка товаров
« Ответ #51 : 19.07.2017, 13:04:51 »
как я частично решил эту задачу:
в /components/com_jshopping/controllers/category.php добавил в функцию function view(){} строку:
Код
JSFactory::loadJsFilesLightBox();
это для подключения Lightbox в head

потом в /components/com_jshopping/templates/default/category/category_default.php изменил 49 строку:
Код
<a href="<?php print $product->product_link?>">
на:
Код
<a class="lightbox" href="<?php print $this->image_product_path?>/<?php print str_replace("thumb","full",$product->product_thumb_image);?>">


осталась проблема... открывается Lightbox с стрелочками, в котором можно листать все фотки в категориии, возможно это и удобно кому-то, я бы хотел от этого избавиться


Огромное тебе спасибо! Отличная решенная работа! Себе тоже так сделал. Круто работает!
*

prostoy

  • Захожу иногда
  • 392
  • 6 / 1
  • Истина где то рядом.
Re: LightBox на странице списка товаров
« Ответ #52 : 21.11.2018, 20:14:54 »
Добрый день!
Подскажите у меня Joomla! 3.9.0 и JoomShopping  Version 4.18.2
Понятно в файле /components/com_jshopping/controllers/category.php
добавил в функцию function view(){} строку:
Код
JSFactory::loadJsFilesLightBox();
А вот в файле  /components/com_jshopping/templates/default/category/category_default.php
У меня вот такой файл
Код
<?php 
/**
* @version      4.11.0 17.09.2015
* @author       MAXXmarketing GmbH
* @package      Jshopping
* [member=126442]copyright[/member]    Copyright (C) 2010 webdesigner-profi.de. All rights reserved.
* @license      GNU/GPL
*/
defined('_JEXEC') or die('Restricted access');

print $this->_tmp_category_html_start;
?>
<div class="jshop" id="comjshop">
<div style="display: table-cell; width:120px; margin-right:70px; padding: 40px;vertical-align:top;">
<img class="jshop_img" width="355px" src="<?php print $this->image_category_path;?>/<?php print $this->category->category_image; ?>" alt="<?php print htmlspecialchars($category->name)?>" title="<?php print htmlspecialchars($category->name)?>" />
</div>
<div style="display: table-cell;padding: 20px;vertical-align:top;">
<h1 class="catname"><?php print $this->category->name?></h1>
    <div class="category_description">
       
        <?php print $this->category->description?>
    </div>
</div>
   

    <div class="jshop_list_category">
    <?php if (count($this->categories)) : ?>
        <div class = "jshop list_category">
            <?php foreach($this->categories as $k=>$category) : ?>
           
                <?php if ($k % $this->count_category_to_row == 0) : ?>
                    <div class = "row-fluid">
                <?php endif; ?>
               
                <div class = "sblock<?php echo $this->count_category_to_row;?> jshop_categ category">
                    <div class = "sblock2 image">
                        <div style="text-align: center">
                        <a href = "<?php print $category->category_link;?>">
                            <img class="jshop_img" width="160" src="<?php print $this->image_category_path;?>/<?php if ($category->category_image) print $category->category_image; else print $this->noimage;?>" alt="<?php print htmlspecialchars($category->name)?>" title="<?php print htmlspecialchars($category->name)?>" />
                        </a></div>
                    <div class="sc1"><?php print $category->name;?></div>
                        <div class = "category_short_description">
                            <?php print $category->short_description?>
                        </div>                       
                    </div>
                    <div><a href = "<?php print $category->category_link;?>"><img src="images/color.png"/></a></div>
                </div>
               
                <?php if ($k % $this->count_category_to_row == $this->count_category_to_row - 1) : ?>
                    <div class = "clearfix"></div>
                    </div>
                <?php endif; ?>
               
            <?php endforeach; ?>
           
            <?php if ($k % $this->count_category_to_row != $this->count_category_to_row - 1) : ?>
                <div class = "clearfix"></div>
                </div>
            <?php endif; ?>
           
        </div>
    <?php endif; ?>
    </div>

<?php print $this->_tmp_category_html_before_products;?>
       
    <?php include(dirname(__FILE__)."/products.php");?>

<?php print $this->_tmp_category_html_end;?>
</div>
Что мне тут надо поменять?
Подскажите пожалуйста.
Заранее благодарен за ответ.
*

kit2m2

  • Живу я здесь
  • 3264
  • 267 / 0
  • Беру сайты на полное сопровождение
Re: LightBox на странице списка товаров
« Ответ #53 : 22.11.2018, 01:24:02 »
А цель какая в контролере добавлять LightBox? Добавляете сразу в шаблоне.

На будущее, если есть возможность, то лучше не править ядро компонента, а искать другие пути... Они существуют.
Расширения для JoomShopping | Расширения на заказ | Сайты и магазины под ключ: Дизайн, Верстка, Программирование, СЕО-оптимизация, Сопровождение, Перенос на Joomla 4+ и JoomShopping 5+
*

prostoy

  • Захожу иногда
  • 392
  • 6 / 1
  • Истина где то рядом.
Re: LightBox на странице списка товаров
« Ответ #54 : 22.11.2018, 09:10:54 »
Подскажите мне рукожопому как это сделать пожалуйста.  ^-^
Или если есть возможность дайте ссылку как это сделать.
Чтобы оставить сообщение,
Вам необходимо Войти или Зарегистрироваться
 

Определить расширение. pop_description для списка товаров

Автор Alex_gs

Ответов: 3
Просмотров: 576
Последний ответ 24.09.2023, 12:18:34
от kit2m2
[Решено] Увеличение выбора покупаемых товаров + -

Автор Aspik

Ответов: 216
Просмотров: 43215
Последний ответ 02.08.2023, 21:31:25
от kit2m2
Смена фото при наведении в списке товаров категории

Автор Taatshi

Ответов: 57
Просмотров: 3990
Последний ответ 15.06.2023, 15:53:25
от Akeksandr
[Решено] Вывод 3-х первых картинок в списке товаров категории

Автор rudoy24

Ответов: 29
Просмотров: 9749
Последний ответ 09.05.2023, 11:59:11
от Akeksandr
Шаблон фильтрации товаров

Автор Prevergenec

Ответов: 1
Просмотров: 1025
Последний ответ 23.01.2023, 18:13:43
от kit2m2