Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

CONTRIBUTION Product Tabs


Cyperis

Recommended Posts

Think Steve meant catalog/admin/includes/boxes/tools.php

 

Although I must say I am not familiar with the contribution

 

Regards

Joli

 

I don't think that is the answer. It does need to be in the left column since it is a new module in the column according to the screen shots.

 

I omitted adding anything to the column_left.php file and followed the rest of the instructions. I do get the new module on the left in the admin panel and it shows 1 link instead of 2. I only get the "Product Tabs" link and no tabs are listed as the screenshot shows.

 

When I go to edit a product, thinking maybe the tab insertion is there, I get the following error message.

 

1054 - Unknown column 'products_tab_1' in 'field list'

 

select products_tab_1, products_tab_2, products_tab_3, products_tab_4, products_tab_5, products_tab_6 from products_description where products_id = '58' and language_id = '1'

 

[TEP STOP]

 

Since the new module shows up, something is going right. Since I am lacking 1 of the 2 links, I am sure it is somewhere within the code. I am not even sure that the column_left.php file even needs to be modified at all. In the new version of OSC, this file simply points to the includes/boxes directory, not to any number of specific files and I have the new file of echo_customization.php in the boxes directory.

Edited by Computer Geekette
Link to comment
Share on other sites

When I go to edit a product, thinking maybe the tab insertion is there, I get the following error message.

 

1054 - Unknown column 'products_tab_1' in 'field list'

 

select products_tab_1, products_tab_2, products_tab_3, products_tab_4, products_tab_5, products_tab_6 from products_description where products_id = '58' and language_id = '1'

 

[TEP STOP]

 

Can't edit the post anymore but wanted to make a comment on this error message. While looking closer at the screen shots, when I went to edit the product and got this error message, it was in the location that the tab boxes would have shown up.

Link to comment
Share on other sites

Can't edit the post anymore but wanted to make a comment on this error message. While looking closer at the screen shots, when I went to edit the product and got this error message, it was in the location that the tab boxes would have shown up.

http://www.oscommerce.com/forums/topic/388811-contribution-product-tabs/page__st__60

To improve is to change; to be perfect is to change often.

 

Link to comment
Share on other sites

Ok, I don't know what it is that I did before that was wrong but I tried it again and everything seems to be working now. Thanks for all the input on this...it is appreciated.

 

The one thing I am unsure of is that the description follows through on each tab with the additional information at the bottom. While I can deal with this if necessary, I would rather have each tab change to new information, not a continuation of the main tab.

 

Any ideas?

Link to comment
Share on other sites

I had the same problem and I did a compare of the old file and the new file and noticed that

 

.ui-tabs .ui-tabs-hide {

display: none !important;

}

 

was missing from the custom css file. I added this and now it works fine.

 

HOORAY!! That fixed my problem. Now everything works perfectly! Thanks for the great contribution EchoGuns.

Link to comment
Share on other sites

  • 1 month later...

Hello I can't make it work I read all the threads from the beginning to the end.... I've made all changes I even changed on products_tabs.php the url path:

 

<a href="<?php echo tep_href_link(FILENAME_PRODUCT_INFO, ($cPath ? 'cPath=' . $cPath . '&' : '') . 'products_id=' . $product_info['products_id']); ?>#tabs-0"><?php echo TEXT_TAB_DESCRIPTION; ?></a></li>

 

Now the path is correct but the tab's content is not changing....

 

Any hint- help please.....

Link to comment
Share on other sites

  • 4 months later...

@@EchoGuns

 

Product Tabs Version 1.0

Description:
This contribution will change the way that the product_info.php displays the product information. It moves the product description into a new tab system and allows for customization of up to 5 tabs. They are customized via the admin page. Customization in this case refers to renaming them.

When editing or adding new product the tabs are displayed there and if you put something in the tab when adding the product, it will reflect the changes on the store side. So if a tab is left blank, it will not show for the customer.

Download Link: http://addons.oscommerce.com/info/8536

Screenshots:
attachicon.gifProduct Tabs Admin Settings.jpgattachicon.gifProduct Tabs Product Edit.jpgattachicon.gifProduct Tabs Product Info.jpg

Hi

I installed your products Tab contribution into a basic OSCommerce version  2.3.4 store and everything seems fine within admin, but I have a problem with how the tabs are displayed with the store front.

When viewed with Firefox and Chrome, the product test page is displaying the page with an additional page sitting to the right and below the product tabs. If viewed with IE, I do not get the same problem, but I see the same content in all of the tabs.

