Results 1 to 2 of 2
  1. #1
    Join Date
    May 2005
    Posts
    50
    Plugin Contributions
    0

    Default PHP Inlcudes with Tabbed Products Lite v3.8

    I want to use php includes as outlined by The Software Guy in:

    http://www.thatsoftwareguy.com/zenca...scription.html

    His instructions are straightforward if you are using a normal display. But since I am using the Tabbed Products Lite v3.8 I do not know how to customize that file.

    In the software guys thread, he says to make the following changes to the tpl_product_info_display.php file:

    ******************************

    Change

    <!--bof Product description -->
    <?php if ($products_description != '') { ?>
    <div id="productDescription" class="productGeneral biggerText"><?php echo stripslashes($products_description); ?></div>
    <?php } ?>
    <!--eof Product description -->

    to

    <!--bof Product description -->
    <?php if ($products_description != '') { ?>
    <div id="productDescription" class="productGeneral biggerText">
    <?php
    $stripped_products_description = $products_description;
    foreach ($descr_stringlist as $varname) {
    $stripped_products_description = str_replace($varname, constant($varname), $stripped_products_description);
    }
    ?>
    <?php echo stripslashes($stripped_products_description); ?></div>
    <?php } ?>
    <!--eof Product description -->


    *********************************

    Where should I put that in the tpl_tabbed_products_lite.php file? - the file is too long to post here, so I will do it in two posts.

    *********************************
    Code:
    <?php
    /**
     * Tabs Template
     * Tabbed Products Lite v3.8
     * QHome (qhomezone######################)
     *
     * Loaded automatically by index.php?main_page=product_info.<br />
     * Displays tabbed interface for any product
     * 
     * @package templateSystem
     * @copyright Copyright 2003-2006 Zen Cart Development Team
     * @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
     * @version $Id: tpl_tabbed_products_lite.php v3.7 2006-10-11 05:31:21Z qhome $
     * 
     */
    
    // ------------------------------------------------------------
    // ----------------- Custom Tab - Tab Strip -------------------
    // ------------------------------------------------------------
    ?>
    <!-- Tabbed Products Lite v3.8 :: 25-Oct-2006 :: (tpl_tabbed_products_lite.php) -->
    <?php
    if ($chkTabStart || $chkTabEnd) { // BEGIN custom tab exist check
    	$FindEnd = explode("<!--@EndTabs@-->", $proddata);
      $pieces = explode("<!--%", $FindEnd[0]);
      //echo '<br />'; //lowers the tabs from top a bit so no collision.
      if ($pieces[0] != "") {?>
        <div id="productDescription" class="productGeneral biggerText"><?php echo $pieces[0]; ?></div>
      <?php }
      echo '<div id="slidetabsmenu" style="display:none;">' . "\n";
      echo '<ul>' . "\n";
      for ($g = 1; $g < count($pieces); $g++) {
        $sTmp = explode("%-->", $pieces[$g]);
        $sName[$g] = $sTmp[0];
        $sText[$g] = $sTmp[1];
        echo '<li><a href="javascript:void(0)" onclick="expandcontent(\'sc'.$g.'\', this)"><span>'.$sName[$g].'</span></a></li>' . "\n";
      } // END FOR loop
    }
    
    // ------------------------------------------------------------
    // ------------------ Core Tab - Tab Strip --------------------
    // ------------------------------------------------------------		
    
    // ===> Check for any core tabs if there are no custom tabs (tabstrip)
    if (($chkTabStart === false && $chkTabEnd === false) && ($bAddToCart || $bMediaCollection || $bAdditionalImages || $bCustomersAlsoPurchased || $bCrossSell_Tab || $bReviews_Tab)) {
      $bHardCodeTagsOnly = true;
      $g = 1;
      echo '<div id="slidetabsmenu" style="display:none;"><ul>';
      // ===> Check if Add to cart should be SEPARATE tab or not (used when only hardcode tags are used ONLY!) (tabstrip)
      if ($bAddToCart != false) {
    		echo '<li><a href="javascript:void(0)" onclick="expandcontent(\'sc'.$g.'\', this)"><span>'.$addtocart_tab_name.'</span></a></li>' . "\n";
    		$g++;
      }	
    }
    // ===> Check if Media Collection should be a tab or not (FOR MUSIC PRODUCT TYPE ONLY!!!) (tabstrip)
    if ($bMediaCollection != false) {
      echo '<li><a href="javascript:void(0)" onclick="expandcontent(\'sc'.$g.'\', this)"><span>'.$media_collection_tab_name.'</span></a></li>' . "\n";
      $g++;
    }
    // ===> Check if Additional Images should be a tab or not (tabstrip)
    if ($bAdditionalImages != false) {
    	if ($products_image != '') {
        // prepare image name
        $products_image_extension = substr($products_image, strrpos($products_image, '.'));
        $products_image_base = ereg_replace($products_image_extension . '$', '', $products_image);
      
        // if in a subdirectory
        if (strrpos($products_image, '/')) {
          $products_image_match = substr($products_image, strrpos($products_image, '/')+1);
          $products_image_match = ereg_replace($products_image_extension, '', $products_image_match) . '_';
          $products_image_base = $products_image_match;
        }
      
        $products_image_directory = ereg_replace($products_image, '', substr($products_image, strrpos($products_image, '/')));
        if ($products_image_directory != '') {
          $products_image_directory = DIR_WS_IMAGES . ereg_replace($products_image_directory, '', $products_image) . "/";
        } else {
          $products_image_directory = DIR_WS_IMAGES;
        }
      
        // Check for additional matching images
        $file_extension = $products_image_extension;
        $products_image_match_array = array();
        if ($dir = @dir($products_image_directory)) {
          while ($file = $dir->read()) {
            if (!is_dir($products_image_directory . $file)) {
              if(preg_match("/" . $products_image_base . "/i", $file) == '1') {
                if (substr($file, 0, strrpos($file, '.')) != substr($products_image, 0, strrpos($products_image, '.'))) {
                  if ($products_image_base . ereg_replace($products_image_base, '', $file) == $file) {
                    $images_array[] = $file;
                  }
                }
              }
            }
          }
          if (sizeof($images_array)) {
            sort($images_array);
          }
          $dir->close();
        }
      } // end $products_image
      // Build output based on images found
      $num_images = sizeof($images_array);
    	if ($num_images != 0) {
    	  echo '<li><a href="javascript:void(0)" onclick="expandcontent(\'sc'.$g.'\', this)"><span>'.$add_images_tab_name.'</span></a></li>' . "\n";
    	  $g++;
    	}
    	unset ($images_array);
    }
    // ===> Check if Customer Also Purchased should be a tab or not (tabstrip)
    if ($bCustomersAlsoPurchased != false) {
    	$also_purchased_products = $db->Execute(sprintf(SQL_ALSO_PURCHASED, (int)$_GET['products_id'], (int)$_GET['products_id']));
      $CustAlsoPur = $also_purchased_products->RecordCount();
    	if ($CustAlsoPur != 0) {
    	  echo '<li><a href="javascript:void(0)" onclick="expandcontent(\'sc'.$g.'\', this)"><span>'.$cust_also_purchased_tab_name.'</span></a></li>' . "\n";
    	  $g++;
    	}
    }
    // ===> Check if Cross Sell should be a tab or not (tabstrip)
    if ($bCrossSell_Tab != false) {
      $xsell_query = $db->Execute("select distinct p.products_id, p.products_image, pd.products_name
                             from " . TABLE_PRODUCTS_XSELL . " xp, " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
                             where xp.products_id = '" . $_GET['products_id'] . "'
                              and xp.xsell_id = p.products_id
                              and p.products_id = pd.products_id
                              and pd.language_id = '" . $_SESSION['languages_id'] . "'
                              and p.products_status = 1
                             order by xp.sort_order asc limit " . MAX_DISPLAY_XSELL);
      $num_products_xsell = $xsell_query->RecordCount();
      if ($num_products_xsell != 0) {
        echo '<li><a href="javascript:void(0)" onclick="expandcontent(\'sc'.$g.'\', this)"><span>'.$cross_sell_tab_name.'</span></a></li>' . "\n";
        $g++;
      }
    }
    // ===> Check if Reviews should be a tab or not (tabstrip)
    if ($bReviews_Tab != false) {
      echo '<li><a href="javascript:void(0)" onclick="expandcontent(\'sc'.$g.'\', this)"><span>'.$reviews_tab_name.'</span></a></li>' . "\n";
      $g++;
    }
    
    // ===> Close the tabstrip creation if started
    if ((intval($chkTabStart) >= 0 && intval($chkTabEnd) > 0) || ($bAddToCart || $bMediaCollection || $bAdditionalImages || $bCustomersAlsoPurchased || $bCrossSell_Tab || $bReviews_Tab)) {
    	echo '</ul>' . "\n" . '</div>' . "\n\n"; //end the slidetabsmenu
    	echo '<br style="clear: both" />' . "\n\n"; //prevent tabs from appearing inside the box
    }
    	
    // ------------------------------------------------------------
    // ---------------- Custom Tab - Tab Contents -----------------
    // ------------------------------------------------------------
    
    if ($chkTabStart != false || $chkTabEnd != false) { //if tags aren't created properly, do not apply tabs
    	echo '<div id="tabcontentcontainer">' . "\n";
    	for ($a = 1; $a < count($pieces); $a++) {
    		if ($a == 1) { // if $a is equal to the first tab, load 
    			echo '<div id="sc'.$a.'" class="tabcontent" style="display:block;">' . "\n";
    		  if ($bShowHeadersNoJavascript) {
            echo '<div class="centerBoxWrapper" id="ProductDescriptionHeader" style="display:block;">' . "\n";
          } else {
            echo '<div class="centerBoxWrapper" id="ProductDescriptionHeader" style="display:none;">' . "\n";
          }
          ?>
          <h2 class="centerBoxHeading"><?php $b[$a]=str_replace('<br>', ' ', $sName[$a]); $c[$a]=str_replace('<br />', ' ', $b[$a]); echo strip_tags($c[$a]);?></h2>
          <?php
          echo '</div>' . "\n";
          echo '<div style="width:100%;">' . "\n";
    			If ($bMainImageOnTabs != false) { ?>
          <!--bof Add to Cart Box -->
          <?php
          if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
            // do nothing
          } else {
            $display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
            if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
              // hide the quantity box and default to 1
              $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
            } else {
              // show the quantity box
              $the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
            }
              $display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
            if ($display_qty != '' or $display_button != '') { ?>
              <div id="cartAdd">
              <?php
              echo $display_qty;
              echo $display_button;
              ?>
              </div>
              <?php 
            } // display qty and button
          } // CUSTOMERS_APPROVAL == 3 ?>
          <!--eof Add to Cart Box-->
    
          <!--bof Quantity Discounts table -->
          <?php
          if ($products_discount_type != 0) {
            // display the products quantity discount
            require($template->get_template_dir('/tpl_modules_products_quantity_discounts.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_products_quantity_discounts.php');
          }
          ?>
          <!--eof Quantity Discounts table -->
    
    
    			  <!--bof Main Product Image -->
    				<?php
    				if (zen_not_null($products_image)) {
    						/* display the main product image */ 
    						require($template->get_template_dir('/tpl_modules_main_product_image.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_main_product_image.php');
    			  }
    				?>
    				<!--eof Main Product Image-->
            		
            <!--bof Product Name-->
            <h1 id="productName" class="productGeneral"><?php echo $products_name; ?></h1>
            <!--eof Product Name-->
            		
            <!--bof Product Price block -->
    <!--        <h2 id="productPrices" class="productGeneral">
            <?php
            // base price
            if ($show_onetime_charges_description == 'true') {
            	$one_time = '<span >' . TEXT_ONETIME_CHARGE_SYMBOL . TEXT_ONETIME_CHARGE_DESCRIPTION . '</span><br />';
            } else {
            	$one_time = '';
            }
            echo $one_time . ((zen_has_product_attributes_values((int)$_GET['products_id']) and $flag_show_product_info_starting_at == 1) ? TEXT_BASE_PRICE : '') . zen_get_products_display_price((int)$_GET['products_id']);
            ?>
            </h2>
    -->
            <!--eof Product Price block -->
            		
            <!--bof free ship icon  -->
            <?php 
            if(zen_get_product_is_always_free_shipping($products_id_current)) { ?>
            	<div id="freeShippingIcon"><?php echo TEXT_PRODUCT_FREE_SHIPPING_ICON; ?></div>
            <?php } ?>
            <!--eof free ship icon  -->
    
    
    
            
            <!--bof Product details list  -->
            <?php 
            if ( (($flag_show_product_info_model == 1 and $products_model != '') or ($flag_show_product_info_weight == 1 and $products_weight !=0) or ($flag_show_product_info_quantity == 1) or ($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name))) ) { ?>
            <ul id="productDetailsList" class="floatingBox back">
             <?php echo (($flag_show_product_info_model == 1 and $products_model !='') ? '<li>' . TEXT_PRODUCT_MODEL . $products_model . '</li>' : '') . "\n"; ?>
             <?php echo (($flag_show_product_info_weight == 1 and $products_weight !=0) ? '<li>' . TEXT_PRODUCT_WEIGHT .  $products_weight . TEXT_PRODUCT_WEIGHT_UNIT . '</li>'  : '') . "\n"; ?>
             <?php echo (($flag_show_product_info_quantity == 1) ? '<li>' . $products_quantity . TEXT_PRODUCT_QUANTITY . '</li>'  : '') . "\n"; ?>
             <?php echo (($flag_show_product_info_manufacturer == 1 and !empty($manufacturers_name)) ? '<li>' . TEXT_PRODUCT_MANUFACTURER . $manufacturers_name . '</li>' : '') . "\n"; ?>
            </ul>
    
            <?php
            }
            ?>
            <!--eof Product details list -->
    			  <?php
      		} // end show_main_image_in_tabs if statement
    		} else { // if $a not equal to the first tab
    			echo '<div id="sc'.$a.'" class="tabcontent" style="display:block;">' . "\n";
    			if ($bShowHeadersNoJavascript) {
            echo '<div class="centerBoxWrapper" id="CustomHeader_' . $a . '" style="display:block;">' . "\n";
          } else {
            echo '<div class="centerBoxWrapper" id="CustomHeader_' . $a . '" style="display:none;">' . "\n";
          }
          if ($bShowHeaders != true) {
            echo ("<script type=\"text/javascript\">
    	            <!--
      				    if (document.getElementById('CustomHeader_" . $a . "') != null) {
      				      document.getElementById('CustomHeader_" . $a . "').style.display = \"none\";
      				    }
      		        //-->
                  </script>");
          }
          ?>
          <h2 class="centerBoxHeading"><?php $b[$a]=str_replace('<br>', ' ', $sName[$a]); $c[$a]=str_replace('<br />', ' ', $b[$a]); echo strip_tags($c[$a]);?></h2>
          <?php
          echo '</div>' . "\n";
          echo '<div style="width:100%;">' . "\n";
    		}
        // Write out the Tab content here
    		echo '<div id="productDescription'.$a.'" class="productGeneral biggerText">'.$sText[$a].'</div>' . "\n";
    		
    		if ($bAddToCart && $a == 1) { // this puts 'add to cart' and attributes inside tab on first tab if active.
          ?>
          <!-- Added Table to prevent Add to Cart button from floating off the div -->
          <table border="0" width="100%"><tr><td colspan="2">              
    
            <br class="clearBoth" /> 
    
          <!--bof Attributes Module -->
          <?php
          if ($pr_attr->fields['total'] > 0) {
            // display the product atributes
            echo '<br />';
            require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes.php');
          }
          ?>
          <!--eof Attributes Module -->
          </td></tr><tr><td valign="bottom">
    
    
          <br />
          </td><td valign="bottom">
          </td></tr></table>
    		<?php
    		} //end if add to cart is tab
        // call sub tag check
    		if ($bGblUseSubTags != 0) {
    		  require($template->get_template_dir('/tpl_tabbed_products_lite_subtabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_tabbed_products_lite_subtabs.php');
    		}
    		echo '</div>' . "\n" . '</div>' . "\n" . '<!--eof Custom sc'.$a.'-->';
      } // End FOR loop
    }//end the Tab tag check

  2. #2
    Join Date
    May 2005
    Posts
    50
    Plugin Contributions
    0

    Default Re: PHP Inlcudes with Tabbed Products Lite v3.8

    Here is the rest of the file.

    Code:
    // ------------------------------------------------------------
    // ----------------- Core Tab - Tab Contents ------------------
    // ------------------------------------------------------------
    			
    // ===> Check for any core tabs if there are no custom tabs
    if (($chkTabStart === false && $chkTabEnd === false) && ($bAddToCart || $bMediaCollection || $bAdditionalImages || $bCustomersAlsoPurchased || $bCrossSell_Tab || $bReviews_Tab)) {
    	$a = 1;
    	echo '<div id="tabcontentcontainer">' . "\n";
    	// ===> if AddToCart is true, and its hardcode tags only, then create a tab with add to cart and attribs in it.
    	if ($bAddToCart != false) {
    		echo '<div id="sc'.$a.'" class="tabcontent" style="display:block;">' . "\n";
    		if ($bShowHeadersNoJavascript) {
          echo '<div class="centerBoxWrapper" id="AddToCartHeader" style="display:block;">' . "\n";
        } else {
          echo '<div class="centerBoxWrapper" id="AddToCartHeader" style="display:none;">' . "\n";
        }
        ?>
        <h2 class="centerBoxHeading"><?php $b[$a]=str_replace('<br>', ' ', $addtocart_tab_name); $c[$a]=str_replace('<br />', ' ', $b[$a]); echo strip_tags($c[$a]);?></h2>
        <?php
        echo '</div>' . "\n";
    		?>
    		<!-- Added Table to prevent Add to Cart button from floating off the div -->
    		<table border="0" width="100%"><tr><td colspan="2">                  
        <!--bof Attributes Module -->
        <?php
        if ($pr_attr->fields['total'] > 0) {
          // display the product atributes
          require($template->get_template_dir('/tpl_modules_attributes.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_attributes.php');
        }
        ?>
        <!--eof Attributes Module -->
        </td></tr><tr><td valign="bottom">                         
        <!--bof Quantity Discounts table -->
        <?php
        if ($products_discount_type != 0) {
          // display the products quantity discount
          require($template->get_template_dir('/tpl_modules_products_quantity_discounts.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_products_quantity_discounts.php');
        }
        ?>
        <!--eof Quantity Discounts table -->
        <br />
        </td><td valign="bottom">
        <!--bof Add to Cart Box -->
        <?php
        if (CUSTOMERS_APPROVAL == 3 and TEXT_LOGIN_FOR_PRICE_BUTTON_REPLACE_SHOWROOM == '') {
          // do nothing
        } else {
          $display_qty = (($flag_show_product_info_in_cart_qty == 1 and $_SESSION['cart']->in_cart($_GET['products_id'])) ? '<p>' . PRODUCTS_ORDER_QTY_TEXT_IN_CART . $_SESSION['cart']->get_quantity($_GET['products_id']) . '</p>' : '');
          if ($products_qty_box_status == 0 or $products_quantity_order_max== 1) {
            // hide the quantity box and default to 1
            $the_button = '<input type="hidden" name="cart_quantity" value="1" />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
          } else {
            // show the quantity box
            $the_button = PRODUCTS_ORDER_QTY_TEXT . '<input type="text" name="cart_quantity" value="' . (zen_get_buy_now_qty($_GET['products_id'])) . '" maxlength="6" size="4" /><br />' . zen_get_products_quantity_min_units_display((int)$_GET['products_id']) . '<br />' . zen_draw_hidden_field('products_id', (int)$_GET['products_id']) . zen_image_submit(BUTTON_IMAGE_IN_CART, BUTTON_IN_CART_ALT);
          }
            $display_button = zen_get_buy_now_button($_GET['products_id'], $the_button);
          if ($display_qty != '' or $display_button != '') { ?>
            <div id="cartAdd">
            <?php
            echo $display_qty;
            echo $display_button;
            ?>
            </div>
            <?php 
          } // display qty and button
        } // CUSTOMERS_APPROVAL == 3 ?>
        <!--eof Add to Cart Box-->
        </td></tr></table>      
    		<?php
    		// call sub tag check
    	  if ($bGblUseSubTags != false) {
    		  require($template->get_template_dir('/tpl_tabbed_products_lite_subtabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_tabbed_products_lite_subtabs.php');
    		}
    		echo '</div>' . "\n" . '</div>' . "\n" . '<!--eof AddtoCart sc'.$a.'-->';
    		$a++;
    	} // end add to cart
    } // end hardcode only check
    // ===> Check if Media Collection should be on tabs (FOR MUSIC PRODUCT TYPE ONLY!!!) (content)
    if ($bMediaCollection != false) {
      echo '<div id="sc'.$a.'" class="tabcontent" style="display:block;">' . "\n";
    	if ($bShowHeadersNoJavascript) {
        echo '<div class="centerBoxWrapper" id="AdditionalImagesHeader" style="display:block;">' . "\n";
      } else {
        echo '<div class="centerBoxWrapper" id="AdditionalImagesHeader" style="display:none;">' . "\n";
      }
      ?>
      <h2 class="centerBoxHeading"><?php $b[$a]=str_replace('<br>', ' ', $media_collection_tab_name); $c[$a]=str_replace('<br />', ' ', $b[$a]); echo strip_tags($c[$a]);?></h2>
      <?php
      echo '</div>' . "\n";
      echo '<div style="width:100%;">' . "\n";?>
    	<table border="0" width="100%"><tr><td>
    	<?php	require($template->get_template_dir('/tpl_modules_media_manager.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_media_manager.php');?>
    	</td></tr></table>
    	<?php
    	echo '</div>' . "\n"; 
    	// call sub tag check
      if ($bGblUseSubTags != 0) {
    	  require($template->get_template_dir('/tpl_tabbed_products_lite_subtabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_tabbed_products_lite_subtabs.php');
    	}
    	echo '</div>' . "\n" . '<!--eof Media Collection sc'.$a.'-->';
    	$a++;
    }
    // ===> Check if Additional Images should be on tabs (content)
    if ($bAdditionalImages != false && $num_images != 0) {
    	echo '<div id="sc'.$a.'" class="tabcontent" style="display:block;">' . "\n";
    	if ($bShowHeadersNoJavascript) {
        echo '<div class="centerBoxWrapper" id="AdditionalImagesHeader" style="display:block;">' . "\n";
      } else {
        echo '<div class="centerBoxWrapper" id="AdditionalImagesHeader" style="display:none;">' . "\n";
      }
      ?>
      <h2 class="centerBoxHeading"><?php $b[$a]=str_replace('<br>', ' ', $add_images_tab_name); $c[$a]=str_replace('<br />', ' ', $b[$a]); echo strip_tags($c[$a]);?></h2>
      <?php
      echo '</div>' . "\n";
      echo '<div style="width:100%;">' . "\n";
    	require($template->get_template_dir('/tpl_modules_additional_images.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_modules_additional_images.php');
    	echo '</div>'. "\n";
    	// call sub tag check
    	if ($bGblUseSubTags != 0) {
        require($template->get_template_dir('/tpl_tabbed_products_lite_subtabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_tabbed_products_lite_subtabs.php');
      }
    	echo '</div>' . "\n" . '<!--eof Additional Images sc'.$a.'-->';
    	$a++;
    }
    // ===> Check if Customers Also Purchased should be on tabs (content)
    if ($bCustomersAlsoPurchased != false && $CustAlsoPur != 0) {
      echo '<div id="sc'.$a.'" class="tabcontent" style="display:block;">' . "\n";
    	require($template->get_template_dir('tpl_modules_also_purchased_products.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_also_purchased_products.php');
    	// call sub tag check
    	if ($bGblUseSubTags != 0) {
    	  require($template->get_template_dir('/tpl_tabbed_products_lite_subtabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_tabbed_products_lite_subtabs.php');
      }
    	echo '</div>' . "\n" . '<!--eof Customers Also Purchased sc'.$a.'-->';
    	$a++;
    }
    // ===> Check if Cross Sell should be on tabs (content)
    if ($bCrossSell_Tab != false && $num_products_xsell != 0) {
      echo '<div id="sc'.$a.'" class="tabcontent" style="display:block;">' . "\n";
      require($template->get_template_dir('tpl_modules_xsell_products.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_xsell_products.php');
      // call sub tag check
      if ($bGblUseSubTags != 0) {
    	  require($template->get_template_dir('/tpl_tabbed_products_lite_subtabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_tabbed_products_lite_subtabs.php');
      }
      echo '</div>' . "\n" . '<!--eof CrossSell_Tab sc'.$a.'-->';
      $a++;
    }
    // ===> Check if Reviews should be on tabs (content)
    if ($bReviews_Tab != false) {
      echo '<div id="sc'.$a.'" class="tabcontent" style="display:block;">' . "\n";
      if ($bShowHeadersNoJavascript) {
        echo '<div class="centerBoxWrapper" id="ReviewsHeader" style="display:block;">' . "\n";
      } else {
        echo '<div class="centerBoxWrapper" id="ReviewsHeader" style="display:none;">' . "\n";
      }
      ?>
      <h2 class="centerBoxHeading"><?php $b[$a]=str_replace('<br>', ' ', $reviews_tab_name); $c[$a]=str_replace('<br />', ' ', $b[$a]); echo strip_tags($c[$a]);?></h2>
      <?php
      echo '</div>' . "\n";
      echo '<div style="width:100%;">' . "\n";
      require($template->get_template_dir('tpl_modules_tabbed_products_lite_reviews.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_modules_tabbed_products_lite_reviews.php');
      echo '</div>'. "\n";
      // call sub tag check
      if ($bGblUseSubTags != 0) {
    	  require($template->get_template_dir('/tpl_tabbed_products_lite_subtabs.php',DIR_WS_TEMPLATE, $current_page_base,'templates'). '/tpl_tabbed_products_lite_subtabs.php');
    	}
      echo '</div>' . "\n" . '<!--eof Reviews_Tab sc'.$a.'-->';
      $a++;
    }
    // ===> Close the tabstrip creation if started
    if ((intval($chkTabStart) >= 0 && intval($chkTabEnd) > 0) || ($bAddToCart || $bMediaCollection || $bAdditionalImages || $bCustomersAlsoPurchased || $bCrossSell_Tab || $bReviews_Tab)) {
    	echo '</div><!--end of tabcontentcontainer -->';
    }
    
    // ------------------------------------------------------------
    // -------------------- Javscript Check -----------------------
    // ------------------------------------------------------------				
    
    // If JavaScript is enabled, this will hide all tab content except for the first tab. If Javascript is disabled, then the tabs will stay visible.
    for ($d = 2; $d < $a; $d++) {
     	echo ("<script type=\"text/javascript\">document.getElementById('sc".$d."').style.display = 'none';</script>");
    }
    ?> 
    <script type="text/javascript">
    // We only show the tab links if JavaScript is available/active.
    <!--
    if (document.getElementById("slidetabsmenu") != null) {
      document.getElementById('slidetabsmenu').style.display = "block";
    }
    //-->
    </script>
    <?php
    if ($bShowHeaders != true) {
      // Hide tab header if JavaScript is available/active but they are set to false
      echo ("<script type=\"text/javascript\">
    	  <!--
    	  if (document.getElementById('ProductDescriptionHeader') != null) {
    	    document.getElementById('ProductDescriptionHeader').style.display = \"none\";
    	  }
    	  if (document.getElementById('AddToCartHeader') != null) {
    	    document.getElementById('AddToCartHeader').style.display = \"none\";
    	  } 
    	  if (document.getElementById('AdditionalImagesHeader') != null) {
    	    document.getElementById('AdditionalImagesHeader').style.display = \"none\";
    	  }
    	  if (document.getElementById('ReviewsHeader') != null) {
    	    document.getElementById('ReviewsHeader').style.display = \"none\";
    	  }
    	  //-->
      </script>");
    }
    
    If ( $g == 1 && $sName[$g] == "") { ?>
      <script type="text/javascript">
      // We only show the tab links if JavaScript is available/active.
      <!--
      if (document.getElementById("slidetabsmenu") != null) {
        document.getElementById('slidetabsmenu').style.display = "none";
      }
      if (document.getElementById("tabcontentcontainer") != null) {
        document.getElementById('tabcontentcontainer').style.display = "none";
      }
      //-->
      </script>
    <?php } ?>
    <br class="clearBoth" />
    
    <?php
    // If there is an EndTab tag, then display the rest of the text below the tabs.
    if ($FindEnd[1] != ""){?>
    	<div class="productGeneral biggerText"><?php echo $FindEnd[1]; ?></div>
    <?php
    }
    Thanks for the help!

 

 

Similar Threads

  1. Tabbed Products ''LITE'' version - Delimiter based
    By qhome in forum All Other Contributions/Addons
    Replies: 1193
    Last Post: 16 Sep 2009, 06:37 PM
  2. tabbed products lite big problem
    By tacotupac in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 27 Jun 2007, 11:25 PM
  3. Fantastic Tip For Creating Pages With Protected Content Using Tabbed Products Lite
    By lebrand2006 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 12 May 2007, 04:11 PM
  4. Tabbed Products LITE - CSS/JS Issue?
    By rknepp79 in forum All Other Contributions/Addons
    Replies: 4
    Last Post: 15 Dec 2006, 08:04 PM
  5. x-sell, tabbed products lite, IH2 question
    By signs in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 30 Oct 2006, 01:43 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR