Перейти к содержанию
Berto

Интеграция модуля в шаблон

Рекомендуемые сообщения

Возникла проблема интеграции модуля в шаблон Pav decor

opencart 1.5.6.1 + шаблон pav_decor

 

догадываюсь что изменения в коде нужны файла vqmod.но не знаю какие изменения внести, (я не профи)прошу помощи.

где-то тут:

<search position="replace"><![CDATA[
            <div id="tab-related"
            ]]></search>
            <add><![CDATA[<div id="tab-related"<?php echo ($cpt_status && !in_array('4', $tab_ids)) ? ' style="display:none;"' : ''; ?>]]></add>
        </operation>
    </file> 
 

вот ошибка vqmod модуля

 

File Name    : catalog/view/theme/pav_decor/template/product/product.tpl(5)

VQModObject::applyMod - SEARCH NOT FOUND (ABORTING MOD): <div id="tab-related"

 

сам vqmod

<modification>

    <id>Sort & Add extra tabs to product page</id>
    <version>2.0.1</version>
    <vqmver>2.3.2</vqmver>
    <author>bull5-i</author>

    <file name="admin/controller/catalog/product.php">
        <operation info="Get the custom tabs with contents">
            <search position="after"><![CDATA[
            $this->data['tab_design'] = $this->language->get('tab_design');
            ]]></search>
            <add><![CDATA[
        $this->data['cpt_status'] = $this->config->get('cpt_status');
        if ($this->data['cpt_status']) {
            $this->load->model('module/custom_product_tab');

            $this->data['tabs'] = $this->model_module_custom_product_tab->getTabs(array('type' => 'regular'));

            $content = array();

            if (isset($this->request->get['product_id']) && ($this->request->server['REQUEST_METHOD'] != 'POST')) {
                foreach ($this->data['tabs'] as $tab) {
                    $content[$tab['tab_id']] = $this->model_module_custom_product_tab->getProductTabContents($this->request->get['product_id'], $tab['tab_id']);
                }
            } elseif (!isset($this->request->get['product_id']) && ($this->request->server['REQUEST_METHOD'] != 'POST') && $this->config->get('cpt_use_default_for_new')) {
                foreach ($this->data['tabs'] as $tab) {
                    $content[$tab['tab_id']] = $this->model_module_custom_product_tab->getTabDefaults($tab['tab_id']);
                }
            }

            $this->data['tab_content'] = $content;
        }
            ]]></add>
        </operation>
    </file>

    <file name="admin/model/catalog/product.php">
        <operation info="Link the new product to all custom tabs">
            <search position="after"><![CDATA[
            $product_id = $this->db->getLastId();
            ]]></search>
            <add><![CDATA[
            if ($this->config->get('cpt_status')) {
                $this->db->query("INSERT INTO " . DB_PREFIX . "product_to_tab (product_id, tab_id) SELECT '" . (int)$product_id . "', pt.tab_id FROM " . DB_PREFIX . "product_tab pt");
            }
            ]]></add>
        </operation>
        <operation info="Insert custom tab contents to database">
            <search position="before"><![CDATA[
            foreach ($data['product_description'] as $language_id => $value)
            ]]></search>
            <add><![CDATA[
            if ($this->config->get('cpt_status') && isset($data['product_tab_content'])) {
                foreach ($data['product_tab_content'] as $tab_id => $languages) {
                    $admin_lang_value = $languages[$this->config->get('config_language_id')];
                    foreach ($languages as $language_id => $value) {
                        if ($this->config->get('cpt_use_admin_language_value') && trim($value) == '') {
                            $value = $admin_lang_value;
                        }
                        $this->db->query("INSERT INTO " . DB_PREFIX . "product_tab_content SET product_id = '" . (int)$product_id . "', tab_id = '" . (int)$tab_id . "', language_id = '" . (int)$language_id . "', content = '" . $this->db->escape($value) . "'");
                    }
                }
            }
            ]]></add>
        </operation>
        <operation info="Delete custom tabs contents">
            <search position="before" regex="true"><![CDATA[~\$this->db->query\("DELETE FROM " \. DB_PREFIX \. "product_description WHERE product_id = '" \. \(int\)\s?\$product_id \. "'"\);~]]></search>
            <add><![CDATA[
            if ($this->config->get('cpt_status')) {
                $this->db->query("DELETE FROM " . DB_PREFIX . "product_tab_content WHERE product_id = '" . (int)$product_id . "'");
            }
            ]]></add>
        </operation>
        <operation info="Delete all tabs linked to a product">
            <search position="after"><![CDATA[
            function deleteProduct
            ]]></search>
            <add><![CDATA[
            if ($this->config->get('cpt_status')) {
                $this->db->query("DELETE FROM " . DB_PREFIX . "product_to_tab WHERE product_id = '" . (int)$product_id . "'");
            }
            ]]></add>
        </operation>
        <operation info="Copy custom tab contents">
            <search position="before"><![CDATA[
            $data = array_merge($data, array('product_description' => $this->getProductDescriptions($product_id)));
            ]]></search>
            <add><![CDATA[
            if ($this->config->get('cpt_status')) {
                $this->load->model('module/custom_product_tab');

                $tabs = $this->model_module_custom_product_tab->getTabs(array('type' => 'regular'));

                $content = array();

                foreach ($tabs as $tab) {
                    $content[$tab['tab_id']] = $this->model_module_custom_product_tab->getProductTabContents($product_id, $tab['tab_id']);
                }

                $data = array_merge($data, array('product_tab_content' => $content));
            }
            ]]></add>
        </operation>
    </file>

    <file name="admin/model/localisation/language.php">
        <operation error="log" info="Duplicate admin language values for the new language">
            <search position="after"><![CDATA[
            $language_id = $this->db->getLastId()
            ]]></search>
            <add><![CDATA[
            $tabs = array();
            if ($this->config->get('cpt_installed')) {
                $this->db->query("INSERT INTO " . DB_PREFIX . "product_tab_name (tab_id, language_id, name) SELECT tab_id, '" . (int)$language_id . "', name FROM " . DB_PREFIX . "product_tab_name WHERE language_id = '" . (int)$this->config->get('config_language_id') . "'");

                $this->db->query("INSERT INTO " . DB_PREFIX . "product_tab_default (tab_id, language_id, content) SELECT tab_id, '" . (int)$language_id . "', " . ($this->config->get('cpt_use_admin_language_value') ? "content" : "''") . " FROM " . DB_PREFIX . "product_tab_default WHERE language_id = '" . (int)$this->config->get('config_language_id') . "'");

                $this->db->query("INSERT INTO " . DB_PREFIX . "product_tab_content (product_id, language_id, tab_id, content) SELECT p.product_id, '" . (int)$language_id . "', pt.tab_id , " . ($this->config->get('cpt_use_admin_language_value') ? "ptc.content" : "''") . " FROM " . DB_PREFIX . "product_tab pt JOIN " . DB_PREFIX . "product p LEFT JOIN " . DB_PREFIX . "product_tab_content ptc ON (ptc.tab_id = pt.tab_id AND ptc.language_id = '" . (int)$this->config->get('config_language_id') . "' AND ptc.product_id = p.product_id) WHERE pt.type = 'regular'");
            }
            ]]></add>
        </operation>
        <operation error="log" info="Delete values in the removed language">
            <search position="after"><![CDATA[
            function deleteLanguage($language_id)
            ]]></search>
            <add><![CDATA[
        if ($this->config->get('cpt_installed')) {
            $this->db->query("DELETE FROM " . DB_PREFIX . "product_tab_name WHERE language_id = '" . (int)$language_id . "'");
            $this->db->query("DELETE FROM " . DB_PREFIX . "product_tab_default WHERE language_id = '" . (int)$language_id . "'");
            $this->db->query("DELETE FROM " . DB_PREFIX . "product_tab_content WHERE language_id = '" . (int)$language_id . "'");
        }
            ]]></add>
        </operation>
    </file>

    <file name="admin/view/template/catalog/product_form.tpl">
        <operation info="Add custom tabs inputs">
            <search position="before" offset="1"><![CDATA[
            <td><?php echo $entry_tag; ?></td>
            ]]></search>
            <add><![CDATA[
              <?php if ($cpt_status) { ?>
              <?php foreach ($tabs as $tab) { ?>
              <tr>
                <td><?php echo $tab['name']; ?>:</td>
                <td><textarea name="product_tab_content[<?php echo $tab['tab_id']; ?>][<?php echo $language['language_id']; ?>]" id="tab<?php echo $tab['tab_id']; ?>-<?php echo $language['language_id']; ?>"><?php echo isset($tab_content[$tab['tab_id']][$language['language_id']]) ? $tab_content[$tab['tab_id']][$language['language_id']] : ''; ?></textarea></td>
              </tr>
              <?php } ?>
              <?php } ?>
            ]]></add>
        </operation>
        <operation info="Initialize CKEDITOR for custom tabs">
            <search position="before"><![CDATA[
            <?php echo $footer; ?>
            ]]></search>
            <add><![CDATA[
<?php if ($cpt_status) { ?>
<script type="text/javascript"><!--
<?php foreach ($languages as $language) { ?>
<?php foreach ($tabs as $tab) { ?>
CKEDITOR.replace('tab<?php echo $tab['tab_id']; ?>-<?php echo $language['language_id']; ?>', {
  filebrowserBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
  filebrowserImageBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
  filebrowserFlashBrowseUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
  filebrowserUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
  filebrowserImageUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>',
  filebrowserFlashUploadUrl: 'index.php?route=common/filemanager&token=<?php echo $token; ?>'
});
<?php } ?>
<?php } ?>
//--></script>
<?php } ?>
            ]]></add>
        </operation>
    </file>

    <file name="catalog/controller/product/product.php">
        <operation info="Get product custom tabs">
            <search position="before"><![CDATA[
            $this->data['tags'] = array();
            ]]></search>
            <add><![CDATA[
            $this->data['cpt_status'] = $this->config->get('cpt_status');
            if ($this->config->get('cpt_status')) {
                $product_tabs = $this->model_catalog_product->getProductTabs($this->request->get['product_id']);
                $tabs = array();
                $tab_ids = array();
                foreach ($product_tabs as $tab) {
                    if ((int)$tab['login'] && !$this->customer->isLogged()) continue;

                    $tab['content'] = html_entity_decode($tab['content'], ENT_QUOTES, 'UTF-8');
                    $tabs[] = $tab;
                    $tab_ids[] = $tab['tab_id'];
                }
                $this->data['cpt_show_always'] = $this->config->get('cpt_show_always');
                $this->data['tabs'] = $tabs;
                $this->data['tab_ids'] = $tab_ids;
            }
            ]]></add>
        </operation>
    </file>

    <file name="catalog/model/catalog/product.php">
        <operation info="Function to load product custom tabs">
            <search position="after"><![CDATA[
            class ModelCatalogProduct extends Model {
            ]]></search>
            <add><![CDATA[
    public function getProductTabs($product_id) {
        $query = $this->db->query("SELECT t.*, p2t.status AS product_tab_status, tn.name, tc.content FROM " . DB_PREFIX . "product_tab t JOIN " . DB_PREFIX . "product_to_tab p2t ON (t.tab_id = p2t.tab_id) LEFT JOIN " . DB_PREFIX . "product_tab_name tn ON (t.tab_id = tn.tab_id AND tn.language_id = '" . (int)$this->config->get('config_language_id') . "') LEFT JOIN " . DB_PREFIX . "product_tab_content tc ON (t.tab_id = tc.tab_id AND tc.language_id = '" . (int)$this->config->get('config_language_id') . "' AND tc.product_id = '" . (int)$product_id . "') WHERE p2t.product_id = '" . (int)$product_id . "' AND t.status = '1' AND p2t.status = '1' ORDER BY t.sort_order ASC");

        if ($query->num_rows) {
            return $query->rows;
        } else {
            return array();
        }
    }
            ]]></add>
        </operation>
    </file>

    <!-- For custom theme integration duplicate the following block -->
    <!-- Copy: START -->
    <file name="catalog/view/theme/pav_decor/template/product/product.tpl">
        <operation info="Replace the original tabs header">
            <!--
                This replaces the original tabs header (that contains the tab names) container with the custom one.

                Note that custom templates can use different markup for the tabs. List items are one of the most common alternatives used.
            -->
            <search position="replace"><![CDATA[
            <div id="tabs" class="htabs">
            ]]></search>
            <add><![CDATA[
  <?php if ($cpt_status) { ?>
  <div id="tabs" class="htabs">
  <?php foreach ($tabs as $tab) {
    switch ((int)$tab['tab_id']) {
      case 1: ?>
      <a href="#tab-description"><?php echo $tab['name']; ?></a>
      <?php break;
      case 2: ?>
      <?php if ($attribute_groups) { ?>
      <a href="#tab-attribute"><?php echo $tab['name']; ?></a>
      <?php } ?>
      <?php break;
      case 3: ?>
      <?php if ($review_status) { ?>
      <a href="#tab-review"><?php echo $tab['name']; ?></a>
      <?php } ?>
      <?php break;
      case 4: ?>
      <?php if ($products) { ?>
      <a href="#tab-related"><?php echo $tab['name']; ?></a>
      <?php } ?>
      <?php break;
      default: ?>
      <?php if ($tab['type'] == 'reserved') { ?>
      <a href="#<?php echo $tab['key']; ?>"><?php echo $tab['name']; ?></a>
      <?php } else if (trim($tab['content']) || $tab['type'] == 'reserved' || $cpt_show_always) { ?>
      <a href="#tab-custom-<?php echo $tab['tab_id']; ?>"><?php echo $tab['name']; ?></a>
      <?php } ?>
      <?php break;
    }
  } ?>
  </div>
  <div style="display:none;">
  <?php } else { ?>
  <div id="tabs" class="htabs">
  <?php } ?>
            ]]></add>
        </operation>
        <operation info="Insert the custom tabs content blocks">
            <!--
                This inserts the content blocks for all of the custom/extra tabs. Usually these need to be on the same level with the Description tab content element. The best location would be after the Description tab content element. Their order of appearance does not usually matter.

                Just make sure they use the same markup as the Description tab content element does. Pay attention to the class attribute, it should  match the class attribute used for the Description tab.
            -->
            <search position="after"><![CDATA[
            <div id="tab-description"
            ]]></search>
            <add><![CDATA[
  <?php if ($cpt_status) {
  foreach ($tabs as $tab) {
    switch ($tab['tab_id']) {
      case '1':
      case '2':
      case '3':
      case '4':
        break;
      default:
  if ($tab['type'] != 'reserved' && (trim($tab['content']) || $cpt_show_always)) { ?>
  <div id="tab-custom-<?php echo $tab['tab_id']; ?>" class="tab-content" style="display:none;"><?php echo $tab['content']; ?></div>
  <?php }
        break;
    }
  }
  } ?>
            ]]></add>
        </operation>
        <operation info="Hide the Description tab if disabled">
            <!--
                This hides the Description tab content block if Description tab has been disabled in the Custom Product Tab PRO settings.
            -->
            <search position="replace"><![CDATA[
            <div id="tab-description"
            ]]></search>
            <add><![CDATA[<div id="tab-description"<?php echo ($cpt_status && !in_array('1', $tab_ids)) ? ' style="display:none;"' : ''; ?>]]></add>
        </operation>
        <operation info="Hide the Attributes/Specification tab if disabled">
            <!--
                This hides the Specification tab content block if Specification tab has been disabled in the Custom Product Tab PRO settings.
            -->
            <search position="replace"><![CDATA[
            <div id="tab-attribute"
            ]]></search>
            <add><![CDATA[<div id="tab-attribute"<?php echo ($cpt_status && !in_array('2', $tab_ids)) ? ' style="display:none;"' : ''; ?>]]></add>
        </operation>
        <operation info="Hide the Reviews tab if disabled">
            <!--
                This hides the Reviews tab content block if Reviews tab has been disabled in the Custom Product Tab PRO settings.
            -->
            <search position="replace"><![CDATA[
            <div id="tab-review"
            ]]></search>
            <add><![CDATA[<div id="tab-review"<?php echo ($cpt_status && !in_array('3', $tab_ids)) ? ' style="display:none;"' : ''; ?>]]></add>
        </operation>
        <operation info="Hide the Related Products tab if disabled">
            <!--
                This hides the Related Products tab content block if Related Products tab has been disabled in the Custom Product Tab PRO settings.
            -->
            <search position="replace"><![CDATA[
            <div id="tab-related"
            ]]></search>
            <add><![CDATA[<div id="tab-related"<?php echo ($cpt_status && !in_array('4', $tab_ids)) ? ' style="display:none;"' : ''; ?>]]></add>
        </operation>
    </file>
    <!-- Copy: END -->

</modification>

<!--
<modification>  - This is the highest level of the file and there can only be one
<id>            - This is the name of the mod. Format: Free form text. (Informational)
<version>       - This is the version of the mod. Format: Number and Decimal (1.0.0) (Informational)
<author>        - This is the author of the mod. Format: Free form text (Informational)
<file>          - This is the name of the file to modify. Requires attribute "name" as relative filename (catalog/controller/product/product.php). There can be multiple
<operation>     - This is the wrapper of the actual operation occuring. There can be multiple operations to the same file.
<search>        - This is the first required step of the operation. Uses an optional attribute "position" set to before|after|replace. replace is default. One per operation. Use CDATA tags to wrap code.
<add>           - This is the second required step of the operation. Uses an optional attribute "trim" set to true|false to trim away whitespace and linebreaks. false is default. One per operation. Location of added data depends on the position of the <search> command. Use CDATA tags to wrap code.
<![CDATA[  ]]>  - These are called CDATA tags and they are used by xml to specify that the data between should not be evaluated.
-->

product.tpl шаблона 

<?php require( DIR_TEMPLATE.$this->config->get('config_template')."/template/common/config.tpl" );

  $themeConfig = $this->config->get('themecontrol');
  $productConfig = array(
      'product_enablezoom'         => 1,
      'product_zoommode'           => 'basic',
      'product_zoomeasing'         => 1,
      'product_zoomlensshape'      => "round",
      'product_zoomlenssize'       => "150",
      'product_zoomgallery'        => 0,
      'enable_product_customtab'   => 0,
      'product_customtab_name'     => '',
      'product_customtab_content'  => '',
      'product_related_column'     => 0,
  );
  $languageID = $this->config->get('config_language_id');
  $productConfig = array_merge( $productConfig, $themeConfig );
  
?>
<?php echo $header; ?>
<div id="breadcrumb">
  <div class="container">
    <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
    </div>

  </div>
</div>

<div id="group-content">
<?php if( $SPAN[0] ): ?>
  <div class="span<?php echo $SPAN[0];?>">
    <?php echo $column_left; ?>
  </div>
<?php endif; ?> 
<div class="span<?php echo $SPAN[1];?>">
<div id="content"><?php echo $content_top; ?>
  
 
  <div class="product-info">
  <div class="row-fluid">
 <?php if ($thumb || $images) { ?>
    <div class="span5 image-container">
      
       
        <?php if ($thumb) { ?>
        <div class="image">
	 <?php if( $special )  { ?>
          <div class="product-label-special label"><?php echo $this->language->get( 'text_sale' ); ?></div>
        <?php } ?>
	<a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox">
          <img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image"  data-zoom-image="<?php echo $popup; ?>" class="product-image-zoom"/></a></div>
        <?php } ?>
        <?php if ($images) { ?>
        <div class="image-additional slide carousel" id="image-additional"><div class="carousel-inner">
        <?php 
        if( $productConfig['product_zoomgallery'] == 'slider' && $thumb ) {  
          $eimages = array( 0=> array( 'popup'=>$popup,'thumb'=> $thumb )  ); 
          $images = array_merge( $eimages, $images );
        }
        $icols = 3; $i= 0;
        foreach ($images as  $image) { ?>
          <?php if( (++$i)%$icols == 1 ) { ?>
          <div class="item">
          <?php } ?>

              <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox" data-zoom-image="<?php echo $image['popup']; ?>" data-image="<?php echo $image['popup']; ?>">
                <img src="<?php echo $image['thumb']; ?>" style="max-width:<?php echo $this->config->get('config_image_additional_width');?>px"  title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" data-zoom-image="<?php echo $image['popup']; ?>" class="product-image-zoom" />
              </a>
            <?php if( $i%$icols == 0 || $i==count($images) ) { ?>
              </div>
          <?php } ?>
        <?php } ?>
      </div>
            <div class="carousel-control left" href="#image-additional" data-slide="prev">‹</div>
        <div class="carousel-control right" href="#image-additional" data-slide="next">›</div>
        </div>
          

          <script type="text/javascript">
            $('#image-additional .item:first').addClass('active');
            $('#image-additional').carousel({interval:false})
          </script>

        <?php } ?>


    </div>
    <?php } ?>
    <div class="span7">
      <div class="product-info-item">
     <h2><span class="icon"></span><span><?php echo $heading_title; ?></span></h2>

      <?php if ($review_status) { ?>
      <div class="review clearfix">
        <div><img src="catalog/view/theme/<?php echo $this->config->get('config_template');?>/image/stars-<?php echo $rating; ?>.png" alt="<?php echo $reviews; ?>" />  <a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a>  |  <a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a></div>
        <div class="share clearfix"><!-- AddThis Button BEGIN -->
          <div class="addthis_default_style"><a class="addthis_button_compact"><?php echo $text_share; ?></a> <a class="addthis_button_email"></a><a class="addthis_button_print"></a> <a class="addthis_button_facebook"></a> <a class="addthis_button_twitter"></a></div>
          <script type="text/javascript" src="//s7.addthis.com/js/250/addthis_widget.js"></script> 
          <!-- AddThis Button END --> 
        </div>
      </div>
      <?php } ?>
      
      <div class="description">
        <?php if ($manufacturer) { ?>
        <span><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br />
        <?php } ?>
        <span><?php echo $text_model; ?></span> <?php echo $model; ?><br />
        <?php if ($reward) { ?>
        <span><?php echo $text_reward; ?></span> <?php echo $reward; ?><br />
        <?php } ?>
		<!-- Выводим атрибут -->
      <?php if ($attribute_groups) { ?>
        <?php foreach ($attribute_groups as $attribute_group) { ?>
          <?php if ($attribute_group['name'] == 'Матрасы') { ?>
            <?php foreach ($attribute_group['attribute'] as $attribute) { ?>
              <span><?php echo $attribute['name']; ?></span> <?php echo html_entity_decode($attribute['text']); ?><br />
            <?php } ?>
          <?php } ?>
        <?php } ?>
      <?php } ?>
  <!-- Выводим атрибут Конец -->
        </div>
	

     <div class="addition-actions">
      <div class="price-info pull-left">
        <?php if ($price) { ?>
          <div class="price">
           <?php if (!$special) { ?>
              <?php echo $price; ?>
              <?php } else { ?>
              <span class="price-old"><?php echo $price; ?></span> <span class="price-new"><?php echo $special; ?></span>
              <?php } ?>
          </div>
      <?php } ?>
         
        <?php if ($minimum > 1) { ?>
          <div class="minimum"><?php echo $text_minimum; ?></div>
        <?php } ?>
        <?php if ($price) { ?>
      <div class="price-other"><?php //echo $text_price; ?>
     
        <?php if ($tax) { ?>
        <span class="price-tax"><?php echo $text_tax; ?> <?php echo $tax; ?></span><br />
        <?php } ?>
        <?php if ($points) { ?>
        <span class="reward"><small><?php echo $text_points; ?> <?php echo $points; ?></small></span><br />
        <?php } ?>
        <?php if ($discounts) { ?>
        <br />
        <div class="discount">
          <?php foreach ($discounts as $discount) { ?>
          <?php echo sprintf($text_discount, $discount['quantity'], $discount['price']); ?><br />
          <?php } ?>
        </div>
        <?php } ?>
      </div>
      <?php } ?>
    
  
      </div>
	 
       <span class="cart-info product-extra pull-right">
          <span class="quantity-adder">
          <?php echo $text_qty; ?>
          <input type="text" name="quantity" size="2" value="<?php echo $minimum; ?>" />
            <span class="add-up add-action"><span class="fa fa-sort-desc"></span></span> <span class="add-down add-action"><span class="fa fa-sort-asc"></span></span>
          </span>
          <input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" />
           
          <span><input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" /></span>
         <!-- <span>  <?php //echo $text_or; ?>  </span> -->
         
          </span>
       
    </div>
	<div class="wishlist-compare">
         <span class="wishlist"><a onclick="addToWishList('<?php echo $product_id; ?>');"><?php echo $button_wishlist; ?></a></span>
       <span class="compare"><a onclick="addToCompare('<?php echo $product_id; ?>');"><?php echo $button_compare; ?></a></span>
    </div>
      <?php if ($profiles): ?>
      <div class="option">
          <h2><span class="required">*</span><?php echo $text_payment_profile ?></h2>
          <br />
          <select name="profile_id">
              <option value=""><?php echo $text_select; ?></option>
              <?php foreach ($profiles as $profile): ?>
              <option value="<?php echo $profile['profile_id'] ?>"><?php echo $profile['name'] ?></option>
              <?php endforeach; ?>
          </select>
          <br />
          <br />
          <span id="profile-description"></span>
          <br />
          <br />
      </div>
      <?php endif; ?>
      <?php if ($options) { ?>
      <div class="options">
        <h2><?php echo $text_option; ?></h2>
        <br />
        <?php foreach ($options as $option) { ?>
        <?php if ($option['type'] == 'select') { ?>
          <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
            <?php if ($option['required']) { ?>
            <span class="required">*</span>
            <?php } ?>
            <b><?php echo $option['name']; ?>:</b><br />
            <select name="option[<?php echo $option['product_option_id']; ?>]">
              <option value=""><?php echo $text_select; ?></option>
              <?php foreach ($option['option_value'] as $option_value) { ?>
              <option value="<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
              <?php if ($option_value['price']) { ?>
              (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
              <?php } ?>
              </option>
              <?php } ?>
            </select>
          </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'radio') { ?>
          <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
            <?php if ($option['required']) { ?>
            <span class="required">*</span>
            <?php } ?>
            <b><?php echo $option['name']; ?>:</b><br />
            <?php foreach ($option['option_value'] as $option_value) { ?>
            <input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" />
            <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
              <?php if ($option_value['price']) { ?>
              (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
              <?php } ?>
            </label>
            <br />
            <?php } ?>
          </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'checkbox') { ?>
          <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
            <?php if ($option['required']) { ?>
            <span class="required">*</span>
            <?php } ?>
            <b><?php echo $option['name']; ?>:</b><br />
            <?php foreach ($option['option_value'] as $option_value) { ?>
            <input type="checkbox" name="option[<?php echo $option['product_option_id']; ?>][]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" />
            <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
              <?php if ($option_value['price']) { ?>
              (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
              <?php } ?>
            </label>
            <br />
            <?php } ?>
          </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'image') { ?>
          <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
            <?php if ($option['required']) { ?>
            <span class="required">*</span>
            <?php } ?>
            <b><?php echo $option['name']; ?>:</b><br />
            <table class="option-image">
              <?php foreach ($option['option_value'] as $option_value) { ?>
              <tr>
                <td style="width: 1px;"><input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /></td>
                <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" /></label></td>
                <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
                    <?php if ($option_value['price']) { ?>
                    (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
                    <?php } ?>
                  </label></td>
              </tr>
              <?php } ?>
            </table>
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'text') { ?>
          <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
            <?php if ($option['required']) { ?>
            <span class="required">*</span>
            <?php } ?>
            <b><?php echo $option['name']; ?>:</b><br />
            <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" />
          </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'textarea') { ?>
          <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
            <?php if ($option['required']) { ?>
            <span class="required">*</span>
            <?php } ?>
            <b><?php echo $option['name']; ?>:</b><br />
            <textarea name="option[<?php echo $option['product_option_id']; ?>]" cols="40" rows="5"><?php echo $option['option_value']; ?></textarea>
          </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'file') { ?>
          <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
            <?php if ($option['required']) { ?>
            <span class="required">*</span>
            <?php } ?>
            <b><?php echo $option['name']; ?>:</b><br />
            <input type="button" value="<?php echo $button_upload; ?>" id="button-option-<?php echo $option['product_option_id']; ?>" class="button">
            <input type="hidden" name="option[<?php echo $option['product_option_id']; ?>]" value="" />
          </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'date') { ?>
          <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
            <?php if ($option['required']) { ?>
            <span class="required">*</span>
            <?php } ?>
            <b><?php echo $option['name']; ?>:</b><br />
            <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="date" />
          </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'datetime') { ?>
          <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
            <?php if ($option['required']) { ?>
            <span class="required">*</span>
            <?php } ?>
            <b><?php echo $option['name']; ?>:</b><br />
            <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="datetime" />
          </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'time') { ?>
          <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
            <?php if ($option['required']) { ?>
            <span class="required">*</span>
            <?php } ?>
            <b><?php echo $option['name']; ?>:</b><br />
            <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="time" />
          </div>
        <br />
        <?php } ?>
        <?php } ?>
      </div>
      <?php } ?>
  
      <?php if ($tags) { ?>
      <div class="tags"><b><?php echo $text_tags; ?></b>
        <?php for ($i = 0; $i < count($tags); $i++) { ?>
        <?php if ($i < (count($tags) - 1)) { ?>
        <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>,
        <?php } else { ?>
        <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>
        <?php } ?>
        <?php } ?>
      </div>
      <?php } ?>
  

    </div>
  </div>
  </div>
</div>
  <div class="tabs-group">
  <div id="tabs" class="htabs"><a href="#tab-description"><?php echo $tab_description; ?></a>
    <?php if ($attribute_groups) { ?>
    <a href="#tab-attribute"><?php echo $tab_attribute; ?></a>
    <?php } ?>
    <?php if ($review_status) { ?>
    <a href="#tab-review"><?php echo $tab_review; ?></a>
    <?php } ?>
    <?php if( $productConfig['enable_product_customtab'] && isset($productConfig['product_customtab_name'][$languageID]) ) { ?>
     <a href="#tab-customtab"><?php echo $productConfig['product_customtab_name'][$languageID]; ?></a>
   <?php } ?> 

  </div>
  <div id="tab-description" class="tab-content"><?php echo $description; ?></div>
  <?php if ($attribute_groups) { ?>
  <div id="tab-attribute" class="tab-content">
    <table class="attribute">
      <?php foreach ($attribute_groups as $attribute_group) { ?>
      <thead>
        <tr>
          <td colspan="2"><?php echo $attribute_group['name']; ?></td>
        </tr>
      </thead>
      <tbody>
        <?php foreach ($attribute_group['attribute'] as $attribute) { ?>
        <tr>
          <td><?php echo $attribute['name']; ?></td>
          <td><?php echo $attribute['text']; ?></td>
        </tr>
        <?php } ?>
      </tbody>
      <?php } ?>
    </table>
  </div>
  <?php } ?>
  <?php if ($review_status) { ?>
  <div id="tab-review" class="tab-content">
    <div id="review"></div>
    <h2 id="review-title"><?php echo $text_write; ?></h2>
    <b><?php echo $entry_name; ?></b><br />
    <input type="text" name="name" value="" />
    <br />
    <br />
    <b><?php echo $entry_review; ?></b>
    <textarea name="text" cols="40" rows="8" style="width: 98%;"></textarea>
    <span style="font-size: 11px;"><?php echo $text_note; ?></span><br />
    <br />
    <b><?php echo $entry_rating; ?></b> <span><?php echo $entry_bad; ?></span> 
    <input type="radio" name="rating" value="1" />
     
    <input type="radio" name="rating" value="2" />
     
    <input type="radio" name="rating" value="3" />
     
    <input type="radio" name="rating" value="4" />
     
    <input type="radio" name="rating" value="5" />
     <span><?php echo $entry_good; ?></span><br />
    <br />
    <b><?php echo $entry_captcha; ?></b><br /> <br /> 
  <img src="index.php?route=product/product/captcha" alt="" id="captcha" />
    <br />
      <br />
    <input type="text" name="captcha" value="" />
    <br />
       <br />
    <div>
      <div class="pull-right"><a id="button-review" class="button"><?php echo $button_continue; ?></a></div>
    </div>
  </div>
  <?php } ?>

    <?php if( $productConfig['enable_product_customtab'] && isset($productConfig['product_customtab_content'][$languageID]) ) { ?>
     <div id="tab-customtab" class="tab-content custom-tab">
      <div class="inner">
        <?php echo html_entity_decode( $productConfig['product_customtab_content'][$languageID], ENT_QUOTES, 'UTF-8'); ?>
      </div></div>
   <?php } ?> 
  </div>
   
    <?php if ($products) { ?>
  
<div class="box product-related highlight">
  <h3 class="box-heading"><span class="title-related"><?php echo $tab_related; ?> (<?php echo count($products); ?>)</span></h3>
  <div id="related" class="slide" data-interval="0">
    <div class="carousel-controls">
      <a class="carousel-control left" href="#related" data-slide="prev">‹</a>
      <a class="carousel-control right" href="#related" data-slide="next">›</a>
    </div>
<div class="carousel-inner">
  <?php
  $max_related_column = 3; 
  if( isset($productConfig['product_related_column']) && $productConfig['product_related_column'] ){
    $max_related_column = $productConfig['product_related_column'];
  }
  $cols = $max_related_column;
    $span = floor(12/$cols);
  foreach ($products as $i => $product) { ?>
        <?php if( $i++%$cols == 0 ) { ?>
                <div class="item <?php if($i==1) {?>active<?php } ?>">
          <div class="row-fluid">
        <?php } ?> 
   <div class="span<?php echo $span;?> product-block">
    	<div class="product-inner">
      <?php if ($product['thumb']) { ?>
      <div class="image">
	  <?php if( $product['special'] ) {   ?>
    	<span class="product-label-special label"><?php echo $this->language->get( 'text_sale' ); ?></span>
    	<?php } ?>
		<?php $zimage = str_replace( "cache/","", preg_replace("#-\d+x\d+#", "",  $product['thumb'] )); ?>
        <a class="img" href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" title="<?php echo $product['name']; ?>" alt="<?php echo $product['name']; ?>" /></a>
		<script type="text/javascript">
			$(document).ready(function() {
				var id = <?php echo $product['product_id'];?>;
				$('#colorbox_' + id).colorbox();
			});
		</script> 
      </div>
      <?php } ?>     
      <div class="product-meta">
      <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
 
	  <?php if ($product['rating']) { ?>
      <div class="rating"><img src="catalog/view/theme/<?php echo $this->config->get('config_template');?>/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
      <?php } ?>
		  <div class="wishlist">	<a onclick="addToWishList('<?php echo $product['product_id']; ?>');" title="<?php echo $button_wishlist; ?>" ><?php echo $button_wishlist; ?></a></div>
		  <div class="compare" ><a onclick="addToCompare('<?php echo $product['product_id']; ?>');" title="<?php echo $button_compare; ?>" ><?php echo $button_compare; ?></a></div>
	 
	  
	 <div class="price-cart">
     <?php if ($product['price']) { ?>
        <div class="price pull-left">
          <?php if (!$product['special']) { ?>
          <?php echo $product['price']; ?>
          <?php } else { ?>
          <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
          <?php } ?>
        </div>
        <?php } ?>
       <div class="cart">
			<input type="button" value="<?php echo $button_cart; ?>" onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button" />
		  </div>
		</div>  
      </div>
      </div>
    </div>
   <?php if( $i%$cols == 0 || $i==count($products) ) { ?>
   </div>
  </div>
   <?php } ?>
        
    <?php } ?>
  </div>
  </div>
  </div>
  <?php } ?> 
  
  <?php echo $content_bottom; ?></div>
  <?php if( $productConfig['product_enablezoom'] ) { ?>
<script type="text/javascript" src=" catalog/view/theme/<?php echo $this->config->get('config_template'); ?>/javascript/elevatezoom/elevatezoom-min.js"></script>
<script type="text/javascript">
 <?php if( $productConfig['product_zoomgallery'] == 'slider' ) {  ?>
  $("#image").elevateZoom({gallery:'image-additional', cursor: 'pointer', galleryActiveClass: 'active'}); 
  <?php } else { ?>
  var zoomCollection = '<?php echo $productConfig["product_zoomgallery"]=="basic"?".product-image-zoom":"#image";?>';
   $( zoomCollection ).elevateZoom({
      <?php if( $productConfig['product_zoommode'] != 'basic' ) { ?>
      zoomType        : "<?php echo $productConfig['product_zoommode'];?>",
      <?php } ?>
      lensShape : "<?php echo $productConfig['product_zoomlensshape'];?>",
      lensSize    : <?php echo (int)$productConfig['product_zoomlenssize'];?>,
  
   });
  <?php } ?> 
</script>
<?php } ?>
<script type="text/javascript"><!--
$(document).ready(function() {
  $('.colorbox').colorbox({
    overlayClose: true,
    opacity: 0.5,
    rel: "colorbox"
  });
});
//--></script> 
<script type="text/javascript"><!--

$('select[name="profile_id"], input[name="quantity"]').change(function(){
    $.ajax({
		url: 'index.php?route=product/product/getRecurringDescription',
		type: 'post',
		data: $('input[name="product_id"], input[name="quantity"], select[name="profile_id"]'),
		dataType: 'json',
        beforeSend: function() {
            $('#profile-description').html('');
        },
		success: function(json) {
			$('.success, .warning, .attention, information, .error').remove();
            
			if (json['success']) {
                $('#profile-description').html(json['success']);
			}	
		}
	});
});
    
$('#button-cart').bind('click', function() {
	$.ajax({
		url: 'index.php?route=checkout/cart/add',
		type: 'post',
		data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'),
		dataType: 'json',
		success: function(json) {
			$('.success, .warning, .attention, information, .error').remove();
			
			if (json['error']) {
				if (json['error']['option']) {
					for (i in json['error']['option']) {
						$('#option-' + i).after('<span class="error">' + json['error']['option'][i] + '</span>');
					}
				}
                
                if (json['error']['profile']) {
                    $('select[name="profile_id"]').after('<span class="error">' + json['error']['profile'] + '</span>');
                }
			} 
			
			if (json['success']) {
				$('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');
					
				$('.success').fadeIn('slow');
					
				$('#cart-total').html(json['total']);
				
				$('html, body').animate({ scrollTop: 0 }, 'slow'); 
			}	
		}
	});
});
//--></script>
<?php if ($options) { ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/ajaxupload.js"></script>
<?php foreach ($options as $option) { ?>
<?php if ($option['type'] == 'file') { ?>
<script type="text/javascript"><!--
new AjaxUpload('#button-option-<?php echo $option['product_option_id']; ?>', {
	action: 'index.php?route=product/product/upload',
	name: 'file',
	autoSubmit: true,
	responseType: 'json',
	onSubmit: function(file, extension) {
		$('#button-option-<?php echo $option['product_option_id']; ?>').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
		$('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', true);
	},
	onComplete: function(file, json) {
		$('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', false);
		
		$('.error').remove();
		
		if (json['success']) {
			alert(json['success']);
			
			$('input[name=\'option[<?php echo $option['product_option_id']; ?>]\']').attr('value', json['file']);
		}
		
		if (json['error']) {
			$('#option-<?php echo $option['product_option_id']; ?>').after('<span class="error">' + json['error'] + '</span>');
		}
		
		$('.loading').remove();	
	}
});
//--></script>
<?php } ?>
<?php } ?>
<?php } ?>
<script type="text/javascript"><!--
$('#review .pagination a').live('click', function() {
	$('#review').fadeOut('slow');
		
	$('#review').load(this.href);
	
	$('#review').fadeIn('slow');
	
	return false;
});			

$('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>');

$('#button-review').bind('click', function() {
	$.ajax({
		url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>',
		type: 'post',
		dataType: 'json',
		data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()),
		beforeSend: function() {
			$('.success, .warning').remove();
			$('#button-review').attr('disabled', true);
			$('#review-title').after('<div class="attention"><img src="catalog/view/theme/default/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>');
		},
		complete: function() {
			$('#button-review').attr('disabled', false);
			$('.attention').remove();
		},
		success: function(data) {
			if (data['error']) {
				$('#review-title').after('<div class="warning">' + data['error'] + '</div>');
			}
			
			if (data['success']) {
				$('#review-title').after('<div class="success">' + data['success'] + '</div>');
								
				$('input[name=\'name\']').val('');
				$('textarea[name=\'text\']').val('');
				$('input[name=\'rating\']:checked').attr('checked', '');
				$('input[name=\'captcha\']').val('');
			}
		}
	});
});
//--></script> 
<script type="text/javascript"><!--
$('#tabs a').tabs();
//--></script> 
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script> 
<script type="text/javascript"><!--
$(document).ready(function() {
	if ($.browser.msie && $.browser.version == 6) {
		$('.date, .datetime, .time').bgIframe();
	}

	$('.date').datepicker({dateFormat: 'yy-mm-dd'});
	$('.datetime').datetimepicker({
		dateFormat: 'yy-mm-dd',
		timeFormat: 'h:m'
	});
	$('.time').timepicker({timeFormat: 'h:m'});
});
//--></script> 
</div>
<?php if( $SPAN[2] ): ?>
<div class="span<?php echo $SPAN[2];?>">  
  <?php echo $column_right; ?>
</div>
<?php endif; ?>
</div>
<?php echo $footer; ?>

и вот product.tpl дефолтного шаблона

<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>
<div id="content"><?php echo $content_top; ?>
  <div class="breadcrumb">
    <?php foreach ($breadcrumbs as $breadcrumb) { ?>
    <?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>
    <?php } ?>
  </div>
  <h1><?php echo $heading_title; ?></h1>
  <div class="product-info">
    <?php if ($thumb || $images) { ?>
    <div class="left">
      <?php if ($thumb) { ?>
      <div class="image"><a href="<?php echo $popup; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img src="<?php echo $thumb; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" id="image" /></a></div>
      <?php } ?>
      <?php if ($images) { ?>
      <div class="image-additional">
        <?php foreach ($images as $image) { ?>
        <a href="<?php echo $image['popup']; ?>" title="<?php echo $heading_title; ?>" class="colorbox"><img src="<?php echo $image['thumb']; ?>" title="<?php echo $heading_title; ?>" alt="<?php echo $heading_title; ?>" /></a>
        <?php } ?>
      </div>
      <?php } ?>
    </div>
    <?php } ?>
    <div class="right">
      <div class="description">
        <?php if ($manufacturer) { ?>
        <span><?php echo $text_manufacturer; ?></span> <a href="<?php echo $manufacturers; ?>"><?php echo $manufacturer; ?></a><br />
        <?php } ?>
        <span><?php echo $text_model; ?></span> <?php echo $model; ?><br />
        <?php if ($reward) { ?>
        <span><?php echo $text_reward; ?></span> <?php echo $reward; ?><br />
        <?php } ?>
        <span><?php echo $text_stock; ?></span> <?php echo $stock; ?></div>
      <?php if ($price) { ?>
      <div class="price"><?php echo $text_price; ?>
        <?php if (!$special) { ?>
        <?php echo $price; ?>
        <?php } else { ?>
        <span class="price-old"><?php echo $price; ?></span> <span class="price-new"><?php echo $special; ?></span>
        <?php } ?>
        <br />
        <?php if ($tax) { ?>
        <span class="price-tax"><?php echo $text_tax; ?> <?php echo $tax; ?></span><br />
        <?php } ?>
        <?php if ($points) { ?>
        <span class="reward"><small><?php echo $text_points; ?> <?php echo $points; ?></small></span><br />
        <?php } ?>
        <?php if ($discounts) { ?>
        <br />
        <div class="discount">
          <?php foreach ($discounts as $discount) { ?>
          <?php echo sprintf($text_discount, $discount['quantity'], $discount['price']); ?><br />
          <?php } ?>
        </div>
        <?php } ?>
      </div>
      <?php } ?>
      <?php if ($profiles): ?>
      <div class="option">
          <h2><span class="required">*</span><?php echo $text_payment_profile ?></h2>
          <br />
          <select name="profile_id">
              <option value=""><?php echo $text_select; ?></option>
              <?php foreach ($profiles as $profile): ?>
              <option value="<?php echo $profile['profile_id'] ?>"><?php echo $profile['name'] ?></option>
              <?php endforeach; ?>
          </select>
          <br />
          <br />
          <span id="profile-description"></span>
          <br />
          <br />
      </div>
      <?php endif; ?>
      <?php if ($options) { ?>
      <div class="options">
        <h2><?php echo $text_option; ?></h2>
        <br />
        <?php foreach ($options as $option) { ?>
        <?php if ($option['type'] == 'select') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <select name="option[<?php echo $option['product_option_id']; ?>]">
            <option value=""><?php echo $text_select; ?></option>
            <?php foreach ($option['option_value'] as $option_value) { ?>
            <option value="<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
            <?php if ($option_value['price']) { ?>
            (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
            <?php } ?>
            </option>
            <?php } ?>
          </select>
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'radio') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <?php foreach ($option['option_value'] as $option_value) { ?>
          <input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" />
          <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
            <?php if ($option_value['price']) { ?>
            (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
            <?php } ?>
          </label>
          <br />
          <?php } ?>
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'checkbox') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <?php foreach ($option['option_value'] as $option_value) { ?>
          <input type="checkbox" name="option[<?php echo $option['product_option_id']; ?>][]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" />
          <label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
            <?php if ($option_value['price']) { ?>
            (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
            <?php } ?>
          </label>
          <br />
          <?php } ?>
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'image') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <table class="option-image">
            <?php foreach ($option['option_value'] as $option_value) { ?>
            <tr>
              <td style="width: 1px;"><input type="radio" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option_value['product_option_value_id']; ?>" id="option-value-<?php echo $option_value['product_option_value_id']; ?>" /></td>
              <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><img src="<?php echo $option_value['image']; ?>" alt="<?php echo $option_value['name'] . ($option_value['price'] ? ' ' . $option_value['price_prefix'] . $option_value['price'] : ''); ?>" /></label></td>
              <td><label for="option-value-<?php echo $option_value['product_option_value_id']; ?>"><?php echo $option_value['name']; ?>
                  <?php if ($option_value['price']) { ?>
                  (<?php echo $option_value['price_prefix']; ?><?php echo $option_value['price']; ?>)
                  <?php } ?>
                </label></td>
            </tr>
            <?php } ?>
          </table>
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'text') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" />
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'textarea') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <textarea name="option[<?php echo $option['product_option_id']; ?>]" cols="40" rows="5"><?php echo $option['option_value']; ?></textarea>
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'file') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <input type="button" value="<?php echo $button_upload; ?>" id="button-option-<?php echo $option['product_option_id']; ?>" class="button">
          <input type="hidden" name="option[<?php echo $option['product_option_id']; ?>]" value="" />
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'date') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="date" />
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'datetime') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="datetime" />
        </div>
        <br />
        <?php } ?>
        <?php if ($option['type'] == 'time') { ?>
        <div id="option-<?php echo $option['product_option_id']; ?>" class="option">
          <?php if ($option['required']) { ?>
          <span class="required">*</span>
          <?php } ?>
          <b><?php echo $option['name']; ?>:</b><br />
          <input type="text" name="option[<?php echo $option['product_option_id']; ?>]" value="<?php echo $option['option_value']; ?>" class="time" />
        </div>
        <br />
        <?php } ?>
        <?php } ?>
      </div>
      <?php } ?>
      <div class="cart">
        <div><?php echo $text_qty; ?>
          <input type="text" name="quantity" size="2" value="<?php echo $minimum; ?>" />
          <input type="hidden" name="product_id" size="2" value="<?php echo $product_id; ?>" />
           
          <input type="button" value="<?php echo $button_cart; ?>" id="button-cart" class="button" />
          <span>  <?php echo $text_or; ?>  </span>
          <span class="links"><a onclick="addToWishList('<?php echo $product_id; ?>');"><?php echo $button_wishlist; ?></a><br />
            <a onclick="addToCompare('<?php echo $product_id; ?>');"><?php echo $button_compare; ?></a></span>
        </div>
        <?php if ($minimum > 1) { ?>
        <div class="minimum"><?php echo $text_minimum; ?></div>
        <?php } ?>
      </div>
      <?php if ($review_status) { ?>
      <div class="review">
        <div><img src="catalog/view/theme/default/image/stars-<?php echo $rating; ?>.png" alt="<?php echo $reviews; ?>" />  <a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $reviews; ?></a>  |  <a onclick="$('a[href=\'#tab-review\']').trigger('click');"><?php echo $text_write; ?></a></div>
        <div class="share"><!-- AddThis Button BEGIN -->
          <div class="addthis_default_style"><a class="addthis_button_compact"><?php echo $text_share; ?></a> <a class="addthis_button_email"></a><a class="addthis_button_print"></a> <a class="addthis_button_facebook"></a> <a class="addthis_button_twitter"></a></div>
          <script type="text/javascript" src="//s7.addthis.com/js/250/addthis_widget.js"></script> 
          <!-- AddThis Button END --> 
        </div>
      </div>
      <?php } ?>
    </div>
  </div>
  <div id="tabs" class="htabs"><a href="#tab-description"><?php echo $tab_description; ?></a>
    <?php if ($attribute_groups) { ?>
    <a href="#tab-attribute"><?php echo $tab_attribute; ?></a>
    <?php } ?>
    <?php if ($review_status) { ?>
    <a href="#tab-review"><?php echo $tab_review; ?></a>
    <?php } ?>
    <?php if ($products) { ?>
    <a href="#tab-related"><?php echo $tab_related; ?> (<?php echo count($products); ?>)</a>
    <?php } ?>
  </div>
  <div id="tab-description" class="tab-content"><?php echo $description; ?></div>
  <?php if ($attribute_groups) { ?>
  <div id="tab-attribute" class="tab-content">
    <table class="attribute">
      <?php foreach ($attribute_groups as $attribute_group) { ?>
      <thead>
        <tr>
          <td colspan="2"><?php echo $attribute_group['name']; ?></td>
        </tr>
      </thead>
      <tbody>
        <?php foreach ($attribute_group['attribute'] as $attribute) { ?>
        <tr>
          <td><?php echo $attribute['name']; ?></td>
          <td><?php echo $attribute['text']; ?></td>
        </tr>
        <?php } ?>
      </tbody>
      <?php } ?>
    </table>
  </div>
  <?php } ?>
  <?php if ($review_status) { ?>
  <div id="tab-review" class="tab-content">
    <div id="review"></div>
    <h2 id="review-title"><?php echo $text_write; ?></h2>
    <b><?php echo $entry_name; ?></b><br />
    <input type="text" name="name" value="" />
    <br />
    <br />
    <b><?php echo $entry_review; ?></b>
    <textarea name="text" cols="40" rows="8" style="width: 98%;"></textarea>
    <span style="font-size: 11px;"><?php echo $text_note; ?></span><br />
    <br />
    <b><?php echo $entry_rating; ?></b> <span><?php echo $entry_bad; ?></span> 
    <input type="radio" name="rating" value="1" />
     
    <input type="radio" name="rating" value="2" />
     
    <input type="radio" name="rating" value="3" />
     
    <input type="radio" name="rating" value="4" />
     
    <input type="radio" name="rating" value="5" />
     <span><?php echo $entry_good; ?></span><br />
    <br />
    <b><?php echo $entry_captcha; ?></b><br />
    <input type="text" name="captcha" value="" />
    <br />
    <img src="index.php?route=product/product/captcha" alt="" id="captcha" /><br />
    <br />
    <div class="buttons">
      <div class="right"><a id="button-review" class="button"><?php echo $button_continue; ?></a></div>
    </div>
  </div>
  <?php } ?>
  <?php if ($products) { ?>
  <div id="tab-related" class="tab-content">
    <div class="box-product">
      <?php foreach ($products as $product) { ?>
      <div>
        <?php if ($product['thumb']) { ?>
        <div class="image"><a href="<?php echo $product['href']; ?>"><img src="<?php echo $product['thumb']; ?>" alt="<?php echo $product['name']; ?>" /></a></div>
        <?php } ?>
        <div class="name"><a href="<?php echo $product['href']; ?>"><?php echo $product['name']; ?></a></div>
        <?php if ($product['price']) { ?>
        <div class="price">
          <?php if (!$product['special']) { ?>
          <?php echo $product['price']; ?>
          <?php } else { ?>
          <span class="price-old"><?php echo $product['price']; ?></span> <span class="price-new"><?php echo $product['special']; ?></span>
          <?php } ?>
        </div>
        <?php } ?>
        <?php if ($product['rating']) { ?>
        <div class="rating"><img src="catalog/view/theme/default/image/stars-<?php echo $product['rating']; ?>.png" alt="<?php echo $product['reviews']; ?>" /></div>
        <?php } ?>
        <a onclick="addToCart('<?php echo $product['product_id']; ?>');" class="button"><?php echo $button_cart; ?></a></div>
      <?php } ?>
    </div>
  </div>
  <?php } ?>
  <?php if ($tags) { ?>
  <div class="tags"><b><?php echo $text_tags; ?></b>
    <?php for ($i = 0; $i < count($tags); $i++) { ?>
    <?php if ($i < (count($tags) - 1)) { ?>
    <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>,
    <?php } else { ?>
    <a href="<?php echo $tags[$i]['href']; ?>"><?php echo $tags[$i]['tag']; ?></a>
    <?php } ?>
    <?php } ?>
  </div>
  <?php } ?>
  <?php echo $content_bottom; ?></div>
