Jump to content
zonetown

[Contribution] QTpro - Quantity Tracking Professional

Recommended Posts

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

 

Where you able to figure it out? I have the same issue

Share this post


Link to post
Share on other sites

hello this is a great contribution but i need what the Sequenced Dropdowns can see the attribute what don't are avaible how i can make it

 

 

 

Thank you

Share this post


Link to post
Share on other sites

are there instructions anywhere to help install QT Pro to a already mod'd oscommerce store? i can do most things myself, but i a) am having trouble doing this without instructions and B) would rather either have instructions or find someone that could set it up that would not mess up the store i built.. so either wondering if there are instructions anywhere or if there is anyone that would install this to my record labels store (nosleepstore.com) for a decent price, i did the store myself completely, just can't get this thing to work.

 

thanks

chris hansen

nosleeprecs.com

Share this post


Link to post
Share on other sites

Is there any "short version" of just what files need to be updated with the 4.60 update , dated May 31, 2009????

 

Fred

www.21st-tees.com


Frederick C Brace,III PA-C

www.21st-tees.com (osc)

www.tanda-designs.com (osc)

Share this post


Link to post
Share on other sites
Is there any "short version" of just what files need to be updated with the 4.60 update , dated May 31, 2009????

 

Fred

www.21st-tees.com

 

I have used a files compare program to compare

the version

QTPro v4.51b by Olof Larsson (26 Oct 2008)

 

with the version

QTPro v4.6 by escri2 (31 May 2009)

 

and found that only one file was added :

catalog/includes/modules/payment/paypal_standard.php

 

so you need only this file to update to the latest v4.6

 

I was not able to find the:

* Small fix: More detailed path to qtpro_functions.php in general.php

 

Stanislav

Share this post


Link to post
Share on other sites

Hello there,

 

Can we use this extension with the OsCommerve version MS1- This version uses a PHP4.

 

So I am confused weather this extension is based PHP4 or PHP5 and can it be used with OsCommerve version MS1?

 

Kindly advice,

 

Thank you in advance.

Share this post


Link to post
Share on other sites

Greetings! :-)

 

Like everyone else, I'm trying to do something specific. I need to continue to use multiple_dropdowns not sequenced drop downs, but I'm having issues with customers forgetting to set their preferences, so they buy whatever is the first item in the list and then return it - doubling my shipping costs.

 

So... I'd like to add the "Please Select Option" tag line to the beginning of the multiple drop down boxes.

 

I was able to hack in a change that mostly works and looks like this:

 

ORIGINAL:
	  $out.='<tr><td align="right" class=main><b>'.$attributes[$o]['oname'].":</b></td><td class=main>".tep_draw_pull_down_menu('id['.$attributes[$o]['oid'].']',array_values($attributes[$o]['ovals']),$attributes[$o]['default'], "onchange=\"stkmsg(this.form);\"")."</td></tr>\n";


CHANGE:
	  $out.='<tr><td align="right" class=main><b>'.$attributes[$o]['oname'].":</b></td><td class=main>".tep_draw_pull_down_menu('id['.$attributes[$o]['oid'].']',array_merge(array(array('id'=>0, 'text'=>'Please Select a '.$attributes[$o]['oname'])), $attributes[$o]['ovals']),$attributes[$o]['default'], "onchange=\"stkmsg(this.form);\"")."</td></tr>\n";

 

Unfortunately, now the default first line creates an Out of Stock message, so that it looks like the entire product is out of stock.

 

 

Here is the full code for the menu creation:

 

string: HTML to display dropdown lists for attributes that stock is tracked for

 

*/
function _draw_stocked_attributes() {
  global $languages_id;

  $out='';

  $attributes = $this->_build_attributes_array(true, false);
  if (sizeof($attributes)>0) {
	for($o=0; $o<sizeof($attributes); $o++) {
	  $s=sizeof($attributes[$o]['ovals']);
	  for ($a=0; $a<$s; $a++) {
		$attribute_stock_query = tep_db_query("select products_stock_quantity from " . TABLE_PRODUCTS_STOCK . " where products_id = '" . (int)$this->products_id . "' AND products_stock_attributes REGEXP '(^|,)" . (int)$attributes[$o]['oid'] . "-" . (int)$attributes[$o]['ovals'][$a]['id'] . "(,|$)' AND products_stock_quantity > 0");
		$out_of_stock=(tep_db_num_rows($attribute_stock_query)==0);
		if ($out_of_stock && ($this->show_out_of_stock == 'True')) {
		  switch ($this->mark_out_of_stock) {
			case 'Left':   $attributes[$o]['ovals'][$a]['text']=TEXT_OUT_OF_STOCK.' - '.$attributes[$o]['ovals'][$a]['text'];
						   break;
			case 'Right':  $attributes[$o]['ovals'][$a]['text'].=' - '.TEXT_OUT_OF_STOCK;
						   break;
		  }
		}
		elseif ($out_of_stock && ($this->show_out_of_stock != 'True')) {
		  unset($attributes[$o]['ovals'][$a]);
		}
	  }
	  $out.='<tr><td align="right" class=main><b>'.$attributes[$o]['oname'].":</b></td><td class=main>".tep_draw_pull_down_menu('id['.$attributes[$o]['oid'].']',array_values($attributes[$o]['ovals']),$attributes[$o]['default'], "onchange=\"stkmsg(this.form);\"")."</td></tr>\n";
	}		
	$out.=$this->_draw_out_of_stock_message_js($attributes);

	return $out;
  }
}

 

So... I think I need to wrap some sort of if statement around that last line.

 

In pseudo code:

if (a product has been selected and not the text line)

$out.=$this->_draw_out_of_stock_message_js($attributes);

 

I could provide the draw_out_of_stock_message_js code if needed. It could probably be done there as well, but this post is already so long...

Share this post


Link to post
Share on other sites

Hi there

Ok i installed one of the newest qtpro packages, the one that has the auto installer.

Anyway like many other people the problem i'm having is that customers can add

any items to there cart even if there out of stock. Only after going to the cart page

to do they figure out the item is out of stock.

Also sequenced dropdowns arent working properly customers can select any colour

and size even if the stock quantity is set to 0.

I am using OScommerce V2.2

I have attatched a screenshot of the options i have selected in the admin panel

 

qtpro.JPG

 

Any help will be greatly appreciated Thanks in advance

Share this post


Link to post
Share on other sites
Hi there

Ok i installed one of the newest qtpro packages, the one that has the auto installer.

Anyway like many other people the problem i'm having is that customers can add

any items to there cart even if there out of stock. Only after going to the cart page

to do they figure out the item is out of stock.

Also sequenced dropdowns arent working properly customers can select any colour

and size even if the stock quantity is set to 0.

I am using OScommerce V2.2

I have attatched a screenshot of the options i have selected in the admin panel

 

qtpro.JPG

 

Any help will be greatly appreciated Thanks in advance

 

Hello,

 

Can you show the site and the problem item?

 

 

 

Stanislav

Edited by Pektsekye

Share this post


Link to post
Share on other sites

bellaful.com

try this product

http://www.bellaful.com/product_info.php?p...brs579ddlqingd5

its set as having like 3 items in stock but you can only find out its out of stock when you add it to your cart

so only about 3 combinations should work such as 34B in red but its showing all options...

 

Log in to the test account:

xstarcrush@gmail.com

rujIE

to add products to the cart to test it out....

Thanks in advance

Nat

Share this post


Link to post
Share on other sites

Hi Found today this add that will help me a lot.

I want, before to install it on the server, to install it on my PC using Xamp

 

Here what after the autoinstaller clik, my screen say :

Warning: domdocument::domdocument() [domdocument.domdocument]: Entity: line 1: parser error : Start tag expected, '<' not found in C:\xampp\htdocs\gvmshop\catalog\qp_autoinstaller\autoinstaller.php on line 22

 

Warning: domdocument::domdocument() [domdocument.domdocument]: 1.0 in C:\xampp\htdocs\gvmshop\catalog\qp_autoinstaller\autoinstaller.php on line 22

 

Warning: domdocument::domdocument() [domdocument.domdocument]: ^ in C:\xampp\htdocs\gvmshop\catalog\qp_autoinstaller\autoinstaller.php on line 22

 

Fatal error: Call to undefined method domdocument::load() in C:\xampp\htdocs\gvmshop\catalog\qp_autoinstaller\autoinstaller.php on line 24

 

Here my server data :

Sistema Operativo: Database: MySQL 5.0.51b-community-nt

Data Server: 14/07/2009 13:50:06 Data Database: 14/07/2009 13:50:06

Server Up Time:

Server HTTP: Apache/2.2.9 (Win32) DAV/2 mod_ssl/2.2.9 OpenSSL/0.9.8h mod_autoindex_color PHP/5.2.6

Versione PHP: 5.2.6 (Zend: 2.2.0)

 

I checked the autoinstaller, but in my small knowlege i can't see nothing strange.

What i can do to use it ?

 

tks in advance for your help

Share this post


Link to post
Share on other sites

ok, i have uploaded it on the server on my website and the autoinstaller run and install all.

 

i have had some doubt when reading the installation manual : i saw that i have to use PHPmyadmin but i understand after that the autoinstaller do it all by himself, right ?

 

But after this, when i click on stock button (and also on qtpro doctor) appears a message error that say :

 

Internal Server Error

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, postmaster@gvmshop.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

 

what happens ???

Edited by gianvi

Share this post


Link to post
Share on other sites
ok, i have uploaded it on the server on my website and the autoinstaller run and install all.

 

i have had some doubt when reading the installation manual : i saw that i have to use PHPmyadmin but i understand after that the autoinstaller do it all by himself, right ?

 

But after this, when i click on stock button (and also on qtpro doctor) appears a message error that say :

 

Internal Server Error

 

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, postmaster@gvmshop.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

 

More information about this error may be available in the server error log.

 

what happens ???

Hello,

 

Some servers requires that all the files have 644 and the directories 755 permissions.

Try to set correct permissions

 

 

Stanislav

Share this post


Link to post
Share on other sites
bellaful.com

try this product

http://www.bellaful.com/product_info.php?p...brs579ddlqingd5

its set as having like 3 items in stock but you can only find out its out of stock when you add it to your cart

so only about 3 combinations should work such as 34B in red but its showing all options...

 

Log in to the test account:

xstarcrush@gmail.com

rujIE

to add products to the cart to test it out....

Thanks in advance

Nat

Hello,

 

Are you sure that you have product_info.php modified?

 

QTpro selects looks different

 

 

show the content of your product_info.php here

 

 

Stanislav

Share this post


Link to post
Share on other sites
Hello,

 

Some servers requires that all the files have 644 and the directories 755 permissions.

Try to set correct permissions

 

 

Stanislav

 

tks for the fast answer but which files you mean ?

all the one of the qp-autoinstall folder or which ones ?

Share this post


Link to post
Share on other sites
tks for the fast answer but which files you mean ?

all the one of the qp-autoinstall folder or which ones ?

 

Hello,

 

If you can find the server log you will see the exact file name that causes the problem.

 

Of course check the files installed by qp-autoinstall first.

 

When I open a directory with my ftp program I see all the files listed and the permissions.

So it's easy to find the file with different permissions than other files have for me.

 

 

Stanislav

Share this post


Link to post
Share on other sites
Hello,

 

If you can find the server log you will see the exact file name that causes the problem.

 

Of course check the files installed by qp-autoinstall first.

 

When I open a directory with my ftp program I see all the files listed and the permissions.

So it's easy to find the file with different permissions than other files have for me.

 

 

Stanislav

 

 

No way to make it working.

I test also to move it from /catalog to/catalog/admin : with QTO in this position, when i launch the auto installer, a page say to me to put 777 permission to 4 directories and other files; i have done it but when i refresh the page ... the same page is displayed and ... nothing else.

Share this post


Link to post
Share on other sites
Hello,

 

Are you sure that you have product_info.php modified?

 

QTpro selects looks different

 

 

show the content of your product_info.php here

 

 

Stanislav

 

I used the auto install so i just uploaded it and ran it...

heres product_info.php

 

<?php
/*
 $Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $

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

 Copyright (c) 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 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);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script language="javascript"><!--
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,le
ft=150')
}
//--></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
<td class="col_left">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</td>
<!-- body_text //-->
<td width="100%" class="col_center"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php
 if ($product_check['total'] < 1) {
?>
  <tr><td>
<? tep_draw_heading_top(); ?>

	<?php echo tep_draw_title_top();?>

				<?php echo TEXT_PRODUCT_NOT_FOUND;?>

	<?php echo tep_draw_title_bottom();?>

<? tep_draw_heading_top_4(); ?>				  



	<!-- 
	<table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		  <td> 
		-->
			<br style="line-height:1px;"><br style="line-height:12px;">

			<table border="0" width="100%" cellspacing="0" cellpadding="2">
			  <tr>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
				<td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
				<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
			  </tr>
			</table>

		<!-- 	
		</td>
	  </tr>
	</table>
	 -->


<? tep_draw_heading_bottom_4(); ?>

<? tep_draw_heading_bottom(); ?>

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

$products_price = '<table class="PriceList" border="0" width="100%" cellspacing="0" cellpadding="0">';
		$new_price = tep_get_products_special_price($product_info['products_id']);
		if ($product_info['products_msrp'] > $product_info['products_price'])
		  $products_price .= '<tr><td>' . TEXT_PRODUCTS_MSRP . '</td><td align=right>' . $currencies->display_price($product_info['products_msrp'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td><td></td></tr>';
		$products_price .= '<tr><td>' . TEXT_PRODUCTS_OUR_PRICE . '</td>';
		$products_price .= '<td align=right>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td><td></td></tr>';
		if ($new_price != '')
		  {$products_price .= '<tr class="productSpecialPrice"><td>' . TEXT_PRODUCTS_SALE . '</td><td align=right>' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td><td></td></tr>';}
		if ($product_info['products_msrp'] > $product_info['products_price'])
		  {if ($new_price != '')
			{$products_price .= '<tr><td>' . TEXT_PRODUCTS_SAVINGS . '</td><td align=right>' . $currencies->display_price(($product_info['products_msrp'] -  $new_price), tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td><td class="SavingsPercent"> ('. number_format(100 - (($new_price / $product_info['products_msrp']) * 100)) . '%)</td></tr>';}
		  else
			{$products_price .= '<tr><td>' . TEXT_PRODUCTS_SAVINGS . '</td><td align=right>' . $currencies->display_price(($product_info['products_msrp'] -  $product_info['products_price']), tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td><td class="SavingsPercent"> ('. number_format(100 - (($product_info['products_price'] / $product_info['products_msrp']) * 100)) . '%)</td></tr>';}}
		else
		  {if ($new_price != '')
			{$products_price .= '<tr><td>' . TEXT_PRODUCTS_SAVINGS . '</td><td align=right>' . $currencies->display_price(($product_info['products_price'] -  $new_price), tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td><td class="SavingsPercent"> ('. number_format(100 - (($new_price / $product_info['products_price']) * 100)) . '%)</td></tr>';}}
		$products_price .= '</table>';


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'];
}
?>
  <tr>
	<td>

<? tep_draw_heading_top(); ?>

<?php echo tep_draw_title_top();?>

		<?php echo $breadcrumb->trail(' » ')?> 

<?php echo tep_draw_title_bottom();?>	


<? tep_draw_heading_top_4(); ?>	
<?   tep_draw_heading_top_2();  ?>		


<?php
if (tep_not_null($product_info['products_image'])) {
//++++ QT Pro: Begin Changed code
?>
	  <table border="0" width="100%" cellspacing="0" cellpadding="2">
		<tr>
		  <td class="smallText">
<?php
//++++ QT Pro: End Changed Code	
?>
											<table cellspacing="0" cellpadding="0" border="0" class="product">
												<tr><td>
														<table cellspacing="0" cellpadding="0" border="0">
															<tr><td height="100%">
	<table cellpadding="0" cellspacing="0" border="0" align="left" class="prod_info">
		<tr><td align="center">

<?php echo tep_draw_prod_pic_top();?>

<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, ' style="margin:0px 0px 0px 0px;"') . ''; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, ' style="margin:0px 0px 0px 0px;"') . ''; ?>
</noscript>

<?php echo tep_draw_prod_pic_bottom();?>

		</td></tr>
		<tr><td align="center">
<script language="javascript"><!--
document.write('<?php echo '<div><a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . TEXT_CLICK_TO_ENLARGE . '</a></div>'; ?>');
//--></script>
<noscript>
<?php echo '<div><a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank"><br style="line-height:7px">' . TEXT_CLICK_TO_ENLARGE . '</a></div>'; ?>

</noscript>
		</td></tr>
	</table>
	<table cellpadding="0" cellspacing="0" border="0" class="title_info">
		<tr><td><em><?php echo $products_name; ?></em></td></tr>
	</table>

<div class="padd3"><?php echo stripslashes($product_info['products_description']); ?>
<?
if (DISPLAY_EXTRA_IMAGES == 'true'){
if ($product_check['total'] >= 1) {
include (DIR_WS_INCLUDES . 'products_extra_images.php');
}
}
?>
<br><br style="line-height:11px"><span class="productSpecialPrice"><?=$products_price?></span></div>																	

															   </td></tr>

														</table>
													</td>
												</tr>
											</table>
<?php
//++++ QT Pro: Begin Changed code
if (tep_not_null($product_info['products_image'])) {
?>
		  </td>
		</tr>
	  </table>
<?php
}
//++++ QT Pro: End Changed Code

}
?>
<?   tep_draw_heading_bottom_2();  ?>
			  <table cellspacing="0" cellpadding="0" border="0" align="center" style="margin:15px 0px 15px 0px; height:1px;">
			   	<tr><td  class="bg_line_x"><?php echo tep_draw_separator('spacer.gif', '1', '1');?></td></tr>
			  </table>		
<? tep_draw_heading_top_2();?>

<?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) {
?>
								<table cellpadding="0" cellspacing="0" class="box_width_cont product">
											<tr><td height="25" colspan="2"><strong><?php echo TEXT_PRODUCT_OPTIONS; ?></strong></td></tr>		 
<?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 (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 echo tep_draw_pull_down_menu('id[' . $products_options_name['products_options_id'] . ']', $products_options_array, $selected_attribute); ?></td>
		</tr>
		<tr><td height="10" colspan="2"></td></tr>
<?php
  }
?>
	  </table>
<?php
}
?>

<?php
$reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
$reviews = tep_db_fetch_array($reviews_query);
if ($reviews['count'] > 0) {
?>
					<table cellpadding="0" cellspacing="0" class="product box_width_cont">
						<tr><td class="line_h"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td></tr>
						<tr><td height="17"></td></tr>
					</table>
<?php
}

if (tep_not_null($product_info['products_url'])) {
?>
					<table cellpadding="0" cellspacing="0" class="product box_width_cont">
						<tr><td class="line_h"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td></tr>
						<tr><td height="17"></td></tr>
					</table>
<?php
}

if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>
					<table cellpadding="0" cellspacing="0" class="product box_width_cont">
						<tr><td class="line_h"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td></tr>
						<tr><td height="17"></td></tr>
					</table>
<?php

?>
					<table cellpadding="0" cellspacing="0" class="product box_width_cont">
						<tr><td class="line_h"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td></tr>
						<tr><td height="17"></td></tr>
					</table>
<?php
}
?>
	<!-- 
	<table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents"><td>
		 -->
		<table border="0" width="100%" cellspacing="0" cellpadding="0" class="product box_width_cont">
		  <tr>
			<td class="main bg_input"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?><?php echo tep_draw_separator('spacer.gif', '15', '1'); ?><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_add_to_cart1.gif', IMAGE_BUTTON_IN_CART); ?></td>
		  </tr>
		</table><br style="line-height:1px;"><br style="line-height:10px;">
		<!-- 
		</td></tr>
	</table>
		 -->
<? tep_draw_heading_bottom_2();?>

<? tep_draw_heading_bottom_4(); ?>


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

	</td>
  </tr>
</table></form></td>
<!-- body_text_eof //-->
<td class="col_right">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //--></body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

Share this post


Link to post
Share on other sites

Hello,

 

Try this code instead:

<?php
/*
 $Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $

 osCommerce, Open Source E-Commerce Solutions
 [url="http://www.oscommerce.com"]http://www.oscommerce.com[/url]

 Copyright © 2003 osCommerce

 Released under the GNU General Public License
*/

 require('includes/application_top.php');

 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);
