Jump to content
zonetown

[Contribution] QTpro - Quantity Tracking Professional

Recommended Posts

Hi all I have been trying to install qt pro 4.51b. I have a site with a few addons already.

 

But the same problem happened when I tried it with a virgin install.

 

I get blank screens in admin when I click the stock button or QT doctor. Any ideas??

 

I think it could be sql as in the install instructions it says "step 1 Install osCommerce and verify it is functioning properly

"step 2 Alter the database tables with the QT Pro new_install.sql script"

 

?? where the hell is that I cant find it anywhere. Im sure I will be proved an idiot :D

Share this post


Link to post
Share on other sites

Does anyone know if QTPro should work fine with Authorize.net Credit Card AIM contribution? It is presenting a problem, when QT Pro is installed and someone pays through Authorize.net, the order details don't come through. Only the customer address, email and credit card is visible in Admin. What they actually bought, price, order total, comes up as $0. This is ONLY an issue when they pay with Authorize.net, if they pay with Paypal the order is fine.

 

Any ideas?

 

 

Thanks guys

Edited by stevrons

Share this post


Link to post
Share on other sites

Hello.. I have been trying to get this to work now.. to no avail.

 

Im using One Page Checkout..

 

But as soon as i hit checkout my site is crashing.. i have 2 different error messages...

 

Warning: array_keys() [function.array-keys]: The first argument should be an array in /x/public_html/includes/functions/general.php on line 115

 

Warning: implode() [function.implode]: Invalid arguments passed in /x/public_html/includes/functions/general.php on line 115

 

 

Line 115: $options_list=implode(",",array_keys($attributes));

Share this post


Link to post
Share on other sites

Hi,

 

Looking at installing this however I need it to work with combinations of attributes mainly size and colour.

 

without the option values showing as combined on the site.

 

 

ie size options colour options select and then you have the qty

 

is this posible and if so which contribution in the list is the best choice?

 

It is obvioulsy easier to have qty for one option?

 

Thanks


Getting better with mods but no programmer am I.

Share this post


Link to post
Share on other sites

Hi,

 

I have installed this mod but having two problems at present.

 

1. Amdin/order editor doesn't remove stock from the new product stock table or vice versa, no surprise as there was no file info to change, I am guessing i need a similar piece of script here as I have in the front end shop which makes it alter the stock in the stock table.

 

2. I am having trouble tring to get the table of stock available to show in the product info file, problem maybe heavily modified site and knowing where to slip in the code.

 

3. Easy populate version 2.76h allows compatability with this mod alledgedly but as far as i can tell it would only work with products with one attribute option and not two (I can ask for help on the easy pop thread but its a cross over issue with this module)

 

I am going to plod on to see if i can work out some of these but please feel free to offer guidance of where I should look.

 

Thanks


Getting better with mods but no programmer am I.

Share this post


Link to post
Share on other sites

HI,

This is a great contribution, works very good. However, I would like to see if people can combine the force attribute select function with QTpro.

For example, if I want to display the out of stock option in the product such as clothing size

Color Red out of stock

Color Blue

Color Yellow

 

when people viewing my product page, the first options shows out of stock, and they will not go any further to look at if there are other option under the option drop down.

so I am thinking about adding the extra drop down call (select an option) before all difference colors. So, what I did is adding the

<code> $field .= '<option value="select"';

$field .= '>select an option</option>'; </code>

under html_output.php function tep_draw_pull_down_menu. so under my product page, it will not show the select an option at first. So, how can I add the java script to force people select an value option when they trying to apply add to cart action.

ken

thank you

Share this post


Link to post
Share on other sites

Hi all, anyone who having this problem and solved between contribution qp_autoinstaller_2.14_4 and separate_price_422?

Appreciate if you can share with me.

 

The dropdown price is fine when a retail customer view my product_info page, but when wholesaler view it the dropdown price still shows the retail price. Only when they add items to the shopping cart and the wholeprice shows in shopping_cart.php

 

