Jump to content



Photo
* * * * - 6 votes

[Contribution] QTpro - Quantity Tracking Professional


  • Please log in to reply
2155 replies to this topic

#2141   toyzonline

toyzonline
  • Members
  • 458 posts
  • Real Name:Ricardo
  • Gender:Male
  • Location:Cheshire, England

Posted 12 November 2015 - 22:28

I have installed this Add-On and not getting any errors, but when I go to Product Attributes I just get a Blank Page.

 

I notice someone else had the same problem but couldn't see an resolution. Hoping someone can help

 

Ricardo

 

Just gone through this installation again and again I am simply getting a blank page when clicking on product attributes. I had uninstalled as per no support when I last asked about this, but really need this add on


Complete Newbie On The Learn - Not A Programmer

But Learning As I Go


#2142   GlenPig

GlenPig
  • Members
  • 24 posts
  • Real Name:Glen Piggott

Posted 08 March 2016 - 14:39

Hi I have gone through the instructions to add this to a recent oscommerce install 2.3.3.4, This is the second time as I don't seem to be getting it to work correctly, I don't seem to get any other options or the track stock tick box.

now with the second attempt I am recieveing an error -

Parse error: syntax error, unexpected '';' (T_CONSTANT_ENCAPSED_STRING), expecting ',' or ';' in /homepages/14/blanked/htdocs/blanked/products_attributes.php on line 292

If anyone could help me I would greatly appreciate it

 

@kepbem, Did you ever sort this, I too get this error.

 

Thanks


Edited by GlenPig, 08 March 2016 - 14:40.


#2143   14steve14

14steve14
  • Members
  • 4,385 posts
  • Real Name:Steve
  • Gender:Male
  • Location:Dorset UK

Posted 08 March 2016 - 16:07

As there appears to be very little support for this addon, you may be better off asking in the paid for help area, although why stock control of attributes has never been included in the core code we shall never know.


REMEMBER BACKUP, BACKUP AND BACKUP

 

Find information about the bootstrap community version here

 

Make it idiot proof and someone will make a better idiot.


#2144   wild.lucifero

wild.lucifero
  • Members
  • 29 posts
  • Real Name:Vidal Michele
  • Gender:Male
  • Location:Italy

Posted 28 March 2016 - 13:18

Hello to everyone,
         I just installed QTPro on standard OSC 2.3.4 (+ SEO Header Tags - Reloaded). I found the qtpro shows twice in admin too. It seems I solved reputting the sort by products_stock_attributes:

          $q=tep_db_query("select * from " . TABLE_PRODUCTS_STOCK . " where products_id=" . $VARS['product_id'] . " order by products_stock_attributes");
//sorting below goes by name rather than products_stock_attributes. Much easier to have it all sorted alphabetically
//        $q=tep_db_query("select ps. products_stock_id, ps.products_id, ps.products_stock_attributes, ps.products_stock_quantity, pov.products_options_values_id, pov.language_id, pov.products_options_values_name from " . TABLE_PRODUCTS_STOCK . " ps, products_options_values pov where ps.products_id=" . $VARS['product_id'] . " and pov.products_options_values_id = substring_index(ps.products_stock_attributes, '-', -1) order by pov.products_options_values_name asc");

I think it's better to inglube admin stock.php into categories.php because it is more faster inserting/editing data.On older 2.2 I got it by a button like the modify/delete/move/copy and it was really faster editing the stock quantity.

Ciao!



#2145   wild.lucifero

wild.lucifero
  • Members
  • 29 posts
  • Real Name:Vidal Michele
  • Gender:Male
  • Location:Italy

Posted 28 March 2016 - 13:49


I think it's better to "incorporate" admin stock.php into categories.php because it is more faster inserting/editing data.On older 2.2 I got it by a button like the modify/delete/move/copy and it was really faster editing the stock quantity.

Ciao!ZXC

 

 

...About this, I just found my mistake. It means that I find the "Stock" button where I want. Im' sorry. Thanks.

Ciao!


Edited by wild.lucifero, 28 March 2016 - 13:57.


#2146   Omar_one

Omar_one
  • Members
  • 138 posts
  • Real Name:Omar Masheh
  • Gender:Male
  • Location:Finland

Posted 01 June 2016 - 11:23

Hello,  

I just installed OTPro on OSC 2.3.4 Bootstrap (Edge) .. I got error 500 in the admin side ..

did any one have same issue? did any one has install it and worked well on OSC 2.3.4 Bootstrap (Edge)?

 

BR

Omar



#2147   lrgayle25

