Jump to content
Sign in to follow this  
Glinda

[Решено] VQMod, продукты. Прошу помощи

Recommended Posts

День добрый. Есть страница продукта сайта,  планирую сделать дополнительные вкладки с помощью vqmod, ниже кусок вкумодовсгого кода.

<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;
    }
  }
  } ?>

На дефолтной теме работает. Стоит тема Gazal. В самом vqmod поменял

<file name="catalog/view/theme/MYCUSTOMTEMPLATE/template/product/product.tpl">

В самом product.tpl есть есть констукция

<div id="tabs" class="htabs">

Ниже кусок product/tpl

 <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 ($tags) { ?>
    <a href="#tab-tags"><?php echo $text_tags; ?></a>
    <?php } ?>
  </div>

Т.е. добавление новых вкладок должно быть, но их нет не могу понять почему.

Share this post


Link to post
Share on other sites

задать вопрос автору темы

Share this post


Link to post
Share on other sites

Решил, просто кусок кода с дефолтной темы скопировал. Тему можно закрывать.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×

Important Information

On our site, cookies are used and personal data is processed to improve the user interface. To find out what and what personal data we are processing, please go to the link. If you click "I agree," it means that you understand and accept all the conditions specified in this Privacy Notice.