Jump to content



Photo
* * * * * 2 votes

[Contribution] Products Specifications


  • Please log in to reply
1087 replies to this topic

#1081   radhavallabh

radhavallabh
  • Members
  • 81 posts
  • Real Name:sunil jain
  • Gender:Male
  • Location:New Delhi India

Posted 03 September 2014 - 02:46

Okay back once again-

The above error now gone I updated application_top.php for the same

But still same issue-

Product filters box shows  not enough filters

Alignment broken-

http://www.radhavall...ress-p-790.html

 

Pls advice....


Edited by radhavallabh, 03 September 2014 - 02:47.


#1082   radhavallabh

radhavallabh
  • Members
  • 81 posts
  • Real Name:sunil jain
  • Gender:Male
  • Location:New Delhi India

Posted 03 September 2014 - 02:49

How to upload screen shots need to show you the admin area so as you could guide me if I have any setting done incorrectly...



#1083   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,281 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 03 September 2014 - 02:54

You have a formatting error somewhere. You have installed another addon for tabs that probably interferes with the Products Specifications filters. Remove one or the other, or combine them yourself. I can't fix this for you.

 

Regards

Jim


My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price in Cart Only/MAPP Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support
Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#1084   radhavallabh

radhavallabh
  • Members
  • 81 posts
  • Real Name:sunil jain
  • Gender:Male
  • Location:New Delhi India

Posted 03 September 2014 - 02:57

No I did not use any addon with Tabs currently other than product specifications



#1085   radhavallabh

radhavallabh
  • Members
  • 81 posts
  • Real Name:sunil jain
  • Gender:Male
  • Location:New Delhi India

Posted 03 September 2014 - 03:16

Pasting my product info.php Code here-