untitled.JPG

 

Hope you can share with me how to fix this.

 

Thanks

 

Ariff

 

 

Hi Ariff,

 

I have a sim ilar problem in that the sppc code and option type mod I need integrating into the qtpro.

 

My sppc also works with qtpro everywhere except with trhe product_info.php file which displays the products and the attributes.

 

The code for my sppc and product option type to display properly without qtpr is as follows:-

 

//////////////
         }
// BOF SPPC Hide attributes from customer groups
   $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 . "' and find_in_set('".$customer_group_id."', attributes_hide_from_groups) = 0 ");
   $products_attributes = tep_db_fetch_array($products_attributes_query);
   if ($products_attributes['total'] > 0) {
?>
         <table border="0" cellspacing="0" cellpadding="2">
           <tr>
             <td class="main" colspan="2"><?php echo TEXT_PRODUCT_OPTIONS; ?></td>
           </tr>
<?php
     // BOF Option Type Feature
     //$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_name_query = tep_db_query("select distinct popt.products_options_id, popt.products_options_name, popt.products_options_type, popt.products_options_length, popt.products_options_comment 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)) {
                                     //clr 030714 add case statement to check option type
       switch ($products_options_name['products_options_type']) {
         case PRODUCTS_OPTIONS_TYPE_TEXT:
           //CLR 030714 Add logic for text option
           $products_attribs_query = tep_db_query("select distinct patrib.options_values_price, patrib.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = '" . $products_options_name['products_options_id'] . "'");
                            $products_attribs_array = tep_db_fetch_array($products_attribs_query);
                            if($customer_group_id > 0 ) {
                                     $query = "SELECT options_values_price, price_prefix FROM `products_attributes_groups`
                                               WHERE products_attributes_id='".$products_attribs_array['products_attributes_id']."' AND customers_group_id='".$customer_group_id."'";
                                     $tmp_res = tep_db_query($query);
                                     if(tep_db_num_rows($tmp_res )) {
                                               $products_attribs_array = tep_db_fetch_array($tmp_res);
                                     }
                            }
//            $products_attribs_array = tep_db_fetch_array($products_attribs_query);
           $tmp_html = '<input type="text" name ="id[' . TEXT_PREFIX . $products_options_name['products_options_id'] . ']" size="' . $products_options_name['products_options_length'] .'" maxlength="' . $products_options_name['products_options_length'] . '" value="' . $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']] .'">  ' . $products_options_name['products_options_comment'] ;
           if ($products_attribs_array['options_values_price'] != '0') {
             $tmp_html .= '(' . $products_attribs_array['price_prefix'] . $currencies->display_price($products_attribs_array['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .')';
           }
?>
           <tr>
             <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
             <td class="main"><?php echo $tmp_html;  ?></td>
           </tr>
<?php
           break;
         case PRODUCTS_OPTIONS_TYPE_TEXTAREA:
           //CLR 030714 Add logic for text option
           $products_attribs_query = tep_db_query("select distinct patrib.options_values_price, patrib.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = '" . $products_options_name['products_options_id'] . "'");
           $products_attribs_array = tep_db_fetch_array($products_attribs_query);
                  $tmp_html = '<textarea onKeyDown="textCounter(this,\'progressbar' . $products_options_name['products_options_id'] . '\',' . $products_options_name['products_options_length'] . ')" 
                                                                               onKeyUp="textCounter(this,\'progressbar' . $products_options_name['products_options_id'] . '\',' . $products_options_name['products_options_length'] . ')" 
                                                                               onFocus="textCounter(this,\'progressbar' . $products_options_name['products_options_id'] . '\',' . $products_options_name['products_options_length'] . ')" 
                                                                               wrap="soft" 
                                                                               name="id[' . TEXT_PREFIX . $products_options_name['products_options_id'] . ']" 
                                                                               rows=5 
                                                                               id="id[' . TEXT_PREFIX . $products_options_name['products_options_id'] . ']" 
                                                                               value="' . $cart->contents[$HTTP_GET_VARS['products_id']]['attributes_values'][$products_options_name['products_options_id']] . '"></textarea>
                                                         <div id="progressbar' . $products_options_name['products_options_id'] . '" class="progress"></div>
                                                         <script>textCounter(document.getElementById("id[' . TEXT_PREFIX . $products_options_name['products_options_id'] . ']"),"progressbar' . $products_options_name['products_options_id'] . '",' . $products_options_name['products_options_length'] . ')</script>';?>        <!-- DDB - 041031 - Form Field Progress Bar //-->
           <tr>
<?php
           if ($products_attribs_array['options_values_price'] != '0') {
?>
             <td class="main"><?php echo $products_options_name['products_options_name'] . '<br>(' . $products_options_name['products_options_comment'] . ' ' . $products_attribs_array['price_prefix'] . $currencies->display_price($products_attribs_array['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . ')'; ?></td>
<?php       } else {
?>
             <td class="main"><?php echo $products_options_name['products_options_name'] . '<br>(' . $products_options_name['products_options_comment'] . ')'; ?></td>
<?php        }
?>
             <td class="main"><?php echo $tmp_html;  ?></td>
           </tr>
<?php
           break;
         case PRODUCTS_OPTIONS_TYPE_RADIO:
                  //CLR 030714 Add logic for radio buttons
                  $tmp_html = '<table>';
                  $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.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "' and pa.options_id = '" . $products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . $languages_id . "'");
                  //$checked=true;
                  // START vEDIT
                  if(!isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])){
                            $no_value = true;
                  }
                  // END vEDIT
                  while ($products_options_array = tep_db_fetch_array($products_options_query)) {
                            // START vEDIT
                            if($customer_group_id > 0 ) {
                                     $query = "SELECT options_values_price, price_prefix FROM `products_attributes_groups`
                                               WHERE products_attributes_id='".$products_options_array['products_attributes_id']."' AND customers_group_id='".$customer_group_id."'";
                                     $tmp_res = tep_db_query($query);
                                     if(tep_db_num_rows($tmp_res )) {
                                               $tmp_row = tep_db_fetch_array($tmp_res);
                                               if($tmp_row['options_values_price']) {
                                                         $products_options_array['options_values_price'] = $tmp_row['options_values_price'];
                                                         $products_options_array['price_prefix'] = $tmp_row['price_prefix'];
                                               }
                                     }
                            }        
                            if ($products_options_array['products_options_values_id'] == $cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']] || $no_value) {
                                      $checked = true;
                                     $no_value = false;
                            } else {
                                     $checked = false;
                            }
                            // END vEDIT
                            $tmp_html .= '<tr><td class="main">';
                            $tmp_html .= tep_draw_radio_field('id[' . $products_options_name['products_options_id'] . ']', $products_options_array['products_options_values_id'], $checked);
                            //$checked = false;
                            $tmp_html .= $products_options_array['products_options_values_name'] ;
                            $tmp_html .=$products_options_name['products_options_comment'] ;
                            if ($products_options_array['options_values_price'] != '0') {
                                     $tmp_html .= '(' . $products_options_array['price_prefix'] . $currencies->display_price($products_options_array['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
                            }
                            $tmp_html .= '</tr></td>';
                  }
                  $tmp_html .= '</table>';
                  ?>
                  <tr>
                  <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
                  <td class="main"><?php echo $tmp_html;  ?></td>
                  </tr>
                  <?php
         break;
         case PRODUCTS_OPTIONS_TYPE_CHECKBOX:
                  //CLR 030714 Add logic for checkboxes
                  $products_attribs_query = tep_db_query("select distinct patrib.options_values_id, patrib.options_values_price, patrib.price_prefix, patrib.products_attributes_id from " . TABLE_PRODUCTS_ATTRIBUTES . " patrib where patrib.products_id='" . (int)$HTTP_GET_VARS['products_id'] . "' and patrib.options_id = '" . $products_options_name['products_options_id'] . "'");
                  $products_attribs_array = tep_db_fetch_array($products_attribs_query);
                  if($customer_group_id > 0 ) {
                                     $query = "SELECT options_values_price, price_prefix FROM `products_attributes_groups`
                                               WHERE products_attributes_id='".$products_attributes_array['products_attributes_id']."' AND customers_group_id='".$customer_group_id."'";
                                     $tmp_res = tep_db_query($query);
                                     if(tep_db_num_rows($tmp_res )) {
                                               $tmp_row = tep_db_fetch_array($tmp_res);
                                               if($tmp_row['options_values_price']) {
                                                         $products_attributes_array['options_values_price'] = $tmp_row['options_values_price'];
                                                         $attributes_array['price_prefix'] = $tmp_row['price_prefix'];
                                               }
                                     }
                            }
                  // START vFIX
                  $boxchecked = false;
                  if (isset($cart->contents[$HTTP_GET_VARS['products_id']]['attributes'][$products_options_name['products_options_id']])) {                                                
                            $boxchecked = true;
                  }else {
                            $boxchecked = false;         
                  }
                  // END vFIX 
                  echo '<tr><td class="main">' . $products_options_name['products_options_name'] . ': </td><td class="main">';
                  // START vFIX 
                  //echo tep_draw_checkbox_field('id[' . $products_options_name['products_options_id'] . ']', $products_attribs_array['options_values_id']);
                  echo tep_draw_checkbox_field('id[' . $products_options_name['products_options_id'] . ']', $products_attribs_array['options_values_id'], $boxchecked);
                  // END vFIX 
                  echo $products_options_name['products_options_comment'] ;
                  if ($products_attribs_array['options_values_price'] != '0') {
                  echo '(' . $products_attribs_array['price_prefix'] . $currencies->display_price($products_attribs_array['options_values_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) .') ';
                  }
                  echo '</td></tr>';
         break;
         default:
           //clr 030714 default is select list
           //clr 030714 reset selected_attribute variable
           $selected_attribute = false;
     // EOF Option Type Feature 
       $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, pa.products_attributes_id 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)) {
                            if($customer_group_id > 0 ) {
                                     $query = "SELECT options_values_price, price_prefix FROM `products_attributes_groups`
                                               WHERE products_attributes_id='".$products_options['products_attributes_id']."' AND customers_group_id='".$customer_group_id."'";
                                     $tmp_res = tep_db_query($query);
                                     if(tep_db_num_rows($tmp_res )) {
                                               $tmp_row = tep_db_fetch_array($tmp_res);
                                               if($tmp_row['options_values_price']) {
                                                         $products_options['options_values_price'] = $tmp_row['options_values_price'];
                                                         $products_options['price_prefix'] = $tmp_row['price_prefix'];
                                               }
                                     }
                            }
         $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 (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;
       }
?>
           <tr>
             <td class="main"><?php echo $products_options_name['products_options_name'] . ':'; ?></td>
             <td class="main"><?php 
               // BOF Option Type Feature
               //echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute);
               echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array,   $selected_attribute) . $products_options_name['products_options_comment'];
               // EOF Option Type Feature
               ?></td>
           </tr>
<?php
       // BOF Option Type Feature
       } // ends the switch clause
       // EOF Option Type Feature
     } 
           ?>
