Помощь Custom Product TABS Pro интерграция в Journal 2

Twix007

Гуру форума
Регистрация
11 Окт 2009
Сообщения
257
Реакции
57
Стандартно Custom Product TABS Pro не интегрируется в Journal 2, помогите пожалуйста как его вставить:
1.5.6.4.
Так как в теме есть свои табы тоже, но один на все продукты!

Как правильно интегрировать в него этот кусок кода из VQMOD XML?
Код:
    <file name="catalog/view/theme/default/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>

мой product.tpl
 

Вложения

  • product.zip
    7,6 KB · Просмотры: 14
Назад
Сверху