Создание табов (вкладок) в JoomShopping 4

Создание табов (вкладок) в JoomShopping 4

В интернет-магазине часто можно видеть вывод описания, отзывов, характеристик и т.д. в отдельных вкладках. Такой способ подачи информации существенно улучшает ее восприятие.

С включением фреймворка Bootstrap в Joomla! 3 создавать табы стало довольно просто просто.

И так, первым делом, если вы еще не сделали, необходимо подготовить ваш компонент JoomShopping к обновлениям, как это описано здесь. Если вы этого не сделаете, то после обновления все изменения будут утеряны.

Для создания табов необходимо отредактировать файл product_default.php, находящийся в папке по адресу: ваш_сайт/components/com_jshopping/templates/ваш_шаблон/product/ следующим образом:

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

Находим в файле product_default.php следующий код и удаляем его:

<?php if (count($this->videos)){?>
      <?php foreach($this->videos as $k=>$video) { ?>
            <?php if ($video->video_code) { ?>
                  
<div style="display:none" class="video_full" id="hide_video_<?php print $k?>"><?php echo $video->video_code?></div>

             <?php } else { ?>
                   <a style="display:none" class="video_full" id="hide_video_<?php print $k?>" href=""></a>
             <?php } ?>
       <?php } ?>
<?php }?>

далее находим следующий кусок кода и также удаляем его:

<?php print $this->_tmp_product_html_after_image_thumb;?>
      <?php if (count($this->videos)) { ?>
            <?php foreach($this->videos as $k=>$video) { ?>
                  <?php if ($video->video_code) { ?>
                        <a href="#" id="video_<?php print $k?>" onclick="showVideoCode(this.id);return false;">
                              <img class="jshop_video_thumb" src="<?php print $this->video_image_preview_path."/"; if ($video->video_preview) print $video->video_preview; else print 'video.gif'?>" alt="video" />
                        </a>
                  <?php } else { ?>
                        <a href="<?php print $this->video_product_path?>/<?php print $video->video_name?>" id="video_<?php print $k?>" onclick="showVideo(this.id, '<?php print $this->config->video_product_width;?>', '<?php print $this->config->video_product_height;?>'); return false;">
                              <img class="jshop_video_thumb" src="<?php print $this->video_image_preview_path."/"; if ($video->video_preview) print $video->video_preview; else print 'video.gif'?>" alt="video" />
                        </a>
                  <?php } ?>
            <?php } ?>
<?php }?>
<?php print $this->_tmp_product_html_after_video;?>

теперь ищем эту строку:

<?php if ( (count($this->images)>1) || (count($this->videos) && count($this->images)) ) {?>

и меняем ее на эту:

<?php if (count($this->images)>1) { ?>

Также мы будем выносить в табы описание и характеристики товара. Для этого удалим этот код:

<div class="jshop_prod_description">
      <?php print $this->product->description; ?>
</div>

затем этот:

<?php if ($this->config->product_show_weight && $this->product->product_weight > 0){?>

<div class="productweight"><?php print _JSHOP_WEIGHT?>: <span id="block_weight"><?php print formatweight($this->product->getWeight())?></span></div>
<?php } ?>

потом этот:

<?php if (is_array($this-&gt;product-&gt;extra_field)){?>
      <div class="extra_fields">
            <?php foreach($this-&gt;product-&gt;extra_field as $extra_field){?>
                  <?php if ($extra_field['grshow']){?>;
                        <div class='block_efg'>
                              <div class='extra_fields_group'><?php print $extra_field['groupname']?></div>
                  <?php }?>
                    <div class="extra_fields_el">
                              <span class="extra_fields_name"><?php print $extra_field['name'];?></span><?php if ($extra_field['description']){?>
                              <span class="extra_fields_description">
                                    <?php print $extra_field['description'];?>
                              </span>
                  <?php } ?>
                  <span class="extra_fields_value">
                        <?php print $extra_field['value'];?>
                  </span>
            </div>
            <?php if ($extra_field['grshowclose']){?>
                  </div>
            <?php }?>
      <?php }?>
      </div>
<?php }?>
 
<?php print $this->_tmp_product_html_after_ef;?>

и, наконец, этот:

print $this->_tmp_product_html_before_review;
include(dirname(__FILE__)."/review.php");

Теперь, сразу после строки:

</form>

вставляем этот код:

&amp;lt;?php $comments = JPATH_SITE . '/components/com_jcomments/jcomments.php'; if (file_exists($comments)) { require_once($comments); $options = array(); $options['object_id'] = $this-&gt;product-&gt;product_id;
		$options['object_group'] = 'com_jshopping';
		$options['published'] = 1;
		$count = JCommentsModel::getCommentsCount($options);
	} ?&gt;;
&lt;ul class="nav nav-tabs"&gt;
     &lt;li class="active"&gt;&lt;a href="#desc" data-toggle="tab"&gt;
&lt;h3&gt;&lt;?php echo _JSHOP_DESCRIPTION ?&gt;&lt;/h3&gt;
&lt;/a&gt;&lt;/li&gt;
&lt;?php if (($this-&gt;config-&gt;product_show_weight &amp; $this-&amp;&gt;product-&amp;amp;amp;amp;amp;gt;product_weight &amp;amp;amp;amp;amp;gt; 0) or (is_array($this-&amp;amp;amp;amp;amp;gt;product-&amp;amp;amp;amp;amp;gt;extra_field))) { ?&amp;amp;amp;amp;amp;gt;
            

&amp;amp;amp;amp;amp;lt;li&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;a href="#params" data-toggle="tab"&amp;amp;amp;amp;amp;gt;

&amp;amp;amp;amp;amp;lt;h3&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;?php echo _JSHOP_PANEL_PRODUCT_EXTRA_FIELDS?&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/h3&amp;amp;amp;amp;amp;gt;


&amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/li&amp;amp;amp;amp;amp;gt;


      &amp;amp;amp;amp;amp;lt;?php } if (count ($this-&amp;amp;amp;amp;amp;gt;demofiles)) { ?&amp;amp;amp;amp;amp;gt;
            

&amp;amp;amp;amp;amp;lt;li&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;a href="#demofiles" data-toggle="tab"&amp;amp;amp;amp;amp;gt;

&amp;amp;amp;amp;amp;lt;h3&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;?php echo _JSHOP_PANEL_PRODUCT_DEMO_FIELDS?&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/h3&amp;amp;amp;amp;amp;gt;


&amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/li&amp;amp;amp;amp;amp;gt;


      &amp;amp;amp;amp;amp;lt;?php } if (count($this-&amp;amp;amp;amp;amp;gt;videos)) { ?&amp;amp;amp;amp;amp;gt;
            

&amp;amp;amp;amp;amp;lt;li&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;a href="#video" data-toggle="tab"&amp;amp;amp;amp;amp;gt;

&amp;amp;amp;amp;amp;lt;h3&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;?php echo _JSHOP_PANEL_PRODUCT_VIDEO_FIELDS?&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/h3&amp;amp;amp;amp;amp;gt;


&amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/li&amp;amp;amp;amp;amp;gt;


      &amp;amp;amp;amp;amp;lt;?php } ?&amp;amp;amp;amp;amp;gt;
      

&amp;amp;amp;amp;amp;lt;li&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;a href="#review" data-toggle="tab"&amp;amp;amp;amp;amp;gt;

&amp;amp;amp;amp;amp;lt;h3&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;?php echo _JSHOP_ADD_REVIEW_PRODUCT . ' [' . $count . ']';?&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/h3&amp;amp;amp;amp;amp;gt;


&amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/li&amp;amp;amp;amp;amp;gt;


&amp;amp;amp;amp;amp;lt;/ul&amp;amp;amp;amp;amp;gt;




&amp;amp;amp;amp;amp;lt;div class="tab-content"&amp;amp;amp;amp;amp;gt;
      

&amp;amp;amp;amp;amp;lt;div class="tab-pane active" id="desc"&amp;amp;amp;amp;amp;gt;
            

&amp;amp;amp;amp;amp;lt;div class="jshop_prod_description"&amp;amp;amp;amp;amp;gt;
                  &amp;amp;amp;amp;amp;lt;?php print $this-&amp;amp;amp;amp;amp;gt;product-&amp;amp;amp;amp;amp;gt;description; ?&amp;amp;amp;amp;amp;gt;
            &amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


      &amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


      &amp;amp;amp;amp;amp;lt;?php if (($this-&amp;amp;amp;amp;amp;gt;config-&amp;amp;amp;amp;amp;gt;product_show_weight &amp;amp;amp;amp;amp;amp;&amp;amp;amp;amp;amp;amp; $this-&amp;amp;amp;amp;amp;gt;product-&amp;amp;amp;amp;amp;gt;product_weight &amp;amp;amp;amp;amp;gt; 0) or (is_array($this-&amp;amp;amp;amp;amp;gt;product-&amp;amp;amp;amp;amp;gt;extra_field))) { ?&amp;amp;amp;amp;amp;gt;
            

&amp;amp;amp;amp;amp;lt;div class="tab-pane" id="params"&amp;amp;amp;amp;amp;gt;
                  

&amp;amp;amp;amp;amp;lt;div class="productweight"&amp;amp;amp;amp;amp;gt;
                        &amp;amp;amp;amp;amp;lt;?php print _JSHOP_WEIGHT ?&amp;amp;amp;amp;amp;gt;: &amp;amp;amp;amp;amp;lt;span id="block_weight"&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;?php print formatweight($this-&amp;amp;amp;amp;amp;gt;product-&amp;amp;amp;amp;amp;gt;getWeight())?&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/span&amp;amp;amp;amp;amp;gt;
                  &amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


                  

&amp;amp;amp;amp;amp;lt;div class="extra_fields"&amp;amp;amp;amp;amp;gt;
                        &amp;amp;amp;amp;amp;lt;?php foreach($this-&amp;amp;amp;amp;amp;gt;product-&amp;amp;amp;amp;amp;gt;extra_field as $extra_field) { ?&amp;amp;amp;amp;amp;gt;
                              &amp;amp;amp;amp;amp;lt;?php if ($extra_field['grshow']) { ?&amp;amp;amp;amp;amp;gt;
                                    

&amp;amp;amp;amp;amp;lt;div class='block_efg'&amp;amp;amp;amp;amp;gt;
                                          

&amp;amp;amp;amp;amp;lt;div class='extra_fields_group'&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;?php print $extra_field['groupname']?&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


                              &amp;amp;amp;amp;amp;lt;?php }?&amp;amp;amp;amp;amp;gt;
                              

&amp;amp;amp;amp;amp;lt;div class="extra_fields_el"&amp;amp;amp;amp;amp;gt;
                                    &amp;amp;amp;amp;amp;lt;span class="extra_fields_name"&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;?php print $extra_field['name'];?&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/span&amp;amp;amp;amp;amp;gt;
                                    &amp;amp;amp;amp;amp;lt;?php if ($extra_field['description']) { ?&amp;amp;amp;amp;amp;gt; 
                                          &amp;amp;amp;amp;amp;lt;span class="extra_fields_description"&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;?php print $extra_field['description'];?&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/span&amp;amp;amp;amp;amp;gt;
                                    &amp;amp;amp;amp;amp;lt;?php } ?&amp;amp;amp;amp;amp;gt;:
                                    &amp;amp;amp;amp;amp;lt;span class="extra_fields_value"&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;?php print $extra_field['value'];?&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/span&amp;amp;amp;amp;amp;gt;
                              &amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


 
                              &amp;amp;amp;amp;amp;lt;?php if ($extra_field['grshowclose']) { ?&amp;amp;amp;amp;amp;gt;
                                    &amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


                              &amp;amp;amp;amp;amp;lt;?php } ?&amp;amp;amp;amp;amp;gt;
                        &amp;amp;amp;amp;amp;lt;?php } ?&amp;amp;amp;amp;amp;gt;
                  &amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


            &amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


      &amp;amp;amp;amp;amp;lt;?php } if (count ($this-&amp;amp;amp;amp;amp;gt;demofiles)) { ?&amp;amp;amp;amp;amp;gt;
            

&amp;amp;amp;amp;amp;lt;div class="tab-pane" id="demofiles"&amp;amp;amp;amp;amp;gt;
                  

&amp;amp;amp;amp;amp;lt;div id="list_product_demofiles"&amp;amp;amp;amp;amp;gt;
                        &amp;amp;amp;amp;amp;lt;?php include(dirname(__FILE__)."/demofiles.php"); ?&amp;amp;amp;amp;amp;gt;
                  &amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


            &amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


      &amp;amp;amp;amp;amp;lt;?php }?&amp;amp;amp;amp;amp;gt;
      &amp;amp;amp;amp;amp;lt;?php if (count($this-&amp;amp;amp;amp;amp;gt;videos)) { ?&amp;amp;amp;amp;amp;gt;
            

&amp;amp;amp;amp;amp;lt;div class="tab-pane" id="video"&amp;amp;amp;amp;amp;gt;
                  &amp;amp;amp;amp;amp;lt;?php foreach($this-&amp;amp;amp;amp;amp;gt;videos as $k=&amp;amp;amp;amp;amp;gt;$video) { ?&amp;amp;amp;amp;amp;gt;
                        &amp;amp;amp;amp;amp;lt;?php if ($video-&amp;amp;amp;amp;amp;gt;video_code) { ?&amp;amp;amp;amp;amp;gt;
                              

&amp;amp;amp;amp;amp;lt;div class="video_full" id="hide_video_&amp;amp;amp;amp;amp;lt;?php echo $k?&amp;amp;amp;amp;amp;gt;"&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;?php echo $video-&amp;amp;amp;amp;amp;gt;video_code?&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


                        &amp;amp;amp;amp;amp;lt;?php } else { ?&amp;amp;amp;amp;amp;gt;
                              &amp;amp;amp;amp;amp;lt;a href="&amp;amp;amp;amp;amp;lt;?php echo $this-&amp;amp;amp;amp;amp;gt;video_product_path?&amp;amp;amp;amp;amp;gt;/&amp;amp;amp;amp;amp;lt;?php echo $video-&amp;amp;amp;amp;amp;gt;video_name?&amp;amp;amp;amp;amp;gt;" id="video_&amp;amp;amp;amp;amp;lt;?php echo $k?&amp;amp;amp;amp;amp;gt;" onclick="jQuery(this).media( { width: &amp;amp;amp;amp;amp;lt;?php echo $this-&amp;amp;amp;amp;amp;gt;config-&amp;amp;amp;amp;amp;gt;video_product_width;?&amp;amp;amp;amp;amp;gt;, height: &amp;amp;amp;amp;amp;lt;?php echo $this-&amp;amp;amp;amp;amp;gt;config-&amp;amp;amp;amp;amp;gt;video_product_height;?&amp;amp;amp;amp;amp;gt;} ); return false;"&amp;amp;amp;amp;amp;gt;
                                    &amp;amp;amp;amp;amp;lt;img class="jshop_video_thumb" src="&amp;amp;amp;amp;amp;lt;?php echo $this-&amp;amp;amp;amp;amp;gt;video_image_preview_path."/"; if ($video-&amp;amp;amp;amp;amp;gt;video_preview) echo $video-&amp;amp;amp;amp;amp;gt;video_preview; else echo 'video.gif'?&amp;amp;amp;amp;amp;gt;" alt="video" /&amp;amp;amp;amp;amp;gt;
                              &amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;gt;
                        &amp;amp;amp;amp;amp;lt;?php } ?&amp;amp;amp;amp;amp;gt;
                  &amp;amp;amp;amp;amp;lt;?php } ?&amp;amp;amp;amp;amp;gt;
            &amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


      &amp;amp;amp;amp;amp;lt;?php } ?&amp;amp;amp;amp;amp;gt;
      

&amp;amp;amp;amp;amp;lt;div class="tab-pane" id="review"&amp;amp;amp;amp;amp;gt;
            &amp;amp;amp;amp;amp;lt;?php print $this-&amp;amp;amp;amp;amp;gt;_tmp_product_html_before_review;
            include(dirname(__FILE__)."/review.php"); ?&amp;amp;amp;amp;amp;gt;
      &amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


&amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


ВНИМАНИЕ!
Если вы НЕ используете компонент JComments для управления комментариями, используйте этот код:


&amp;amp;amp;amp;amp;lt;ul class="nav nav-tabs"&amp;amp;amp;amp;amp;gt;
      

&amp;amp;amp;amp;amp;lt;li class="active"&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;a href="#desc" data-toggle="tab"&amp;amp;amp;amp;amp;gt;

&amp;amp;amp;amp;amp;lt;h3&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;?php echo _JSHOP_DESCRIPTION ?&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/h3&amp;amp;amp;amp;amp;gt;


&amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/li&amp;amp;amp;amp;amp;gt;


      &amp;amp;amp;amp;amp;lt;?php if (($this-&amp;amp;amp;amp;amp;gt;config-&amp;amp;amp;amp;amp;gt;product_show_weight &amp;amp;amp;amp;amp;amp;&amp;amp;amp;amp;amp;amp; $this-&amp;amp;amp;amp;amp;gt;product-&amp;amp;amp;amp;amp;gt;product_weight &amp;amp;amp;amp;amp;gt; 0) or (is_array($this-&amp;amp;amp;amp;amp;gt;product-&amp;amp;amp;amp;amp;gt;extra_field))) { ?&amp;amp;amp;amp;amp;gt;
            

&amp;amp;amp;amp;amp;lt;li&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;a href="#params" data-toggle="tab"&amp;amp;amp;amp;amp;gt;

&amp;amp;amp;amp;amp;lt;h3&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;?php echo _JSHOP_PANEL_PRODUCT_EXTRA_FIELDS?&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/h3&amp;amp;amp;amp;amp;gt;


&amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/li&amp;amp;amp;amp;amp;gt;


      &amp;amp;amp;amp;amp;lt;?php } if (count ($this-&amp;amp;amp;amp;amp;gt;demofiles)) { ?&amp;amp;amp;amp;amp;gt;
            

&amp;amp;amp;amp;amp;lt;li&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;a href="#demofiles" data-toggle="tab"&amp;amp;amp;amp;amp;gt;

&amp;amp;amp;amp;amp;lt;h3&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;?php echo _JSHOP_PANEL_PRODUCT_DEMO_FIELDS?&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/h3&amp;amp;amp;amp;amp;gt;


&amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/li&amp;amp;amp;amp;amp;gt;


      &amp;amp;amp;amp;amp;lt;?php } if (count($this-&amp;amp;amp;amp;amp;gt;videos)) { ?&amp;amp;amp;amp;amp;gt;
            

&amp;amp;amp;amp;amp;lt;li&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;a href="#video" data-toggle="tab"&amp;amp;amp;amp;amp;gt;

&amp;amp;amp;amp;amp;lt;h3&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;?php echo _JSHOP_PANEL_PRODUCT_VIDEO_FIELDS?&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/h3&amp;amp;amp;amp;amp;gt;


&amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/li&amp;amp;amp;amp;amp;gt;


      &amp;amp;amp;amp;amp;lt;?php } if ($this-&amp;amp;amp;amp;amp;gt;allow_review) { ?&amp;amp;amp;amp;amp;gt;
            

&amp;amp;amp;amp;amp;lt;li&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;a href="#review" data-toggle="tab"&amp;amp;amp;amp;amp;gt;

&amp;amp;amp;amp;amp;lt;h3&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;?php echo _JSHOP_ADD_REVIEW_PRODUCT ?&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/h3&amp;amp;amp;amp;amp;gt;


&amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/li&amp;amp;amp;amp;amp;gt;


      &amp;amp;amp;amp;amp;lt;?php } ?&amp;amp;amp;amp;amp;gt;
&amp;amp;amp;amp;amp;lt;/ul&amp;amp;amp;amp;amp;gt;




&amp;amp;amp;amp;amp;lt;div class="tab-content"&amp;amp;amp;amp;amp;gt;
      

&amp;amp;amp;amp;amp;lt;div class="tab-pane active" id="desc"&amp;amp;amp;amp;amp;gt;
            

&amp;amp;amp;amp;amp;lt;div class="jshop_prod_description"&amp;amp;amp;amp;amp;gt;
                  &amp;amp;amp;amp;amp;lt;?php print $this-&amp;amp;amp;amp;amp;gt;product-&amp;amp;amp;amp;amp;gt;description; ?&amp;amp;amp;amp;amp;gt;
            &amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


      &amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


      &amp;amp;amp;amp;amp;lt;?php if (($this-&amp;amp;amp;amp;amp;gt;config-&amp;amp;amp;amp;amp;gt;product_show_weight &amp;amp;amp;amp;amp;amp;&amp;amp;amp;amp;amp;amp; $this-&amp;amp;amp;amp;amp;gt;product-&amp;amp;amp;amp;amp;gt;product_weight &amp;amp;amp;amp;amp;gt; 0) or (is_array($this-&amp;amp;amp;amp;amp;gt;product-&amp;amp;amp;amp;amp;gt;extra_field))) { ?&amp;amp;amp;amp;amp;gt;
            

&amp;amp;amp;amp;amp;lt;div class="tab-pane" id="params"&amp;amp;amp;amp;amp;gt;
                  

&amp;amp;amp;amp;amp;lt;div class="productweight"&amp;amp;amp;amp;amp;gt;
                        &amp;amp;amp;amp;amp;lt;?php print _JSHOP_WEIGHT ?&amp;amp;amp;amp;amp;gt;: &amp;amp;amp;amp;amp;lt;span id="block_weight"&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;?php print formatweight($this-&amp;amp;amp;amp;amp;gt;product-&amp;amp;amp;amp;amp;gt;getWeight())?&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/span&amp;amp;amp;amp;amp;gt;
                  &amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


            

&amp;amp;amp;amp;amp;lt;div class="extra_fields"&amp;amp;amp;amp;amp;gt;
                  &amp;amp;amp;amp;amp;lt;?php foreach($this-&amp;amp;amp;amp;amp;gt;product-&amp;amp;amp;amp;amp;gt;extra_field as $extra_field) { ?&amp;amp;amp;amp;amp;gt;
                        &amp;amp;amp;amp;amp;lt;?php if ($extra_field['grshow']) { ?&amp;amp;amp;amp;amp;gt;
                              

&amp;amp;amp;amp;amp;lt;div class='block_efg'&amp;amp;amp;amp;amp;gt;
                                    

&amp;amp;amp;amp;amp;lt;div class='extra_fields_group'&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;?php print $extra_field['groupname']?&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


                        &amp;amp;amp;amp;amp;lt;?php }?&amp;amp;amp;amp;amp;gt;
                        

&amp;amp;amp;amp;amp;lt;div class="extra_fields_el"&amp;amp;amp;amp;amp;gt;
                              &amp;amp;amp;amp;amp;lt;span class="extra_fields_name"&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;?php print $extra_field['name'];?&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/span&amp;amp;amp;amp;amp;gt;
                              &amp;amp;amp;amp;amp;lt;?php if ($extra_field['description']) { ?&amp;amp;amp;amp;amp;gt; 
                                    &amp;amp;amp;amp;amp;lt;span class="extra_fields_description"&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;?php print $extra_field['description'];?&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/span&amp;amp;amp;amp;amp;gt;
                              &amp;amp;amp;amp;amp;lt;?php } ?&amp;amp;amp;amp;amp;gt;:
                              &amp;amp;amp;amp;amp;lt;span class="extra_fields_value"&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;?php print $extra_field['value'];?&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/span&amp;amp;amp;amp;amp;gt;
                         &amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


 
                         &amp;amp;amp;amp;amp;lt;?php if ($extra_field['grshowclose']) { ?&amp;amp;amp;amp;amp;gt;
                               &amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


                         &amp;amp;amp;amp;amp;lt;?php } ?&amp;amp;amp;amp;amp;gt;
                   &amp;amp;amp;amp;amp;lt;?php } ?&amp;amp;amp;amp;amp;gt;
                   &amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


             &amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


             &amp;amp;amp;amp;amp;lt;?php } if (count ($this-&amp;amp;amp;amp;amp;gt;demofiles)) { ?&amp;amp;amp;amp;amp;gt;
                   

&amp;amp;amp;amp;amp;lt;div class="tab-pane" id="demofiles"&amp;amp;amp;amp;amp;gt;
                         

&amp;amp;amp;amp;amp;lt;div id="list_product_demofiles"&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;?php include(dirname(__FILE__)."/demofiles.php"); ?&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


                   &amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


             &amp;amp;amp;amp;amp;lt;?php }?&amp;amp;amp;amp;amp;gt;
             &amp;amp;amp;amp;amp;lt;?php if (count($this-&amp;amp;amp;amp;amp;gt;videos)) { ?&amp;amp;amp;amp;amp;gt;
                   

&amp;amp;amp;amp;amp;lt;div class="tab-pane" id="video"&amp;amp;amp;amp;amp;gt;
                         &amp;amp;amp;amp;amp;lt;?php foreach($this-&amp;amp;amp;amp;amp;gt;videos as $k=&amp;amp;amp;amp;amp;gt;$video) { ?&amp;amp;amp;amp;amp;gt;
                                &amp;amp;amp;amp;amp;lt;?php if ($video-&amp;amp;amp;amp;amp;gt;video_code) { ?&amp;amp;amp;amp;amp;gt;
                                     

&amp;amp;amp;amp;amp;lt;div class="video_full" id="hide_video_&amp;amp;amp;amp;amp;lt;?php echo $k?&amp;amp;amp;amp;amp;gt;"&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;?php echo $video-&amp;amp;amp;amp;amp;gt;video_code?&amp;amp;amp;amp;amp;gt;&amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


                                &amp;amp;amp;amp;amp;lt;?php } else { ?&amp;amp;amp;amp;amp;gt;
                                      &amp;amp;amp;amp;amp;lt;a href="&amp;amp;amp;amp;amp;lt;?php echo $this-&amp;amp;amp;amp;amp;gt;video_product_path?&amp;amp;amp;amp;amp;gt;/&amp;amp;amp;amp;amp;lt;?php echo $video-&amp;amp;amp;amp;amp;gt;video_name?&amp;amp;amp;amp;amp;gt;" id="video_&amp;amp;amp;amp;amp;lt;?php echo $k?&amp;amp;amp;amp;amp;gt;" onclick="jQuery(this).media( { width: &amp;amp;amp;amp;amp;lt;?php echo $this-&amp;amp;amp;amp;amp;gt;config-&amp;amp;amp;amp;amp;gt;video_product_width;?&amp;amp;amp;amp;amp;gt;, height: &amp;amp;amp;amp;amp;lt;?php echo $this-&amp;amp;amp;amp;amp;gt;config-&amp;amp;amp;amp;amp;gt;video_product_height;?&amp;amp;amp;amp;amp;gt;} ); return false;"&amp;amp;amp;amp;amp;gt;
                                            &amp;amp;amp;amp;amp;lt;img class="jshop_video_thumb" src="&amp;amp;amp;amp;amp;lt;?php echo $this-&amp;amp;amp;amp;amp;gt;video_image_preview_path."/"; if ($video-&amp;amp;amp;amp;amp;gt;video_preview) echo $video-&amp;amp;amp;amp;amp;gt;video_preview; else echo 'video.gif'?&amp;amp;amp;amp;amp;gt;" alt="video" /&amp;amp;amp;amp;amp;gt;
                                      &amp;amp;amp;amp;amp;lt;/a&amp;amp;amp;amp;amp;gt;
                                &amp;amp;amp;amp;amp;lt;?php } ?&amp;amp;amp;amp;amp;gt;
                         &amp;amp;amp;amp;amp;lt;?php } ?&amp;amp;amp;amp;amp;gt;
                   &amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


             &amp;amp;amp;amp;amp;lt;?php } ?&amp;amp;amp;amp;amp;gt;
             &amp;amp;amp;amp;amp;lt;?php if ($this-&amp;amp;amp;amp;amp;gt;allow_review){ ?&amp;amp;amp;amp;amp;gt;
                   

&amp;amp;amp;amp;amp;lt;div class="tab-pane" id="review"&amp;amp;amp;amp;amp;gt;
                         &amp;amp;amp;amp;amp;lt;?php print $this-&amp;amp;amp;amp;amp;gt;_tmp_product_html_before_review;
                         include(dirname(__FILE__)."/review.php"); ?&amp;amp;amp;amp;amp;gt;
                   &amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


             &amp;amp;amp;amp;amp;lt;?php }?&amp;amp;amp;amp;amp;gt;
&amp;amp;amp;amp;amp;lt;/div&amp;amp;amp;amp;amp;gt;


Теперь в папке ваш_сайт/components/com_jshopping/lang/override создадим файл ru-RU.php со следующим содержимым:

<?php defined('_JEXEC') or die(); define('_JSHOP_PANEL_PRODUCT_EXTRA_FIELDS', 'Характеристики'); define('_JSHOP_PANEL_PRODUCT_DEMO_FIELDS', 'Инструкции'); define('_JSHOP_PANEL_PRODUCT_VIDEO_FIELDS', 'Видео'); ?>

На этом все, если возникли вопросы, задавайте их в комментариях или на нашем форуме

Один комментарий на Создание табов (вкладок) в JoomShopping 4

Комментировать