?>
<!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">
<html <?php echo HTML_PARAMS; ?>>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo CHARSET; ?>">
<title><?php echo TITLE; ?></title>
<base href="<?php echo (($request_type == 'SSL') ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG; ?>">
<link rel="stylesheet" type="text/css" href="stylesheet.css">
<script language="javascript"><!--
function popupWindow(url) {
 window.open(url,'popupWindow','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,res
izable=yes,copyhistory=no,width=100,height=100,screenX=150,screenY=150,top=150,l
e
ft=150')
}
//--></script>
</head>
<body marginwidth="0" marginheight="0" topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0">
<!-- header //-->
<?php require(DIR_WS_INCLUDES . 'header.php'); ?>
<!-- header_eof //-->

<!-- body //-->
<table border="0" width="100%" cellspacing="0" cellpadding="0">
 <tr>
   <td class="col_left">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
   </td>
<!-- body_text //-->
   <td width="100%" class="col_center"><?php echo tep_draw_form('cart_quantity', tep_href_link(FILENAME_PRODUCT_INFO, tep_get_all_get_params(array('action')) . 'action=add_product')); ?><table border="0" width="100%" cellspacing="0" cellpadding="0">
<?php
 if ($product_check['total'] < 1) {
?>
     <tr><td>
<? tep_draw_heading_top(); ?>

       <?php echo tep_draw_title_top();?>

                   <?php echo TEXT_PRODUCT_NOT_FOUND;?>

       <?php echo tep_draw_title_bottom();?>

<? tep_draw_heading_top_4(); ?>                  



       <!--
       <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents">
             <td>
           -->
               <br style="line-height:1px;"><br style="line-height:12px;">

               <table border="0" width="100%" cellspacing="0" cellpadding="2">
                 <tr>
                   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                   <td align="right"><?php echo '<a href="' . tep_href_link(FILENAME_DEFAULT) . '">' . tep_image_button('button_continue.gif', IMAGE_BUTTON_CONTINUE) . '</a>'; ?></td>
                   <td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
                 </tr>
               </table>

           <!--     
           </td>
         </tr>
       </table>
        -->


<? tep_draw_heading_bottom_4(); ?>

<? tep_draw_heading_bottom(); ?>

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

   $products_price = '<table class="PriceList" border="0" width="100%" cellspacing="0" cellpadding="0">';
           $new_price = tep_get_products_special_price($product_info['products_id']);
           if ($product_info['products_msrp'] > $product_info['products_price'])
             $products_price .= '<tr><td>' . TEXT_PRODUCTS_MSRP . '</td><td align=right>' . $currencies->display_price($product_info['products_msrp'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td><td></td></tr>';
           $products_price .= '<tr><td>' . TEXT_PRODUCTS_OUR_PRICE . '</td>';
           $products_price .= '<td align=right>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td><td></td></tr>';
           if ($new_price != '')
             {$products_price .= '<tr class="productSpecialPrice"><td>' . TEXT_PRODUCTS_SALE . '</td><td align=right>' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td><td></td></tr>';}
           if ($product_info['products_msrp'] > $product_info['products_price'])
             {if ($new_price != '')
               {$products_price .= '<tr><td>' . TEXT_PRODUCTS_SAVINGS . '</td><td align=right>' . $currencies->display_price(($product_info['products_msrp'] -  $new_price), tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td><td class="SavingsPercent"> ('. number_format(100 - (($new_price / $product_info['products_msrp']) * 100)) . '%)</td></tr>';}
             else
               {$products_price .= '<tr><td>' . TEXT_PRODUCTS_SAVINGS . '</td><td align=right>' . $currencies->display_price(($product_info['products_msrp'] -  $product_info['products_price']), tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td><td class="SavingsPercent"> ('. number_format(100 - (($product_info['products_price'] / $product_info['products_msrp']) * 100)) . '%)</td></tr>';}}
           else
             {if ($new_price != '')
               {$products_price .= '<tr><td>' . TEXT_PRODUCTS_SAVINGS . '</td><td align=right>' . $currencies->display_price(($product_info['products_price'] -  $new_price), tep_get_tax_rate($product_info['products_tax_class_id'])) . '</td><td class="SavingsPercent"> ('. number_format(100 - (($new_price / $product_info['products_price']) * 100)) . '%)</td></tr>';}}
           $products_price .= '</table>';


   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'];
   }
?>
     <tr>
       <td>

<? tep_draw_heading_top(); ?>

<?php echo tep_draw_title_top();?>

           <?php echo $breadcrumb->trail(' » ')?>

<?php echo tep_draw_title_bottom();?>    


<? tep_draw_heading_top_4(); ?>    
<?   tep_draw_heading_top_2();  ?>        


<?php
   if (tep_not_null($product_info['products_image'])) {
//++++ QT Pro: Begin Changed code
?>
         <table border="0" width="100%" cellspacing="0" cellpadding="2">
           <tr>
             <td class="smallText">
<?php
//++++ QT Pro: End Changed Code    
?>
                                               <table cellspacing="0" cellpadding="0" border="0" class="product">
                                                   <tr><td>
                                                           <table cellspacing="0" cellpadding="0" border="0">
                                                               <tr><td height="100%">
       <table cellpadding="0" cellspacing="0" border="0" align="left" class="prod_info">
           <tr><td align="center">

<?php echo tep_draw_prod_pic_top();?>

<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, ' style="margin:0px 0px 0px 0px;"') . ''; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, ' style="margin:0px 0px 0px 0px;"') . ''; ?>
</noscript>

<?php echo tep_draw_prod_pic_bottom();?>

           </td></tr>
           <tr><td align="center">
<script language="javascript"><!--
document.write('<?php echo '<div><a href="java script:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . TEXT_CLICK_TO_ENLARGE . '</a></div>'; ?>');
//--></script>
<noscript>
<?php echo '<div><a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank"><br style="line-height:7px">' . TEXT_CLICK_TO_ENLARGE . '</a></div>'; ?>

</noscript>
           </td></tr>
       </table>
       <table cellpadding="0" cellspacing="0" border="0" class="title_info">
           <tr><td><em><?php echo $products_name; ?></em></td></tr>
       </table>

<div class="padd3"><?php echo stripslashes($product_info['products_description']); ?>
<?
if (DISPLAY_EXTRA_IMAGES == 'true'){
if ($product_check['total'] >= 1) {
include (DIR_WS_INCLUDES . 'products_extra_images.php');
}
}
?>
<br><br style="line-height:11px"><span class="productSpecialPrice"><?=$products_price?></span></div>                                                                    

                                                                  </td></tr>

                                                           </table>
                                                       </td>
                                                   </tr>
                                               </table>
<?php
//++++ QT Pro: Begin Changed code
   if (tep_not_null($product_info['products_image'])) {
?>
             </td>
           </tr>
         </table>
<?php
}
//++++ QT Pro: End Changed Code

   }
?>
<?   tep_draw_heading_bottom_2();  ?>
                 <table cellspacing="0" cellpadding="0" border="0" align="center" style="margin:15px 0px 15px 0px; height:1px;">
                      <tr><td  class="bg_line_x"><?php echo tep_draw_separator('spacer.gif', '1', '1');?></td></tr>
                 </table>        
<? tep_draw_heading_top_2();?>

<?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) {
//++++ 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
?>

<?php
   $reviews_query = tep_db_query("select count(*) as count from " . TABLE_REVIEWS . " where products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");
   $reviews = tep_db_fetch_array($reviews_query);
   if ($reviews['count'] > 0) {
?>
                       <table cellpadding="0" cellspacing="0" class="product box_width_cont">
                           <tr><td class="line_h"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td></tr>
                           <tr><td height="17"></td></tr>
                       </table>
<?php
   }

   if (tep_not_null($product_info['products_url'])) {
?>
                       <table cellpadding="0" cellspacing="0" class="product box_width_cont">
                           <tr><td class="line_h"><?php echo sprintf(TEXT_MORE_INFORMATION, tep_href_link(FILENAME_REDIRECT, 'action=url&goto=' . urlencode($product_info['products_url']), 'NONSSL', true, false)); ?></td></tr>
                           <tr><td height="17"></td></tr>
                       </table>
<?php
   }

   if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>
                       <table cellpadding="0" cellspacing="0" class="product box_width_cont">
                           <tr><td class="line_h"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td></tr>
                           <tr><td height="17"></td></tr>
                       </table>
<?php

?>
                       <table cellpadding="0" cellspacing="0" class="product box_width_cont">
                           <tr><td class="line_h"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td></tr>
                           <tr><td height="17"></td></tr>
                       </table>
<?php
   }
?>
       <!--
       <table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
         <tr class="infoBoxContents"><td>
            -->
           <table border="0" width="100%" cellspacing="0" cellpadding="0" class="product box_width_cont">
             <tr>
               <td class="main bg_input"><?php echo '<a href="' . tep_href_link(FILENAME_PRODUCT_REVIEWS, tep_get_all_get_params()) . '">' . tep_image_button('button_reviews.gif', IMAGE_BUTTON_REVIEWS) . '</a>'; ?><?php echo tep_draw_separator('spacer.gif', '15', '1'); ?><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_add_to_cart1.gif', IMAGE_BUTTON_IN_CART); ?></td>
             </tr>
           </table><br style="line-height:1px;"><br style="line-height:10px;">
           <!--
           </td></tr>
       </table>
            -->
<? tep_draw_heading_bottom_2();?>

<? tep_draw_heading_bottom_4(); ?>


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

       </td>
     </tr>
   </table></form></td>
<!-- body_text_eof //-->
   <td class="col_right">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
   </td>
 </tr>
</table>
<!-- body_eof //-->

<!-- footer //-->
<?php require(DIR_WS_INCLUDES . 'footer.php'); ?>
<!-- footer_eof //--></body>
</html>
<?php require(DIR_WS_INCLUDES . 'application_bottom.php'); ?>

 

 

Stanislav

Share this post


Link to post
Share on other sites
Hello,

 

Find the server log and you will see what the problem is

 

 

Stanislav

 

here the log of the server :

logserver.jpg

 

I have had to replace

index.php

config.php

otherwise OSCommerce doesn't work

 

Just two question :

1) QTO as to in catalog or catalog/admin or somewhere else ??

2) to make it more simple for anyone, is not possible that you set up an OScommerce version with all this files regulary inserted and tested, also the DBase? You can leave the autoinstall for the ones that have yet the work done, but as example for me and i think a lot of other user that are starting right now with the website, the complete can be really usefull. I would like to help you in some way to do it, if i can ...

 

Tks

Gianvi

Share this post


Link to post
Share on other sites
Hello,

 

Try this code instead:

 

Thanks it works legend =)

One thing though is it possible to remove the table saying what items are in stock?

Cheers

Share this post


Link to post
Share on other sites
Thanks it works legend =)

One thing though is it possible to remove the table saying what items are in stock?

Cheers

 

We installed QTpro a few weeks back on our site, and it's brilliant. Many thumbs up on a superb module!

 

I too am interested in knowing how to remove the stock table from the product listing if possible?

 

Cheers ;)

Share this post


Link to post
Share on other sites

i try another time to install it but no way, i really can't understand what is going wrong.

Someone of you taht has the QTpro running, is able to make a zip file (OS+Database) to download?

No need to have the installer, i need only to repalce the old files with the new one and the empty database too.

 

Many tks if someoane can do it, it will takes 5 minutes and one beer offer by me for the first :rolleyes: :rolleyes:

Share this post


Link to post
Share on other sites

hello,

 

I would like that qtpro is applied to specials.

has t it already made modifications of files for gerer every sales for every option?

 

thanks

 

florian

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

×