lrgayle25
  • Members
  • 23 posts
  • Real Name:Michelle sinclair

Posted 17 August 2016 - 02:22

Can someone please help me with this 

 

I cannot get past part

 

20)

product_info.php

For many people, an error is caused in this file after they make the edit because a loose bracket. Find and remove it if there is an error .

Find:

 

<?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();
        $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 . "'");
        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'])) .') ';
          }
        }
 
        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
    }
?>
 

Change to:

 
              <?php
}
//++++ QT Pro: End Changed Code
    $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
?>
 


#2148   lrgayle25

lrgayle25
  • Members
  • 23 posts
  • Real Name:Michelle sinclair

Posted 17 August 2016 - 02:24

My product page has been changed because I have instal Wholesale (SPPC lite)

 

Please look at my product_info.php file

 

<?php
/*
  $Id: product_info.php
  $Loc: catalog/
 
  osCommerce, Open Source E-Commerce Solutions
 
  Modified for:
  2015 wholesale (SPPC Lite) 1.1 BS EDGE by @raiwa info@sarplataygemas.com
 
  Copyright © 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);
 
  $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');
 
  if ($product_check['total'] < 1) {
?>
 
<div class="contentContainer">
  <div class="contentText">
    <div class="alert alert-warning"><?php echo TEXT_PRODUCT_NOT_FOUND; ?></div>
  </div>
 
  <div class="pull-right">
    <?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'fa fa-angle-right', 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" itemprop="price" content="' . preg_replace('/[^0-9.]*/', '', $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id']))) . '">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
    } else {
      $products_price = '<span itemprop="price" content="' . preg_replace('/[^0-9.]*/', '', $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']))) . '">' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
    }
 
    if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
      $products_price .= '<link itemprop="availability" href="http://schema.org/PreOrder"/>';
    } elseif ((STOCK_CHECK == 'true') && ($product_info['products_quantity'] < 1)) {
      $products_price .= '<link itemprop="availability" href="http://schema.org/OutOfStock"/>';
    } else {
      $products_price .= '<link itemprop="availability" href="http://schema.org/InStock"/>';
    }
 
    $products_price .= '<meta itemprop="priceCurrency" content="' . tep_output_string($currency) . '" />';
 
    $products_name = '<a href="' . tep_href_link('product_info.php', 'products_id=' . $product_info['products_id']) . '" itemprop="url"><span itemprop="name">' . $product_info['products_name'] . '</span></a>';
 
    if (tep_not_null($product_info['products_model'])) {
      $products_name .= '<br /><small>[<span itemprop="model">' . $product_info['products_model'] . '</span>]</small>';
    }
?>
 
<?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')). 'action=add_product', 'NONSSL'), 'post', 'class="form-horizontal" role="form"'); ?>
 
<div itemscope itemtype="http://schema.org/Product">
 
<div class="page-header">
  <h1 class="pull-right" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><?phpecho $products_price; ?></h1>
  <h1><?php echo $products_name; ?></h1>
  <div class="row">
    <?php echo $oscTemplate->getContent('product_info_price'); ?>
  </div>
</div>
 
<?php
  if ($messageStack->size('product_action') > 0) {
    echo $messageStack->output('product_action');
  }
?>
 
<div class="contentContainer">
  <div class="contentText">
 
<?php
    if (tep_not_null($product_info['products_image'])) {
 
      echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], NULL, NULL, NULL, 'itemprop="image" style="display:none;"');
 
      $photoset_layout = (int)MODULE_HEADER_TAGS_PRODUCT_COLORBOX_LAYOUT;
 
      $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) {
?>
 
    <div class="piGal pull-right" data-imgcount="<?php echo $photoset_layout; ?>">
 
<?php
        $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 class="piGal pull-right">
      <?php echo tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name'])); ?>
    </div>
 
<?php
      }
    }
?>
 
<div itemprop="description">
  <?php echo stripslashes($product_info['products_description']); ?>
</div>
 