I have installed this 3 times now and I have followed the documented instructions and have installed the SQL, but still the problem exists.

The only other mods I have installed are v2.3 superfish_box_1.1 and Ckeditor plus_ image_ upload.

I think the issue is beiong caused by the jQuery function of the superfish categories box.

I have seen similar issues in previous postings. Have you got workaround for this issue?

Link to comment
Share on other sites

  • 1 month later...

Open both template_top.php files, admin and catalog and before </head> add:

 

<script type="text/javascript">
// fix jQuery base tag bug
$.fn.__tabs = $.fn.tabs;
$.fn.tabs = function (a, b, c, d, e, f) {
var base = location.href.replace(/#.*$/, '');
$('ul>li>a[href^=#]', this).each(function () {
     var href = $(this).attr('href');
     $(this).attr('href', base + href);
});
$(this).__tabs(a, b, c, d, e, f);
};
</script>

 

Link to comment
Share on other sites

  • 7 months later...
  • 4 months later...

Hi everyone

 

I'm trying to install this addon on a responsive themed 2.3.3.4 store, and everything works except the tabs in the product info page

 

The instructions suggest I comment out "echo stripslashes" in product_info.php, but mine looks different

 

This is what I have

                if ($product_info['products_description'] != '')        { echo '
                <div id="description"><div class="description">'.stripslashes($product_info['products_description']).'</div></div>';
                }

Could this section of code be the reason I don't see any of my tabs in the product info page?

 

Thank you

Link to comment
Share on other sites

I believe my issues are caused by the heavy css changes going on in the product info page

 

I managed to get my tabs to show by copying the #description "if" line and modifying it to show PRODUCTS_TAB_1, but none of the content will show in the tab, it shows just below the description block

 

Any experts here willing to help me out? Here is my product_info.php page

 

Everything else works perfectly. It's just the product_info.php changes that don't

 

Thanks very much

<?php
/*
  $Id$

  osCommerce, Open Source E-Commerce Solutions
  http://www.oscommerce.com

  Copyright (c) 2010 osCommerce

  Released under the GNU General Public License
*/

  require('includes/application_top.php');
  if (!isset($HTTP_GET_VARS['products_id'])) {
    tep_redirect(tep_href_link(FILENAME_DEFAULT));
  }
  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);
  $current_page = FILENAME_PRODUCT_INFO;
  $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and pd.language_id = '" . (int)$languages_id . "'");
  $product_check = tep_db_fetch_array($product_check_query);

  require(DIR_WS_INCLUDES . 'template_top.php');
  $ndate = strftime("%Y-%m-%d",strtotime('-'.PRODUCT_MAX_AGE.' days')); // set max age of displayed product