/////////////

 

as far as i can tell from the code, the integrations needs code from the pad_* class files but I havent a clue how to go about this.

 

You maybe able to find the sppc code from early mod and integrate the database queries into the qtpro code.

 

If anyone can help either on a free or low cost basis then please get in touch via pm, as this thing isbugging me.

 

I have had the qtpro and the( sppc option type) code above both in the product info file at the same time to see if it gave me any ideas on what to do, but its too complicated for me to get my head round.

 

I had both qtpro arttributes and (sppc option type attributes) displayed in the product_info file.

 

I have this working with my version of one page checkout etc, and I just modified the the files as recommended and no problems whatsoever on that side so maybe the error is in the code you used?

 

Thanks


Getting better with mods but no programmer am I.

Share this post


Link to post
Share on other sites

Okay, so I've combined QT Pro 4.6.1 and Product Attributes Sort Order 1.6 on OSC rc2a. I've made the changes to pad_base.php, and the drop down menu are sorting in the correct order.

 

I would also like the table on product_info.php and the stock.php to be sorted by the sort order I put in. However, I do not know what change on qtpro_stock_table.php or stock.php.

 

I've been searching the forum since Sunday at 4pm. I've read every post in this thread and the product attributes thread. I a newbie with php and mysql. Can someone please help?