<?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) {
?>
 
    <h4><?php echo TEXT_PRODUCT_OPTIONS; ?></h4>
 
    <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();
        // wholesale (SPPC Lite) BEGIN
$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.options_values_ws_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 . "'");
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') {
            if ( tep_session_is_registered('customer_id') && defined(MODULE_STORE_WHOLESALE_STATUS) && MODULE_STORE_WHOLESALE_STATUS == 'True') { // wholesale attribute price
            if ( $products_options['options_values_ws_price'] != '0') { // apply individual wholesale attribute price
            $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . constant('MODULE_STORE_WHOLESALE_OPT_PRICE_' . strtoupper($language)) . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_ws_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
            } else if (MODULE_STORE_WHOLESALE_GLOBAL_DISCOUNT > '0') { // apply global wholesale price discount
            $products_options_array[sizeof($products_options_array)-1]['text'] .= ' (' . constant('MODULE_STORE_WHOLESALE_OPT_PRICE_' . strtoupper($language)) . $products_options['price_prefix'] . $currencies->display_price($products_options['options_values_price'] - ($products_options['options_values_price'] * MODULE_STORE_WHOLESALE_GLOBAL_DISCOUNT/100), tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
} else { // apply retail attribute price
$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'])) .') ';
}
} else { // apply retail attribute price
$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'])) .') ';
}
}
}
        // wholesale (SPPC Lite) END
 
        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, 'style="width: 200px;"'); ?><br />
<?php
      }
?>
    </p>
 
<?php
    }
?>
 
    <div class="clearfix"></div>
 
<?php
    if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>
 
    <div class="alert alert-info"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></div>
 
<?php
    }
?>
 
  </div>
 
<?php
    $reviews_query = tep_db_query("select count(*) as count, avg(reviews_rating) as avgrating 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);
 
    if ($reviews['count'] > 0) {
      echo '<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/Ag...teRating"><metaitemprop="ratingValue" content="' . $reviews['avgrating'] . '" /><meta itemprop="ratingCount" content="' . $reviews['count'] . '" /></span>';
    }
?>
 
  <div class="buttonSet row">
    <div class="col-xs-6"><?php echo tep_draw_button(IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : ''), 'fa fa-commenting', tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params())); ?></div>
    <div class="col-xs-6 text-right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'fa fa-shopping-cart', null, 'primary', null, 'btn-success'); ?></div>
  </div>
 
  <div class="row">
    <?php echo $oscTemplate->getContent('product_info'); ?>
  </div>
 
<?php
    if ((USE_CACHE == 'true') && empty($SID)) {
      echo tep_cache_also_purchased(3600);
    } else {
      include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
    }
 
    if ($product_info['manufacturers_id'] > 0) {
      $manufacturer_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$product_info['manufacturers_id'] . "'");
      if (tep_db_num_rows($manufacturer_query)) {
        $manufacturer = tep_db_fetch_array($manufacturer_query);
        echo '<span itemprop="manufacturer" itemscope itemtype="http://schema.org/Or...nization"><metaitemprop="name" content="' . tep_output_string($manufacturer['manufacturers_name']) . '" /></span>';
      }
    }
?>
 
</div>
 
</div>
 
</form>
 
<?php
  }
  require(DIR_WS_INCLUDES . 'template_bottom.php');
  require(DIR_WS_INCLUDES . 'application_bottom.php');
?>


#2149   nouveau9

nouveau9
  • Members
  • 9 posts
  • Real Name:Grimaldi

Posted 18 August 2016 - 10:28

Hello,

 

I use QTPro 4.6.1 with oscommerce 2.3.2 and Paypal Standard 1.0.

 

All is right but the stock and mail problems when the client don't wait the return on the site. Known problem...

 

The new Paypal version (4.039) seems to correct this problem when the client don't return on the site : mails + stocks..

 

But not with QTPro !

 

With QTPro :

when the client don't return on the site :

- the 2 mails are sent BUT in the mails the attibuites don't appear.

- the stocks aren't decrement.

 

I tried to correct but I can't obtain good results...

 

A solution ?

 

Thanks.



#2150   LeeFoster

LeeFoster
  • Members
  • 77 posts
  • Real Name:Lee Foster

Posted 10 November 2016 - 19:50

Has anyone managed to integrate this with a responsive version of oscommerce? I am trying to do it in responsive with modular product page installed.



#2151   Lioelx

Lioelx
  • Members
  • 164 posts
  • Real Name:Lionel
  • Gender:Male
  • Location:Spain

Posted 22 November 2016 - 22:41

Hi, i install qtpro 4.6.1 on oscom 2.3.4 gold

When i do click on a product whit 0 stock the categories box disappears, If stock works well-

Any idea?

Regards

 

Attached Files


No external links here, thank you


#2152   Lioelx

Lioelx
  • Members
  • 164 posts
  • Real Name:Lionel
  • Gender:Male
  • Location:Spain

Posted 23 November 2016 - 18:17

Hi, i install qtpro 4.6.1 on oscom 2.3.4 gold

When i do click on a product whit 0 stock the categories box disappears, If stock works well-

Any idea?

Regards