<script type="text/javascript"><!--
$(document).ready(function() {
	$('.colorbox').colorbox({
		overlayClose: true,
		opacity: 0.5,
		rel: "colorbox"
	});
});
//--></script> 
<script type="text/javascript"><!--

$('select[name="profile_id"], input[name="quantity"]').change(function(){
    $.ajax({
		url: 'index.php?route=product/product/getRecurringDescription',
		type: 'post',
		data: $('input[name="product_id"], input[name="quantity"], select[name="profile_id"]'),
		dataType: 'json',
        beforeSend: function() {
            $('#profile-description').html('');
        },
		success: function(json) {
			$('.success, .warning, .attention, information, .error').remove();
            
			if (json['success']) {
                $('#profile-description').html(json['success']);
			}	
		}
	});
});
    
$('#button-cart').bind('click', function() {
	$.ajax({
		url: 'index.php?route=checkout/cart/add',
		type: 'post',
		data: $('.product-info input[type=\'text\'], .product-info input[type=\'hidden\'], .product-info input[type=\'radio\']:checked, .product-info input[type=\'checkbox\']:checked, .product-info select, .product-info textarea'),
		dataType: 'json',
		success: function(json) {
			$('.success, .warning, .attention, information, .error').remove();
			
			if (json['error']) {
				if (json['error']['option']) {
					for (i in json['error']['option']) {
						$('#option-' + i).after('<span class="error">' + json['error']['option'][i] + '</span>');
					}
				}
                
                if (json['error']['profile']) {
                    $('select[name="profile_id"]').after('<span class="error">' + json['error']['profile'] + '</span>');
                }
			} 
			
			if (json['success']) {
				$('#notification').html('<div class="success" style="display: none;">' + json['success'] + '<img src="catalog/view/theme/default/image/close.png" alt="" class="close" /></div>');
					
				$('.success').fadeIn('slow');
					
				$('#cart-total').html(json['total']);
				
				$('html, body').animate({ scrollTop: 0 }, 'slow'); 
			}	
		}
	});
});
//--></script>
<?php if ($options) { ?>
<script type="text/javascript" src="catalog/view/javascript/jquery/ajaxupload.js"></script>
<?php foreach ($options as $option) { ?>
<?php if ($option['type'] == 'file') { ?>
<script type="text/javascript"><!--
new AjaxUpload('#button-option-<?php echo $option['product_option_id']; ?>', {
	action: 'index.php?route=product/product/upload',
	name: 'file',
	autoSubmit: true,
	responseType: 'json',
	onSubmit: function(file, extension) {
		$('#button-option-<?php echo $option['product_option_id']; ?>').after('<img src="catalog/view/theme/default/image/loading.gif" class="loading" style="padding-left: 5px;" />');
		$('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', true);
	},
	onComplete: function(file, json) {
		$('#button-option-<?php echo $option['product_option_id']; ?>').attr('disabled', false);
		
		$('.error').remove();
		
		if (json['success']) {
			alert(json['success']);
			
			$('input[name=\'option[<?php echo $option['product_option_id']; ?>]\']').attr('value', json['file']);
		}
		
		if (json['error']) {
			$('#option-<?php echo $option['product_option_id']; ?>').after('<span class="error">' + json['error'] + '</span>');
		}
		
		$('.loading').remove();	
	}
});
//--></script>
<?php } ?>
<?php } ?>
<?php } ?>
<script type="text/javascript"><!--
$('#review .pagination a').live('click', function() {
	$('#review').fadeOut('slow');
		
	$('#review').load(this.href);
	
	$('#review').fadeIn('slow');
	
	return false;
});			

$('#review').load('index.php?route=product/product/review&product_id=<?php echo $product_id; ?>');

$('#button-review').bind('click', function() {
	$.ajax({
		url: 'index.php?route=product/product/write&product_id=<?php echo $product_id; ?>',
		type: 'post',
		dataType: 'json',
		data: 'name=' + encodeURIComponent($('input[name=\'name\']').val()) + '&text=' + encodeURIComponent($('textarea[name=\'text\']').val()) + '&rating=' + encodeURIComponent($('input[name=\'rating\']:checked').val() ? $('input[name=\'rating\']:checked').val() : '') + '&captcha=' + encodeURIComponent($('input[name=\'captcha\']').val()),
		beforeSend: function() {
			$('.success, .warning').remove();
			$('#button-review').attr('disabled', true);
			$('#review-title').after('<div class="attention"><img src="catalog/view/theme/default/image/loading.gif" alt="" /> <?php echo $text_wait; ?></div>');
		},
		complete: function() {
			$('#button-review').attr('disabled', false);
			$('.attention').remove();
		},
		success: function(data) {
			if (data['error']) {
				$('#review-title').after('<div class="warning">' + data['error'] + '</div>');
			}
			
			if (data['success']) {
				$('#review-title').after('<div class="success">' + data['success'] + '</div>');
								
				$('input[name=\'name\']').val('');
				$('textarea[name=\'text\']').val('');
				$('input[name=\'rating\']:checked').attr('checked', '');
				$('input[name=\'captcha\']').val('');
			}
		}
	});
});
//--></script> 
<script type="text/javascript"><!--
$('#tabs a').tabs();
//--></script> 
<script type="text/javascript" src="catalog/view/javascript/jquery/ui/jquery-ui-timepicker-addon.js"></script> 
<script type="text/javascript"><!--
$(document).ready(function() {
	if ($.browser.msie && $.browser.version == 6) {
		$('.date, .datetime, .time').bgIframe();
	}

	$('.date').datepicker({dateFormat: 'yy-mm-dd'});
	$('.datetime').datetimepicker({
		dateFormat: 'yy-mm-dd',
		timeFormat: 'h:m'
	});
	$('.time').timepicker({timeFormat: 'h:m'});
});
//--></script> 
<?php echo $footer; ?>
Изменено пользователем afwollis
[spoiler][/spoiler]

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Сполеры для трусов))