<?php
/*
  $Id$

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

  Copyright (c) 2014 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);
  
  // Start Products Specifications
  require_once (DIR_WS_FUNCTIONS . 'products_specifications.php');

// Process data from the on-page forms
  require_once( DIR_WS_MODULES . 'product_info_process.php' );
// End Products Specifications

  //$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 . "'");
  //on/off
  if (!empty($hiddencats)) {
    $product_check_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd, " . TABLE_PRODUCTS_TO_CATEGORIES . " p2c where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pd.products_id = p.products_id and p.products_id = p2c.products_id and (not (p2c.categories_id in (" . implode(',', $hiddencats) . "))) and pd.language_id = '" . (int)$languages_id . "'");
  } else {
    $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);
  
  // Start Products Specifications
  if (SPECIFICATIONS_BOX_FRAME_STYLE == 'Tabs') {
    // Insert the javascript for the tabs
    $head_javascript = '  <script language="javascript" type="text/javascript">' . PHP_EOL;
    $head_javascript .= '    $(document).ready(function(){' . PHP_EOL;
    $head_javascript .= '      initTabs();' . PHP_EOL;
    $head_javascript .= '    });' . PHP_EOL;
    $head_javascript .= '    function initTabs() {' . PHP_EOL;
    $head_javascript .= "      $('#tabMenu a').bind('click',function(e) {" . PHP_EOL;
    $head_javascript .= '      e.preventDefault();' . PHP_EOL;
    $head_javascript .= '      var thref = $(this).attr("href").replace(/#/, "");' . PHP_EOL;
    $head_javascript .= "      $('#tabMenu a').removeClass('active');" . PHP_EOL;
    $head_javascript .= "      $(this).addClass('active');" . PHP_EOL;
    $head_javascript .= "      $('#tabContent div.content').removeClass('active');" . PHP_EOL;
    $head_javascript .= "      $('#'+thref).addClass('active');" . PHP_EOL;
    $head_javascript .= '      });' . PHP_EOL;
    $head_javascript .= '    }' . PHP_EOL;
    $head_javascript .= '  </script>' . PHP_EOL;
    $head_javascript .= '  <script src="ext/jquery/star_rating/jquery.rating.pack.js" type="text/javascript" language="javascript"></script>' . PHP_EOL;
    $head_javascript .= '  <link href="ext/jquery/star_rating/jquery.rating.css" type="text/css" rel="stylesheet"/>' . PHP_EOL;

    $oscTemplate->addBlock( $head_javascript, 'header_tags' );
  }

  require( DIR_WS_INCLUDES . 'template_top.php' );

// echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product'));
?>
<?php
  if ($product_check['total'] < 1) {
?>
<div class="contentContainer">
  <div class="contentText">
    <?php echo TEXT_PRODUCT_NOT_FOUND; ?>
  </div>

  <div style="float: right;">
    <?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', tep_href_link(FILENAME_DEFAULT)); ?>
  </div>
</div>
<?php
  } else {
// Products Specifications

  /*require(DIR_WS_INCLUDES . 'template_top.php');

  if ($product_check['total'] < 1) {
?>

<div class="contentContainer">
  <div class="contentText">
    <?php echo TEXT_PRODUCT_NOT_FOUND; ?>
  </div>

  <div style="float: right;">
    <?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'triangle-1-e', tep_href_link(FILENAME_DEFAULT)); ?>
  </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 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_info = tep_db_fetch_array($product_info_query);

    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 . "'");

    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>';
    } else {
      $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
    }

    if (tep_not_null($product_info['products_model'])) {
      $products_name = $product_info['products_name'] . '<br /><span class="smallText">[' . $product_info['products_model'] . ']</span>';
    } else {
      $products_name = $product_info['products_name'];
    }
?>

<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?>

<div>
  <h1 style="float: right;"><?php echo $products_price; ?></h1>
  <h1><?php echo $products_name; ?></h1>
</div>

<div class="contentContainer">
  <div class="contentText">

<?php
    if (tep_not_null($product_info['products_image'])) {
      $photoset_layout = '1';

      $pi_query = tep_db_query("select image, htmlcontent from " . TABLE_PRODUCTS_IMAGES . " where products_id = '" . (int)$product_info['products_id'] . "' order by sort_order");
      $pi_total = tep_db_num_rows($pi_query);

      if ($pi_total > 0) {
        $pi_sub = $pi_total-1;

        while ($pi_sub > 5) {
          $photoset_layout .= 5;
          $pi_sub = $pi_sub-5;
        }

        if ($pi_sub > 0) {
          $photoset_layout .= ($pi_total > 5) ? 5 : $pi_sub;
        }
?>

    <div id="piGal">

<?php
 if (tep_session_is_registered('customer_id') || (ALLOW_ASK_A_QUESTION == 'true'))  {
      echo tep_draw_button(TEXT_ASK_QUESTION, 'help', tep_href_link(FILENAME_ASK_QUESTION, 'products_id='.$product_info['products_id']));
    }
        $pi_counter = 0;
        $pi_html = array();

        while ($pi = tep_db_fetch_array($pi_query)) {
          $pi_counter++;

          if (tep_not_null($pi['htmlcontent'])) {
            $pi_html[] = '<div id="piGalDiv_' . $pi_counter . '">' . $pi['htmlcontent'] . '</div>';
          }

          echo tep_image(DIR_WS_IMAGES . $pi['image'], '', '', '', 'id="piGalImg_' . $pi_counter . '"');
        }
?>

    </div>

<?php
        if ( !empty($pi_html) ) {
          echo '    <div style="display: none;">' . implode('', $pi_html) . '</div>';
        }
      } else {
?>

    <div id="piGal">
    
      <?php
	 echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name'])); ?>
    </div>

<?php
      }
    }
?>

<script type="text/javascript">
$(function() {
  $('#piGal').css({
    'visibility': 'hidden'
  });

  $('#piGal').photosetGrid({
    layout: '<?php echo $photoset_layout; ?>',
    width: '250px',
    highresLinks: true,
    rel: 'pigallery',
    onComplete: function() {
      $('#piGal').css({ 'visibility': 'visible'});

      $('#piGal a').colorbox({
        maxHeight: '90%',
        maxWidth: '90%',
        rel: 'pigallery'
      });

      $('#piGal img').each(function() {
        var imgid = $(this).attr('id').substring(9);

        if ( $('#piGalDiv_' + imgid).length ) {
          $(this).parent().colorbox({ inline: true, href: "#piGalDiv_" + imgid });
        }
      });
    }
  });
});
</script>

<?php //echo stripslashes($product_info['products_description']); ?>&nbsp;

<?php
    $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) {
?>

    <p><?php echo TEXT_PRODUCT_OPTIONS; ?></p>

    <p>
<?php
      $products_options_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name 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 . "' order by popt.products_options_name");
      while ($products_options_name = tep_db_fetch_array($products_options_name_query)) {
        $products_options_array = array();
//<!-- AJAX Attribute Manager More Product weight-->
//        $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
       // $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pa.products_options_sort_order");
//<!-- AJAX Attribute Manager end -->


//        while ($products_options = tep_db_fetch_array($products_options_query)) {
//          $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
//          if ($products_options['options_values_price'] != '0') {
//            $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
//          }
//        }

$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix, pa.options_values_weight, pa.weight_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'order by pa.products_options_sort_order");
        while ($products_options = tep_db_fetch_array($products_options_query)) {
          $products_options_array[] = array('id' => $products_options['products_options_values_id'], 'text' => $products_options['products_options_values_name']);
          $products_options_infotext = '';
          if ($products_options['options_values_price'] != '0') {
            $products_options_infotext = $products_options['price_prefix'] . strip_tags($currencies->display_price($products_options['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])));
          }
          if (PRODUCT_LIST_WEIGHT > 0) {
            if ($products_options['options_values_weight'] != '0') {
              if (!empty($products_options_infotext)) {
                $products_options_infotext .= '; ';
              }
              $products_options_infotext .= $products_options['weight_prefix'] . $products_options['options_values_weight'] . TEXT_PRODUCT_WEIGHT_UNIT;
            }
          }
          if (!empty($products_options_infotext)) {
            $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . $products_options_infotext . ')';
          }
        }
// END: More Product Weight

        if (is_string($HTTP_GET_VARS['products_id']) && isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {
          $selected_attribute = $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']];
        } else {
          $selected_attribute = false;
        }
?>
      <strong><?php echo $products_options_name['products_options_name'] . ':'; ?></strong><br /><?php echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?><br />
<?php
      }
?>
    </p>

<?php
    }
?><br />
 <div class="buttonSet">
    <span class="buttonAction"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'cart', null, 'primary'); ?></span>

    <?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()));
	if (tep_session_is_registered('customer_id') || (ALLOW_ASK_A_QUESTION == 'true'))  {
      echo tep_draw_button(TEXT_ASK_QUESTION, 'help', tep_href_link(FILENAME_ASK_QUESTION, 'products_id='.$product_info['products_id']));
    }
	 ?>
  </div>

<?php
    include_once (DIR_WS_MODULES . FILENAME_PRODUCTS_TABS);
// End Products Specifications
?>

    <div style="clear: both;"></div>
    

<?php
    if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>

    <p style="text-align: center;"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></p>

<?php
    }
?>

  </div>

<?php
    $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and r.reviews_id = rd.reviews_id and rd.languages_id = '" . (int)$languages_id . "' and reviews_status = 1");
    $reviews = tep_db_fetch_array($reviews_query);
?>

 

<?php
    if ((USE_CACHE == 'true') && empty($SID)) {
      echo tep_cache_also_purchased(3600);
    } else {
      include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
    }
?>

</div>

</form>

<?php
  }

  require(DIR_WS_INCLUDES . 'template_bottom.php');
  require(DIR_WS_INCLUDES . 'application_bottom.php');
?>

Please could you help check the bug....



#1086   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,281 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 03 September 2014 - 03:20

I don't have the time to debug your site for you. That's your job. Check yor edits again.

 

Regards

Jim


My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price in Cart Only/MAPP Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support
Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated


#1087   fuzioneer

fuzioneer
  • Members
  • 151 posts
  • Real Name:Dave
  • Gender:Male

Posted 14 September 2014 - 14:36

ok i got the addon all working, superb addon :)

 

I wanted to know if its possible with the addon to be able to do a slider for a variable

 

i.e. something like http://jqueryui.com/slider/#range

 

Does this addon do that, or has anyone done similar ?



#1088   kymation

kymation

    Code Monkey

  • Community Sponsor
  • 8,281 posts
  • Real Name:Jim Keebaugh
  • Gender:Male
  • Location:Aberdeen WA USA

Posted 14 September 2014 - 16:46

It's certainly possible, but this addon does not include the code to do that. I'm not aware of anyone who has ever done that.

 

You can be the first!

 

Regards

Jim


My Addons

Banners Box Download Support
Categories Accordion Box Download Support
Closest Shipper 2.2x Support
Document Manager 2.2x Support
Generic Box Download Support
Get 1 Free 2.2x Support
Modular Front Page Download Support
Modular SEO Header Tags Download Support
MVS 2.2x Support
PDF Datasheet Download Support
Price in Cart Only/MAPP Download Support
Price Updater 2.2x
Products Specifications 2.3.x Development Version Support Bugs/Suggestions
Request a Review Download Support
Shopping List Download Support New!
Specials Image Overlay Download Support
Superfish Categories Box Download Support
Theme Switcher 2.3+ Support  Updated