?>
<?php echo tep_draw_content_top();?>
<?php
  if ($product_check['total'] < 1) {
?>
<?php echo tep_draw_title_top();?>
<h2><?php echo TEXT_PRODUCT_NOT_FOUND; ?></h2>
<?php echo tep_draw_title_bottom();?>

<div class="contentContainer">
  <div class="contentBlock">
      <div class="buttonSet">
        	<span class="fl_right"><?php echo tep_draw_button1_top();?><?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', tep_href_link(FILENAME_DEFAULT)); ?><?php echo tep_draw_button1_bottom();?></span>
      </div>
</div>
</div>
<?php
  } else {
    $product_info_query = tep_db_query("select p.products_id, pd.products_name, pd.products_description, p.products_model, p.products_quantity, p.products_image, pd.products_url, p.products_price, p.products_tax_class_id, p.products_date_added, p.products_date_available, p.manufacturers_id, p.products_ordered from " . TABLE_PRODUCTS . " p left join " . TABLE_MANUFACTURERS . " m on (p.manufacturers_id = m.manufacturers_id),  " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1'

		 
		and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' 
		and pd.products_id = p.products_id 
		and pd.language_id = '" . (int)$languages_id . "'");
		
    $product_info = tep_db_fetch_array($product_info_query);
	$tags_query_raw = tep_db_query("select pt.tag_id, t.tag_text from " . TABLE_TAGS . " t, " . TABLE_PRODUCTS_TAGS . " pt where pt.products_id = '" . (int)$product_info['products_id'] . "' and t.tag_id = pt.tag_id and t.language_id = '" . (int)$languages_id . "'");
	$tags = '';
	$caount = 0;
	$label_featured = PROD_INFO_PAGE_SHOW_FEATURED_LABEL;
	$topsellers_max = (TOPSELLERS_MAX-1);
    while ($tag = tep_db_fetch_array($tags_query_raw)) {
				if ($caount != 0) $tags .= ' ';
				$tags .= '<li><a href="' . tep_href_link(FILENAME_TAG_PRODUCTS) .'?id_tag='.$tag['tag_id'].'">'.$tag['tag_text'].'</a></li>';
				$caount++;
			}
    tep_db_query("update " . TABLE_PRODUCTS_DESCRIPTION . " set products_viewed = products_viewed+1 where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and language_id = '" . (int)$languages_id . "'");

	$featured_query = tep_db_query("select status, products_id from " . TABLE_FEATURED . " where products_id = '" . (int)$product_info['products_id'] . "'");
    $featured_product = tep_db_fetch_array($featured_query);
	if ($label_featured == 'Show') {
		$lang = tep_db_fetch_array(tep_db_query("select name, code, languages_id from " . TABLE_LANGUAGES . " where languages_id = '" . (int)$languages_id . "'"));
		$color = $lang['code'];					
		$topsellers = tep_db_fetch_array(tep_db_query("SELECT products_ordered, products_id FROM " . TABLE_PRODUCTS . " ORDER BY products_ordered DESC LIMIT ".TOPSELLERS_MAX.""));
		$_top = $topsellers['products_ordered'];
	      $products_date_added = date_format(date_create($product_info['products_date_added']), 'Y-m-d');  
	      $p_new = ($products_date_added > $ndate ? '<div class="new_label '.$color.'"><strong>'.LABEL_NEW.'</strong></div>' : '');
	      $p_featured = (($featured_product['status']) ? '<div class="featured_label '.$color.'"><strong>'.LABEL_FEATURED.'</strong></div>' : '');
	      $p_topsellers = ($product_info['products_ordered'] <= $_top && $product_info['products_ordered'] >= $_top - $topsellers_max ? '<div class="top_label '.$color.'"><strong>'.LABEL_TOPSELLERS.'</strong></div>' : '');
	      $p_label = ($p_featured ? $p_featured.$p_topsellers : ($p_new ? $p_new.$p_topsellers : $p_topsellers));
	}
    if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
      $products_price = '<del>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</del> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate(					$product_info['products_tax_class_id'])) . '</span>';
			$persent = ($currencies->display_sale_percent($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']), $new_price) * -1);
			$sale_percent = ((PROD_INFO_PAGE_SHOW_SPECIALS_LABEL == 'Show') ? '<div class="sale_percent '.$color.'"><strong>'.$persent.'%</strong></div>' : '');
    } else {
	  	$new_price = $product_info['products_price'];
      	$products_price = '<span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
		$sale_percent = '';
    }
		
    $products_name = $product_info['products_name'] . '';
	


echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>
<div class="contentContainer page_products_info">
  <div class="contentBlock">
      <div id="product_info" class="row">
          			<div class="span3">
<?php
		if (tep_not_null($product_info['products_image'])) {
			$pi_query = tep_db_query("select image, htmlcontent from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int)$product_info['products_id'] . "' order by sort_order");
					if (tep_db_num_rows($pi_query) > 0) {
?>
				<div id="piGal">
						<ul class="relative">
				<?php 
				$pi_counter = 0;
				while ($pi = tep_db_fetch_array($pi_query)) {
					$pi_counter++;
					$pi_entry = '        <li class="wrapper_pic_div">
											'.$p_label . "\n".
								'			'.$sale_percent . "\n".

					
					'';
				

        if (tep_not_null($pi['htmlcontent'])) {
			if (substr($pi['htmlcontent'], 0, 1) == '<')	{
				$pi_href1 = '#piGalimg_' . $pi_counter;
			}else{
				$pi_href2 = tep_href_link(DIR_WS_IMAGES . $pi['image'], '', 'NONSSL', false);
			}
		}
          if (tep_not_null($pi['htmlcontent'])) {
		  
					if (substr($pi['htmlcontent'], 0, 1) == '<')	{
						$pi_entry .= '<div class="product_pic_wrapper"><a class="product_pic" style="height:'.PROD_INFO_IMAGE_HEIGHT.'px" href="'.$pi_href1.'" target="_blank" data-rel="fancybox">' . tep_image(DIR_WS_IMAGES . $pi['image'], $pi['htmlcontent'], (PROD_INFO_IMAGE_WIDTH), (PROD_INFO_IMAGE_HEIGHT), '', ' class="img"') . '<div class="pic_zoom"></div></a></div>'; 
						$pi_entry .= '<div style="display: none;"><div id="piGalimg_' . $pi_counter . '">' . $pi['htmlcontent'] . '</div></div>';
					}else{
						$pi_entry .= '<div class="product_pic_wrapper"><a class="product_pic" style="height:'.PROD_INFO_IMAGE_HEIGHT.'px" href="'.$pi_href2.'" target="_blank" data-rel="fancybox" title="' . $pi['htmlcontent'] . '">' . tep_image(DIR_WS_IMAGES . $pi['image'], $pi['htmlcontent'], (PROD_INFO_IMAGE_WIDTH), (PROD_INFO_IMAGE_HEIGHT), '', ' class="img"') . '<div class="pic_zoom" style="width:'.(PROD_INFO_IMAGE_WIDTH).'px;height:'.(PROD_INFO_IMAGE_HEIGHT).'px;"></div></a></div>'; 
						$pi_entry .= '<div style="display: none;"><div id="piGalimg_' . $pi_counter . '">' . $pi['htmlcontent'] . '</div>';
					}				
			}else{
				$pi_href3 = tep_href_link(DIR_WS_IMAGES . $pi['image'], '', 'NONSSL', false);
				$pi_entry .= '<div class="product_pic_wrapper"><a class="product_pic" style="height:'.PROD_INFO_IMAGE_HEIGHT.'px" href="'. $pi_href3.'" target="_blank" data-rel="fancybox" title="' . $pi['htmlcontent'] . '">
' . tep_image(DIR_WS_IMAGES . $pi['image'], '', (PROD_INFO_IMAGE_WIDTH), (PROD_INFO_IMAGE_HEIGHT), '', ' class="img"') . 
'<div class="pic_zoom" style="width:'.(PROD_INFO_IMAGE_WIDTH).'px;height:'.(PROD_INFO_IMAGE_HEIGHT).'px;"></div></a></div>';
			}

		
					$pi_entry .= '</li>';
					echo $pi_entry;
				}
?>
						</ul>
				</div>
<?php
	$coeff =((PROD_INFO_IMAGE_WIDTH != PROD_INFO_IMAGE_HEIGHT) ? PROD_INFO_IMAGE_HEIGHT / PROD_INFO_IMAGE_WIDTH  : 1);
?>      
		<script type="text/javascript">
		$(function(){
	var myWidth = <?php echo (($pi_counter > 1) ? '68' : '0'); ?>;
	var myHeight = myWidth * <?php echo $coeff;?>;
		$('#piGal ul').bxGallery({
			maxwidth: '<?php echo (PROD_INFO_IMAGE_WIDTH); ?>',
			maxheight: '<?php echo (''); ?>',
			thumbwidth: myWidth,
			thumbheight: myHeight,
			thumbcontainer: <?php echo (PROD_INFO_IMAGE_WIDTH + 5); ?>,
			load_image: 'ext/jquery/bxGallery/spinner.gif'
		})
				});
		</script>
<?php
					} else {
				if (tep_not_null($product_info['products_image'])) {
				$pi_href4 = tep_href_link(DIR_WS_IMAGES . $product_info['products_image'], '', 'NONSSL', false);
?>
					<div class="hover">
					<?php echo '<div id="piGal" class="wrapper_pic_div fl_left" style="width:'.(PROD_INFO_IMAGE_WIDTH +10).'px;"><div class="product_pic_wrapper"><a class="product_pic" style="height:'.PROD_INFO_IMAGE_HEIGHT.'px;" href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank" data-rel="fancybox">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), (PROD_INFO_IMAGE_WIDTH), (PROD_INFO_IMAGE_HEIGHT), ''). '<div class="pic_zoom" style="width:'.(PROD_INFO_IMAGE_WIDTH).'px;height:'.(PROD_INFO_IMAGE_HEIGHT).'px;"></div></a></div></div>'; ?>
					</div>
<?php
				}
		}				  
		echo '<script type="text/javascript">
		$("#piGal a[data-rel^=\'fancybox\']").fancybox({
			cyclic: true
		});
		</script>';
				}
if (($oscTemplate->hasBlocks('box_info_page')))	{ $width_ext = PROD_INFO_IMAGE_WIDTH;?> 
<div class="bookmarks"><?php echo $oscTemplate->getBlocks('box_info_page');?></div><br><?php	}
?>
							</div>
							<div class="span6">
									<div class="info">
<?php
	 if ($product_check['total'] >= 1) {
			include (DIR_WS_INCLUDES . 'products_next_previous.php');
	 }
?>

<div>
<?php	 
				if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>
												<div class="data data_padd small_title"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></div>
<?php
				}else{
?>		
												<div class="data data_padd small_title"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></div>
<?php } ?>
												<h1 class="name"><?php echo $products_name; ?></h1>
<?php	echo ((tep_not_null($product_info['products_model']))  || (tep_not_null($manufacturers_info['manufacturers_name'])) || (tep_not_null($product_info['products_weight'])) ?  '<div class="listing"><table>' : '');
                                                                                                   
    if (tep_not_null($product_info['products_model'])) {
?>                                                    
                                                	<tr>
                                                    	<td class="td_left"><?php echo ''.MODEL. '';?></td>
                                                        <td class="td_right"><?php echo '' . $product_info['products_model'] . ''; ?></td>
                                                    </tr>
<?php 
  }
  	$manufacturer_info_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = " . $product_info['manufacturers_id'] );
    $manufacturers_info = tep_db_fetch_array($manufacturer_info_query);

    if (tep_not_null($manufacturers_info['manufacturers_name'])) {
?>  
                                                	<tr>
                                                    	<td class="td_left"><?php echo ''.MANUFACTURER. '';?></td>
                                                        <td class="td_right"><?php echo '' . $manufacturers_info['manufacturers_name'] . ''; ?></td>
                                                    </tr>
<?php 
  }
    if (tep_not_null($product_info['products_weight'])) {
?>                                                    
                                                	<tr>
                                                    	<td class="td_left"><?php echo ''.WEIGTH. '';?></td>
                                                        <td class="td_right"><?php echo '' . $product_info['products_weight'] . ''; ?></td>
                                                    </tr>
                                                    
<?php 
  }
// START: Extra Fields Contribution v2.0b - mintpeel display fix
		  
                      $extra_fields_query = tep_db_query("
SELECT pef.products_extra_fields_order, pef.products_extra_fields_status as status, pef.products_extra_fields_name as name, ptf.products_extra_fields_value as value
FROM ". TABLE_PRODUCTS_EXTRA_FIELDS ." pef
LEFT JOIN ". TABLE_PRODUCTS_TO_PRODUCTS_EXTRA_FIELDS ." ptf
ON ptf.products_extra_fields_id=pef.products_extra_fields_id
WHERE ptf.products_id=". (int)$HTTP_GET_VARS['products_id'] ." and ptf.products_extra_fields_value<>'' and (pef.languages_id='0' or pef.languages_id='".(int)$languages_id."')
ORDER BY pef.products_extra_fields_order");
  while ($extra_fields = tep_db_fetch_array($extra_fields_query)) {
        if (! $extra_fields['status'])  // show only enabled extra field
           continue;
?>                                                    
                                                	<tr>
                                                    	<td class="td_left"><?php echo $extra_fields['name'];?></td>
                                                        <td class="td_right"><?php echo stripslashes($extra_fields['value']); ?></td>
                                                    </tr>
<?php 
  }
// END: Extra Fields Contribution - mintpeel display fix  
?> 
                                                	<tr>
                                                    	<td class="td_left"><?php echo ''.PRICE. '';?></td>
                                                        <td class="td_right"><?php echo $products_price; ?></td>
                                                    </tr>
<?php  echo ((tep_not_null($product_info['products_model']))  || (tep_not_null($manufacturers_info['manufacturers_name'])) || (tep_not_null($product_info['products_weight'])) ?  '</table></div>' : '');												
				$products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = popt.products_options_id and popt.language_id = '" . (int)$languages_id . "'");
				$products_attributes = tep_db_fetch_array($products_attributes_query);


                                       
				
				if ($products_attributes['total'] > 0) {
					
//++++ QT Pro: Begin Changed code
      $products_id=(preg_match("/^\d{1,10}(\{\d{1,10}\}\d{1,10})*$/",$HTTP_GET_VARS['products_id']) ? $HTTP_GET_VARS['products_id'] : (int)$HTTP_GET_VARS['products_id']); 
      require(DIR_WS_CLASSES . 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN . '.php');
      $class = 'pad_' . PRODINFO_ATTRIBUTE_PLUGIN;
      $pad = new $class($products_id);
      echo $pad->draw();
    }

//Display a table with which attributecombinations is on stock to the customer?
if(PRODINFO_ATTRIBUTE_DISPLAY_STOCK_LIST == 'True'): require(DIR_WS_MODULES . "qtpro_stock_table.php"); endif;

//++++ QT Pro: End Changed Code						
?>
</div>
<?php

				$reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and reviews_status = 1");
				$reviews = tep_db_fetch_array($reviews_query);
?>
		
												<div class="buttonSet">
														<span class="buttonAction"><?php echo tep_draw_button1_top();?><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?><?php echo tep_draw_button1_bottom();?></span>
								
														<div class="fl_left"><?php echo tep_draw_button2_top();?><?php echo tep_draw_button(IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : ''), 'comment', tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params())); ?><?php echo tep_draw_button2_bottom();?></div>
												</div>
									</div> 
							</div>
		</div>
        
    </div>
</div> </form>


<?php echo tep_draw_content_bottom();
		echo '';
?>
<?php
		$title_also_purchas =  false;
		if	(ALSO_PURCHASED_MODUL_DISPLAY == 'Show')	{
				if ((USE_CACHE == 'true') && empty($SID)) {
					echo tep_cache_also_purchased(3600);
				} else {
if (isset($HTTP_GET_VARS['products_id'])) {
	$orders_query2 = tep_db_query("select p.products_id, p.products_image, p.products_price, p.products_date_added, p.products_last_modified, pd.products_description, p.products_tax_class_id from " . TABLE_ORDERS_PRODUCTS . " opa, " . TABLE_ORDERS_PRODUCTS . " opb, " . TABLE_ORDERS . " o, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS . " p where opa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and opa.orders_id = opb.orders_id and opb.products_id != '" . (int)$HTTP_GET_VARS['products_id'] . "' and opb.products_id = p.products_id and opb.orders_id = o.orders_id AND opa.products_id = pd.products_id and p.products_status = '1' group by p.products_id order by o.date_purchased desc limit " . ALSO_PURCHASED_MODUL_MAX_DISPLAY);
	$num_products_ordered2 = tep_db_num_rows($orders_query2);

	if ($num_products_ordered2 >= ALSO_PURCHASED_MODUL_MIN_DISPLAY) {
					
					
			$title_also_purchas =  true;
				}
	}}
		}else{
			$title_also_purchas =  false;
		}
		

/* *********************************** */
if	(defined('RELATED_PRODUCTS_MAX_DISP'))	{
  $orderBy = 'ORDER BY ';
  $orderBy .= (RELATED_PRODUCTS_RANDOMIZE)?'rand()':'pop_order_id, pop_id';
  $orderBy .= (RELATED_PRODUCTS_MAX_DISP)?' limit ' . RELATED_PRODUCTS_MAX_DISP:'';
  $attributes = "
         SELECT
         pop_products_id_slave,
         products_name,
				 pa.products_description,
				 products_price,
         products_model,
         products_price,
         products_quantity,
         products_tax_class_id,
         products_image
         FROM " .
         TABLE_PRODUCTS_RELATED_PRODUCTS . ", " .
         TABLE_PRODUCTS_DESCRIPTION . " pa, ".
         TABLE_PRODUCTS . " pb
         WHERE pop_products_id_slave = pa.products_id
         AND pa.products_id = pb.products_id
         AND language_id = '" . (int)$languages_id . "'
         AND pop_products_id_master = '".$HTTP_GET_VARS['products_id']."'
         AND products_status='1' " . $orderBy;
  			 
 		$attribute_query = tep_db_query($attributes);
			$title_related = ((mysqli_num_rows($attribute_query)>0) ? 1 : 0);	
		}
/* *********************************** */			  
	  if (isset($HTTP_GET_VARS['products_id'])) {
        $random2_select_id = " and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'";
      }
		$random2_select_rid = " ORDER BY RAND() limit " . (REVIEWS_BOX_MULTY_MAX_DISPLAY);
		$random2_select = tep_db_query("select r.reviews_id, r.reviews_rating, r.date_added, p.products_id, p.products_image, p.products_price, p.products_tax_class_id, pd.products_name, s.specials_new_products_price, r.customers_name from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd, " . TABLE_PRODUCTS . " p left join " . TABLE_SPECIALS . " s on p.products_id = s.products_id, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = r.products_id and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and p.products_id = pd.products_id and pd.language_id = '" . (int)$languages_id . "' and r.reviews_status = 1". $random2_select_id . $random2_select_pid . $random2_select_rid);
      
		$random2_product = tep_db_fetch_array($random2_select);
		$title_relviews = (($random2_product) ? true : false);
		
/* *********************************** */		
		if	((ALSO_PURCHASED_MODUL_DISPLAY == 'Show' && $title_also_purchas) || ($title_related) || ($tags != '') || ($product_info['products_description'] != ''))	{
	echo '<div id="tabvanilla_pinfo" class="widget">
					<script type="text/javascript">
							$(document).ready(function(){	
								var mq2 = window.matchMedia( "(min-width: 470px)" );
								if (mq2.matches) {
									var li = (document.getElementById(\'tabnav\').getElementsByTagName(\'li\').length);
									$(\'#tabnav li\').css(\'width\', 100 / li - 0+\'%\');
								
								}
								else {
									// window width is less than 500px
									var li = (document.getElementById(\'tabnav\').getElementsByTagName(\'li\').length);
									$(\'#tabnav li\').css(\'width\', \'100%\');
								}
	});
					</script>
	  <ul class="tabnav" id="tabnav">';
		if ($product_info['products_description'] != '')	{ echo '
		<li><a href="#description"><strong class="title_wrapper"><strong class="title_inner"><span class="title-icon"></span>'.TEXT_DESCRIPTION.'</strong></strong></a></li>';
		}
		if ($title_also_purchas == true)	{ echo '
				<li><a href="#also_purchase"><strong class="title_wrapper"><strong class="title_inner"><span class="title-icon"></span>'.TEXT_ALSO_PURCHASED_PRODUCTS.'</strong></strong></a></li>';
		}
		if ($title_related)	{ echo '
				<li><a href="#related"><strong class="title_wrapper"><strong class="title_inner"><span class="title-icon"></span>'.TEXT_RELATED_PRODUCTS.'</strong></strong></a></li>';
		}
		if ($oscTemplate->hasBlocks('box_toogle_pos_22') && $title_relviews)	{ echo '
				<li><a href="#box_toogle_pos_22"><strong class="title_wrapper"><strong class="title_inner"><span class="title-icon"></span>'.MODULE_BOXES_MULTY_REVIEWS_BOX_TOOGLE.'</strong></strong></a></li>';
		}
		if ($tags != '')	{ echo '
				<li><a href="#tags"><strong class="title_wrapper"><strong class="title_inner"><span class="title-icon"></span>'.TAGS_PRODUCT.'</strong></strong></a></li>';
		}																				  
echo '</ul>';
		if ($product_info['products_description'] != '')	{ echo '
		<div id="description"><div class="description">'.stripslashes($product_info['products_description']).'</div></div>';
		}

		if	(ALSO_PURCHASED_MODUL_DISPLAY == 'Show')	{
				if ((USE_CACHE == 'true') && empty($SID)) {
					echo tep_cache_also_purchased(3600);
				} else {
			echo '<div id="also_purchase" class="tabdiv">';			
			echo tep_draw_fpage_content_top();
			include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
			echo tep_draw_fpage_content_bottom();
			echo '</div>';
				}
		}
//Optional Related Products (ORP)			
		if	($title_related)	{
			echo '<div id="related" class="tabdiv">';
			echo tep_draw_fpage_content_top();
			include(DIR_WS_MODULES . FILENAME_RELATED_PRODUCTS); 
			echo tep_draw_fpage_content_bottom();
			echo '</div>';
		}
//ORP: end	
		if ($oscTemplate->hasBlocks('box_toogle_pos_22') && $title_relviews)	{
			echo '<div id="box_toogle_pos_22" class="tabdiv">'.$oscTemplate->getBlocks('box_toogle_pos_22').'</div>';
		} 
		if	($tags != '')	{
			echo '<div id="tags" class="tabdiv infoBoxContainer">';
			echo tep_draw_fpage_content_top().'<div class="tags"><div class="infoBoxContents"><ul>'.$tags.'</ul></div></div>';
			echo tep_draw_fpage_content_bottom();
			echo '</div>';
		}					
		echo '</div>';	
	}
  }
?>

<?php
  require(DIR_WS_INCLUDES . 'template_bottom.php');
  require(DIR_WS_INCLUDES . 'application_bottom.php');
?>
Link to comment
Share on other sites

  • 6 months later...

Hi

 

I hope someone can help.

 

i have just installed Product Tabs and everything seems to have worked great apart from the product admin page, as you will see form the screenshot.

 

All the textarea boxes follow each other and the admin home page appears in the middle of them.

 

I'm using v2.3.4r Edge

 

Thank you

post-338839-0-52106800-1454685771_thumb.png

Edited by GlenPig
Link to comment
Share on other sites

The tabs are all controlled by the jQuery theme, so change your theme to change the colors. I don't know of any way to change the size.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

  • 2 weeks later...

Hi Everyone,

 

I've got the tabs all working and styled perfectly.

 

The one last thing I would like to do is to automatically populate them when you create a new product.

 

So for example...

 

One of the tabs is for product return details, which 95% of the time will be the same content. So instead of having to manually type the same content every time you add a new product, is there a way of pre-populating the tabs with some default content?

 

Many thanks

 

Glen

Link to comment
Share on other sites

Hi,

first of all I have bootstrap 2.3.4

I installed the product tabs but it does not work quite well.

admin works perfectly, only in the shop itself, I do not see the tabs.
I only see the following:

         Description

etc..

and my images he put also under each other.

 

when I don't put the following file in, the images are ok. but the tabs are whole gone.

product_info.php

<?php include_once (DIR_WS_MODULES . FILENAME_PRODUCTS_TABS); ?>
Edited by dinopacha
Link to comment
Share on other sites

  • 2 weeks later...

Perfect - thanks Jim!

 

I hav the same ERROR, got it also in 2.3.3 and fix it with the JQUERY solution of 29gk post #162 ;

 

Open both template_top.php files, admin and catalog and before </head> add:

 

<script type="text/javascript">

// fix jQuery base tag bug

$.fn.__tabs = $.fn.tabs;

$.fn.tabs = function (a, b, c, d, e, f) {

var base = location.href.replace(/#.*$/, '');

$('ul>li>a[href^=#]', this).each(function () {

     var href = $(this).attr('href');

     $(this).attr('href', base + href);

});

$(this).__tabs(a, b, c, d, e, f);

};

</script>

 

but in the admin/template_top.php it gives a error : Code hinting may not work untill you fix this error :

 

here the full code ;

 

<?php
/*
  $Id$
 
  osCommerce, Open Source E-Commerce Solutions
 
  Copyright © 2014 osCommerce
 
  Released under the GNU General Public License
*/
 
?>
 
<!DOCTYPE html>
<html <?php echo HTML_PARAMS; ?>>
<script type="text/javascript">
// fix jQuery base tag bug
$.fn.__tabs = $.fn.tabs;
$.fn.tabs = function (a, b, c, d, e, f) {
var base = location.href.replace(/#.*$/, '');
$('ul>li>a[href^=#]', this).each(function () {
     var href = $(this).attr('href');
     $(this).attr('href', base + href);
});
$(this).__tabs(a, b, c, d, e, f);
};
</script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<meta name="robots" content="noindex,nofollow">
<title><?php echo TITLE; ?></title>
<base href="<?php echo ($request_type == 'SSL') ? HTTPS_SERVER . DIR_WS_HTTPS_ADMIN : HTTP_SERVER . DIR_WS_ADMIN; ?>" />
<!--[if IE]><script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/flot/excanvas.min.js', '', 'SSL'); ?>"></script><![endif]-->
<link rel="stylesheet" type="text/css" href="<?php echo tep_catalog_href_link('ext/jquery/ui/redmond/jquery-ui-1.10.4.min.css', '', 'SSL'); ?>">
<script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/jquery-1.11.1.min.js', '', 'SSL'); ?>"></script>
<script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/ui/jquery-ui-1.10.4.min.js', '', 'SSL'); ?>"></script>
 
<?php
  if (tep_not_null(JQUERY_DATEPICKER_I18N_CODE)) {
?>
<script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/jquery/ui/i18n/jquery.ui.datepicker-' . JQUERY_DATEPICKER_I18N_CODE . '.js', '', 'SSL'); ?>"></script>
<script type="text/javascript">
$.datepicker.setDefaults($.datepicker.regional['<?php echo JQUERY_DATEPICKER_I18N_CODE; ?>']);
</script>
<?php
  }
?>
 
<script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/flot/jquery.flot.min.js', '', 'SSL'); ?>"></script>
<script type="text/javascript" src="<?php echo tep_catalog_href_link('ext/flot/jquery.flot.time.min.js', '', 'SSL'); ?>"></script>
<link rel="stylesheet" type="text/css" href="includes/stylesheet.css">
<script type="text/javascript" src="includes/general.js"></script>
</head>
<body>
 
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
 
<?php
  if (tep_session_is_registered('admin')) {
    include(DIR_WS_INCLUDES . 'column_left.php');
  } else {
?>
 
<style>
#contentText {
  margin-left: 0;
}
</style>
 
<?php
  }
?>
 
<div id="contentText">
 
So what did Glenpig that it works for him?
 
Thanks for the support
 
Grtz
Kozak 
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...