Hello, the error is in catalog / product_info.php
I have 2 buttons, one that says exhausted and another that goes back and clear ... do not follow the instructions of the qtpro.
I have to change this in product_info

<?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();
        $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 . "'");
        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'])) .') ';
          }
        }

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

For this other:

                  <?php
    }
    //++++ QT Pro: End Changed Code
        $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
    ?>

And since I have the buttons mentioned above, the form does not close and there is something that causes the categories box to disappear. If I remove the buttons, I will see the box again. How do I change without removing the buttons?
Product_info current:

    <?php
    /*
      $Id$

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

      Copyright (c) 2010 osCommerce

      Released under the GNU General Public License
       Modified for KISS Image Thumbnailer r19 August 2015 by @raiwa
    */

      require('includes/application_top.php');

      if (!isset($_GET['products_id'])) {
        tep_redirect(tep_href_link('index.php'));
      }
      require('includes/languages/' . $language . '/product_info.php');

      $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)$_GET['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('includes/template_top.php');

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

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

      <div class="pull-right">
        <?php echo tep_draw_button(IMAGE_BUTTON_CONTINUE, 'fa fa-angle-right', tep_href_link('index.php')); ?>
      </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_gtin from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where p.products_status = '1' and p.products_id = '" . (int)$_GET['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)$_GET['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" itemprop="price" content="' . $currencies->display_raw($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
        } else {
          $products_price = '<span itemprop="price" content="' . $currencies->display_raw($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '">' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
        }

        if ($product_info['products_date_available'] > date('d-m-Y H:i:s')) {
          $products_price .= '<link itemprop="availability" href="http://schema.org/PreOrder" />';
        } elseif ((STOCK_CHECK == 'true') && ($product_info['products_quantity'] < 1)) {
          $products_price .= '<link itemprop="availability" href="http://schema.org/OutOfStock" />';
        } else {
          $products_price .= '<link itemprop="availability" href="http://schema.org/InStock" />';
        }

        $products_price .= '<meta itemprop="priceCurrency" content="' . tep_output_string($currency) . '" />';

        $products_name = '<a href="' . tep_href_link('product_info.php', 'products_id=' . $product_info['products_id']) . '" itemprop="url"><span itemprop="name">' . $product_info['products_name'] . '</span></a>';

        if (tep_not_null($product_info['products_model'])) {
          $products_name .= '<br /><small>[<span itemprop="model">' . $product_info['products_model'] . '</span>]</small>';
        }
    ?>

    <?php echo tep_draw_form('cart_quantity', tep_href_link('product_info.php', tep_get_all_get_params(array('action')). 'action=add_product', 'NONSSL'), 'post', 'class="form-horizontal" role="form"'); ?>

    <div itemscope itemtype="http://schema.org/Product">

    <div class="page-header">
      <div class="row"> 
        <h1 class="col-sm-8"><?php echo $products_name; ?></h1>
        <h2 class="col-sm-4 text-right-not-xs" itemprop="offers" itemscope itemtype="http://schema.org/Offer"><?php echo $products_price; ?></h2>
      </div>
    </div>

    <?php
      if ($messageStack->size('product_action') > 0) {
        echo $messageStack->output('product_action');
      }
    ?>

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

    <?php
        if (tep_not_null($product_info['products_image'])) {

          echo tep_image('images/' . $product_info['products_image'], NULL, NULL, NULL, 'itemprop="image" style="display:none;"');

          $photoset_layout = (int)MODULE_HEADER_TAGS_PRODUCT_COLORBOX_LAYOUT;

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

        <div class="piGal pull-right" data-imgcount="<?php echo $photoset_layout; ?>">

    <?php
            $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('images/' . $pi['image'], '', '', '', 'id="piGalImg_' . $pi_counter . '"');
            }
    ?>

        </div>

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

        <div class="piGal pull-right">
          <?php echo tep_image('images/' . $product_info['products_image'], addslashes($product_info['products_name'])); ?>
        </div>

    <?php
          }
        }
    ?>
        <!--<div class="clearfix"></div>-->
    <div itemprop="description">
      <?php echo stripslashes($product_info['products_description']); ?>
    </div>

                  <?php
    }
    //++++ QT Pro: End Changed Code
        $products_attributes_query = tep_db_query("select count(*) as total from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$_GET['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})*$/",$_GET['products_id']) ? $_GET['products_id'] : (int)$_GET['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 class="clearfix"></div>

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

        <div class="alert alert-info"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></div>

    <?php
        }
    ?>

      </div>

    <?php
        $reviews_query = tep_db_query("select count(*) as count, avg(reviews_rating) as avgrating from " . TABLE_REVIEWS . " r, " . TABLE_REVIEWS_DESCRIPTION . " rd where r.products_id = '" . (int)$_GET['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);

        if ($reviews['count'] > 0) {
          echo '<span itemprop="aggregateRating" itemscope itemtype="http://schema.org/AggregateRating"><meta itemprop="ratingValue" content="' . $reviews['avgrating'] . '" /><meta itemprop="ratingCount" content="' . $reviews['count'] . '" /></span>';
        }
    ?>
    <br>
    <!-- Back Back Button Start -->
      <div class="buttonSet row">
        <div class="col-xs-4 text-left"><?php echo tep_draw_button(IMAGE_BUTTON_REVIEWS . (($reviews['count'] > 0) ? ' (' . $reviews['count'] . ')' : ''), 'fa fa-commenting', tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params())); ?></div>
         <div class="col-xs-4 text-center">
        <?php echo tep_draw_button(IMAGE_BUTTON_BACK, 'fa fa-angle-left', tep_href_link('index.php', tep_get_path())); ?>
      </div>
      <?php
        if (($product_info['products_quantity'] <> 0) and ($product_info['products_price'] > 0)) {
    ?>
        <div class="col-xs-4 text-right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_draw_button(IMAGE_BUTTON_IN_CART, 'fa fa-shopping-cart', null, 'primary', null, 'btn-success'); ?></div>
      </div>
      <?php
        } else {
    ?>
        <div class="col-xs-4 text-right"> <button class="btn btn-danger" type="button">Agotado</button></div>
    <?php
        }
    ?>
    <!-- Back Back Button End -->

      <div class="row">
        <?php echo $oscTemplate->getContent('product_info'); ?>
      </div>

    <?php
        if ((USE_CACHE == 'true') && empty($SID)) {
          echo tep_cache_also_purchased(3600);
        } else {
          include('includes/modules/also_purchased_products.php');
        }

        if ($product_info['manufacturers_id'] > 0) {
          $manufacturer_query = tep_db_query("select manufacturers_name from " . TABLE_MANUFACTURERS . " where manufacturers_id = '" . (int)$product_info['manufacturers_id'] . "'");
          if (tep_db_num_rows($manufacturer_query)) {
            $manufacturer = tep_db_fetch_array($manufacturer_query);
            echo '<span itemprop="manufacturer" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="' . tep_output_string($manufacturer['manufacturers_name']) . '" /></span>';
          }
        }
    ?>

    </div>

    </div>

    </form>

    <?php
      require('includes/template_bottom.php');
      require('includes/application_bottom.php');
    ?>

No external links here, thank you


#2153   piernas

piernas
  • Members
  • 466 posts
  • Real Name:Juanma
  • Gender:Male
  • Location:Madrid

Posted 23 November 2016 - 19:48

@Lioelx i tokk a look at the HTML source of your web shop and you have some broken/mixed markup. Seems that you have really a lot of modules and scripts and it's tedious to see where is/are the failures. I'd suggest disabling all modules and enabling one by one to trace the errors.



#2154   LeeFoster

LeeFoster
  • Members
  • 77 posts
  • Real Name:Lee Foster

Posted 15 December 2016 - 18:13

Has anyone integrated this with Kymations modular product page and any of the attribute price changes?



#2155   JohnnyMars

JohnnyMars
  • Members
  • 2 posts
  • Real Name:John Marshall

Posted 20 March 2017 - 17:05

Nevermind - I had a trailing / after the URL in admin/includes/configure.php. This caused the URL of the ADD action to add another /, which caused a new session instance each time the attribute inventory was modified. It all works perfectly now!

If anybody needs help with this addon, let me know.

Rob Wood

Hi Rob,

 

I don;t know if you're still active on this forum but I hope so!  

 

I have just installed the QTPro 4.6.1 contribution and have exactly the same problem as you mentioned here.  However, if I remove trailing /s from the URL's in my admin/configure.php file then other things don't work properly e.g. the display is misarranged or the page isn't found (because there isn't a / where there should be in the address) or the main admin menu disappears altogether.  

 

Can you tell me which URL in your admin/configure.php file was causing you the problem? I realise it is a long time ago now but thought I would try asking anyway!

 

Thank you in advance for any help you can give.

 

Kind Regards,

 

John



#2156   LeeFoster

LeeFoster
  • Members
  • 77 posts
  • Real Name:Lee Foster

Posted 16 April 2017 - 17:12

I have a version of this installed and was wondering if anyone had managed to change single_radioset into multiple_radiosets?