Share this post


Link to post
Share on other sites

QTPro looks to have potential, but not working for me.

 

It is not updating the quantities in the products_stock table on checkout properly.

 

If I have a product with 4 attributes and purchase all 4, it might subtract quantity from 3 of the attribute/products, but not the 4th.

Or it might not subtract anything at all.

Or, it might subtract all 4 with no problem.

 

It seems like it is random.

 

Is there something I perhaps missed on installation?

The problem seems to be coming from checkout_process.php -- but not sure why.

 

Thanks.

Share this post


Link to post
Share on other sites

This is a nice tool as many have said. Only one real problem/question.

 

Is there a way to make the stock per attribute (example: a size XL shirt) decrease when one of the products is ordered? If I have set the stock to 10 for Size XL for a particular shirt, is there a way for it to auto-decrement size XL's stock by 1 when someone orders 1 size XL of this shirt?

 

It does decrease the overall stock. I would very much like it to decrease the attribute's stock as well.

 

Thanks,

Colin

 

 

Very nice contribution! Need help with same issue. I see an OUT OF STOCK message for an item with a particular attribute but ordering is allowed. In Configuration, "Check Stock Level" and "Subtract stock" is set to true; "Allow checkout" is set to false. In QT Pro, "Prevent adding stock to cart" is set to true. Has this been solved and if so, can someone direct me to the post(s)?

 