Изменено пользователем pomansur

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Сполеры для трусов))

Прошу прощения. Исправлюсь.

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Попробуйте так

замените в vqmod файле который привели в начале кусок кода 

  1. <search position="replace"><![CDATA[
  2. <div id="tab-related"
  3. ]]></search>
  4. <add><![CDATA[<div id="tab-related"<?php echo ($cpt_status && !in_array('4', $tab_ids)) ? ' style="display:none;"' : ''; ?>]]></add>
  5. </operation>
  6. </file>

 

 

 

<div id="tab-related" заменить на  <div id="tab-related" class="tab-content">

Изменено пользователем pomansur

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Похоже это решение неправильное.

Попробую своими догадками как-то помочь решить проблему.

 

И так мы знаем в логах vqmod  ошибка

File Name    : catalog/view/theme/pav_decor/template/product/product.tpl(5)
VQModObject::applyMod - SEARCH NOT FOUND (ABORTING MOD): <div id="tab-related"

 

я так понимаю он не может найти эту строку.

 

Так вот <div id="tab-related" в product.tpl шаблона pav_decor  нет вовсе, вместо него отвечает(по моим догадкам) вот этот кусок кода.

<div class="box product-related highlight">
  <h3 class="box-heading"><span class="title-related"><?php echo $tab_related; ?> (<?php echo count($products); ?>)</span></h3>
  <div id="related" class="slide" data-interval="0">
    <div class="carousel-controls">
      <a class="carousel-control left" href="#related" data-slide="prev">‹</a>
      <a class="carousel-control right" href="#related" data-slide="next">›</a>
    </div>

тогда как в дефолтном шаблоне <div id="tab-related" в product.tpl есть. Вот кусок кода.

<div id="tab-related" class="tab-content">
    <div class="box-product">
      <?php foreach ($products as $product) { ?>
      <div>

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

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Для публикации сообщений создайте учётную запись или авторизуйтесь

Вы должны быть пользователем, чтобы оставить комментарий

Создать учетную запись

Зарегистрируйте новую учётную запись в нашем сообществе. Это очень просто!

Регистрация нового пользователя

Войти

Уже есть аккаунт? Войти в систему.

Войти

  • Последние посетители   0 пользователей онлайн

    Ни одного зарегистрированного пользователя не просматривает данную страницу

×

Важная информация

На нашем сайте используются файлы cookie и происходит обработка некоторых персональных данных пользователей, чтобы улучшить пользовательский интерфейс. Чтобы узнать для чего и какие персональные данные мы обрабатываем перейдите по ссылке. Если Вы нажмете «Я даю согласие», это означает, что Вы понимаете и принимаете все условия, указанные в этом Уведомлении о Конфиденциальности.