Thanks,

Lisa

Share this post


Link to post
Share on other sites

Very nice contribution! Need help with same issue. I see an OUT OF STOCK message for an item with a particular attribute but ordering is allowed. In Configuration, "Check Stock Level" and "Subtract stock" is set to true; "Allow checkout" is set to false. In QT Pro, "Prevent adding stock to cart" is set to true. Has this been solved and if so, can someone direct me to the post(s)?

 

Thanks,

Lisa

 

Found it; installed QTPro 4.6.1 (SQL bugfix for broken stock levels on multiple-attribute products) available at http://addons.oscommerce.com/info/888

Share this post


Link to post
Share on other sites

Hello, I have problem in instaltion.

 

No access admin/index.php

 

is problem

 

Fatal error: Call to undefined function qtpro_sick_product_count() in /home/osc/public_html/admin/index.php on line 37

 

Cod Origem.:

 

 <?php //++++ QT Pro: Begin added code
$qtpro_sick_count = qtpro_sick_product_count();
if($qtpro_sick_count != 0){
?>
<table border="0" width="100%" cellspacing="0" cellpadding="0"><tr><td class="messageStackWarning"><?php echo 'Warning: There are '. $qtpro_sick_count . ' sick products in the database. Please visit <a href="' . tep_href_link(FILENAME_QTPRODOCTOR) . '" class="headerLink">the QTPro doctor</a>.'; ?></td></tr></table>
<?php
}
//++++ QT Pro: End added code ?>

 

 

Help-me rsrs :) Gracias

Share this post


Link to post
Share on other sites

Can you give quantity to a combination of options?

For example, say you sell t-shirts and there are options for colour and size. For a certain style you may have blue in stock and also large, but no large blue.

Share this post


Link to post
Share on other sites

Hi all, anyone who having this problem and solved between contribution qp_autoinstaller_2.14_4 and separate_price_422?

Appreciate if you can share with me.

 

The dropdown price is fine when a retail customer view my product_info page, but when wholesaler view it the dropdown price still shows the retail price. Only when they add items to the shopping cart and the wholeprice shows in shopping_cart.php

 

untitled.JPG

 

Hope you can share with me how to fix this.

 

Thanks

 

Ariff

 

 

Hello!

I have installed the contribution successfully

however, in my products_info.php page the currently in stock table is not being displayed :(

I have set Display table with stock information to "true" but still the table is not being displayed

please someone guide me why the table having the stock quantity information is not being displayed

here is the link to my store's product_info.php page

http://kiranfashion.co.uk/product_info.php?products_id=32

 

 

Thank you

Share this post


Link to post
Share on other sites

im installed for oscommerce 2.3 addons in the admin is ok, no problem, in the catalog does not accept code product_info.php

change code original

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

to file install:

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

result page not found for my shop, What can be? thanks

Share this post


Link to post
Share on other sites

Hi guys,

 

I'm looking for a demo of QTpro but the demo links from this thread don't work.

 

Is there any WORKING demo for this contribution?

 

Thanks.

Share this post


Link to post
Share on other sites

Hi all,

 

has anyone ever successfully combined the product_info part of QTpro with Option Type features?

 

I have it working to a certain extent, I have added some of the option type code to pad.base and have the text boxes showing on product info, but below I also have drop downs for the same option.

 

Any help much appreciated

 

Dave

Share this post


Link to post
Share on other sites

Anyone installed QTPro 4.6.1 on a 'clean' Osc 2.3.1? I'm getting a syntax error on product_info.php

I also my shop 2.3 error in the product_info.php :(

Edited by deltabiri

Share this post


Link to post
Share on other sites

I also my shop 2.3 error in the product_info.php :(

 

At least I know it's not just me! I'm getting

Parse error: syntax error, unexpected '}' in /share/MD0_DATA/Qweb/ffpants2/product_info.php on line 196
which, yeah, my editor isn't matching the final bracket to anything. If I delete/comment out the end } I get an 'unexpected $end in functions/general.php' (that's not the exact message!) Time to go through with a fine toothed comb...

 

Edit: On comparing the changes to the original product_info.php from 2.3.1 it looks to me like the bracket after the 'else' on line 36 should pair up with the bracket on line 36. If there should be another pair in between then fine but otherwise it looks like it would skip all the stuff like the also-purchased module. So I've commented out the bracket added by QTPro on line 138 *for now* and I'm going to go look at the $end error.

Edited by trogette

Share this post


Link to post
Share on other sites

Hi all,

 

has anyone ever successfully combined the product_info part of QTpro with Option Type features?

 

I have it working to a certain extent, I have added some of the option type code to pad.base and have the text boxes showing on product info, but below I also have drop downs for the same option.

 

Any help much appreciated

 

Dave

 

Would it make more sense to make a fresh pad file for the option type stuff, to select in admin as an attribute display option?

Share this post


Link to post
Share on other sites

previous but one post should read 'the bracket after the 'else' on line 36 should pair up with the bracket on line 196' :rolleyes: That's what I get for jumping back into code after a long break because of a crashed shop!

Share this post


Link to post
Share on other sites

sorry for the thinking-aloud here but anyway! (I'd make less posts if I could edit the existing ones...) The $end was a copy-and-pasting error, apparently, but now it's not subtracting the attribute stock. Time for another read back through the thread...

Share this post


Link to post
Share on other sites

Have tried reading through and searching as much as i can.. but having a problem.

 

Whenever I check the Track Stock and update it it still says "NO" under Track Stock?

 

why is this and how can i work around it?

I get no error message at any stage...

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×