Jump to content
zonetown

[Contribution] QTpro - Quantity Tracking Professional

Recommended Posts

Hi everyone,

 

I have a modified site running perfectly with QT Pro and easy populate. They are both excellent so huge kudos to the people who designed them!

I have over 100 attributes and can modify some of them in easy populate with no problems at all but because the spreadsheet becomes sooooo long (it max's out the columns)I thought I would download attribute manager (1119) to work with....

 

I was hoping you might be able to lead me in the right direction.

 

I installed the attribute manager 4.1 (add on1119)

I have oscommerce v2.2 rc2a

 

Can you tell me if the contribution 1119 is ok to work with QTpro?

Everything is working fine and no hangs but when I click on admin/catalog/*attribute manager

it comes up with a drop down list of my products but when you click edit it goes no further just repeats that screen...

 

Otherwise what is the easy/ quick way to add attributes to a product?

 

Your help would be much appreciated

 

kind regards

marcel

Share this post


Link to post
Share on other sites

qtpro4.5 (for osC2.2 rc2a) with Wishlist 3.5d

 

Struggling to get QtPro add to products with attributes to a wishlist.

 

When I installed qtpro the other day, it went like a dream, though I left out the mods for product-info temporarily. Adding a product with attributes to a wishlist worked.

 

I then inserted the qtpro product-info mods and adding a product with attributes to a wishlist no longer works. (just the product gets added)

 

I guess this may be the wrong forum for this question, but I've been studying the code all day to find what's missing and am starting to doubt my sanity!

 

Anyone solved this problem?

Share this post


Link to post
Share on other sites

I'm just about to launch my shop and went to update the stock - I now get this error from the stock button when adding stock for attributes:

 

1136 - Column count doesn't match value count at row 1

 

insert into products_stock values (0,57,'1-2',10)

 

[TEP STOP]

 

 

If anyone has any suggestions, please, please, please let me know!

 

Thanks

Share this post


Link to post
Share on other sites
I'm just about to launch my shop and went to update the stock - I now get this error from the stock button when adding stock for attributes:

 

1136 - Column count doesn't match value count at row 1

 

insert into products_stock values (0,57,'1-2',10)

 

[TEP STOP]

 

 

If anyone has any suggestions, please, please, please let me know!

 

Thanks

 

 

 

Does your table in the database exist?

 

DROP TABLE IF EXISTS products_stock;

 

CREATE TABLE products_stock (

 

products_stock_id int(11) not null auto_increment,

 

products_id int(11) default '0' not null ,

 

products_stock_attributes varchar(255) not null,

 

products_stock_quantity int(11) default '0' not null ,

 

PRIMARY KEY (products_stock_id),

 

UNIQUE idx_products_stock_attributes (products_id,products_stock_attributes)

 

);

 

Share this post


Link to post
Share on other sites
Does your table in the database exist?

 

DROP TABLE IF EXISTS products_stock;

 

CREATE TABLE products_stock (

 

products_stock_id int(11) not null auto_increment,

 

products_id int(11) default '0' not null ,

 

products_stock_attributes varchar(255) not null,

 

products_stock_quantity int(11) default '0' not null ,

 

PRIMARY KEY (products_stock_id),

 

UNIQUE idx_products_stock_attributes (products_id,products_stock_attributes)

 

);

 

 

 

A million thank you's that sorted the problem

Share this post


Link to post
Share on other sites

I am still trying to figure out how to show the box that shows my 4 options with stock quantity on the Product Info Page. I really need this to work. Thanks, Amy

Edited by amystephenson

Share this post


Link to post
Share on other sites

I am also still trying to figure out how to get the JavaScript Out of Stock message to display UTF-8 (Unicode) text.

 

When visitors see the French version of a store I've built, the special characters aren't showing up, rather, they show up like this:

 

Article momentanément en rupture de stock. Veuillez modifier vos options.
The JavaScript isn't able to handle the HTML equivalents of the special characters.

Share this post


Link to post
Share on other sites
I am still trying to figure out how to show the box that shows my 4 options with stock quantity on the Product Info Page. I really need this to work. Thanks, Amy

 

Did you make these changes between these tags in your product_info.php page?

//++++ QT Pro: Begin Changed code

//++++ QT Pro: End Changed Code

 

 

<?php
/*
  QT Pro Version 4.1 modifications

  Copyright (c) 2004, 2005 Ralph Day
  Released under the GNU General Public License

  Based on prior works released under the GNU General Public License:
	QT Pro prior versions
	  Ralph Day, October 2004
	  Tom Wojcik aka TomThumb 2004/07/03 based on work by Michael Coffman aka coffman
	  FREEZEHELL - 08/11/2003 <A href="mailto:freezehell@hotmail.com">freezehell@hotmail.com</A> Copyright (c) 2003 IBWO
	  Joseph Shain, January 2003
	osCommerce MS2
	  Copyright (c) 2003 osCommerce

  Modifications made:
	11/2004 - Remove product attribute display code and replace with module call
			  Add HTML table around product description and image to clean up display
			  of product attributes when description is short
	03/2005 - Fix problem where product image slides left up against the description

********************************************************************************
***********</P> <P>  $Id: product_info.php,v 1.97 2003/07/01 14:34:54 hpdl Exp $</P> <P>  osCommerce, Open Source E-Commerce Solutions
 <A href="http://www.oscommerce.com">http://www.oscommerce.com</A></P> <P>  Copyright (c) 2003 osCommerce</P> <P>  Released under the GNU General Public License
*/</P> <P>  require('includes/application_top.php');</P> <P>  require(DIR_WS_LANGUAGES . $language . '/' . FILENAME_PRODUCT_INFO);</P> <P>  $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 //--></P> <P><!-- body //-->
<table border="0" width="100%" cellspacing="3" cellpadding="3">
 <tr>
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- left_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_left.php'); ?>
<!-- left_navigation_eof //-->
</table></td>
<!-- body_text //-->
<td width="100%" valign="top"><?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><?php new infoBox(array(array('text' => TEXT_PRODUCT_NOT_FOUND))); ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><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></td>
  </tr>
<?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);</P> <P>	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 . "'");</P> <P>	if ($new_price = tep_get_products_special_price($product_info['products_id'])) {
  $products_price = '<s>' . $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id'])) . '</s> <span class="productSpecialPrice">' . $currencies->display_price($new_price, tep_get_tax_rate($product_info['products_tax_class_id'])) . '</span>';
} else {
  $products_price = $currencies->display_price($product_info['products_price'], tep_get_tax_rate($product_info['products_tax_class_id']));
}</P> <P>	if (tep_not_null($product_info['products_model'])) {
  $products_name = $product_info['products_name'] . '
<span class="smallText">[' . $product_info['products_model'] . ']</span>';
} else {
  $products_name = $product_info['products_name'];
}
?>
  <tr>
	<td><table border="0" width="100%" cellspacing="0" cellpadding="0">
	  <tr>
		<td class="pageHeading" valign="top"><?php echo $products_name; ?></td>
		<td class="pageHeading" align="right" valign="top"><?php echo $products_price; ?></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td class="main">
<?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 border="0" cellspacing="0" cellpadding="2" align="right">
		<tr>
		  <td align="center" class="smallText">
<script language="javascript"><!--
document.write('<?php echo '<a href="java script:popupWindow(<A>\\\''</A> . 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, 'hspace="5" vspace="5"') . '
' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></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, 'hspace="5" vspace="5"') . '
' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
		  </td>
		</tr>
	  </table>
<?php
}
?>
	  <p><?php echo stripslashes($product_info['products_description']); ?></p>
<?php
//++++ QT Pro: Begin Changed code
?>
		  </td>
		</tr>
	  </table>
<?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();
//++++ QT Pro: End Changed Code
}
?>
	</td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?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) {
?>
  <tr>
	<td class="main"><?php echo TEXT_CURRENT_REVIEWS . ' ' . $reviews['count']; ?></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
}</P> <P>	if (tep_not_null($product_info['products_url'])) {
?>
  <tr>
	<td class="main"><?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><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
<?php
}</P> <P>	if ($product_info['products_date_available'] > date('Y-m-d H:i:s')) {
?>
  <tr>
	<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_AVAILABLE, tep_date_long($product_info['products_date_available'])); ?></td>
  </tr>
<?php
} else {
?>
  <tr>
	<td align="center" class="smallText"><?php echo sprintf(TEXT_DATE_ADDED, tep_date_long($product_info['products_date_added'])); ?></td>
  </tr>
<?php
}
?>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td><table border="0" width="100%" cellspacing="1" cellpadding="2" class="infoBox">
	  <tr class="infoBoxContents">
		<td><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 class="main"><?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>'; ?></td>
			<td class="main" align="right"><?php echo tep_draw_hidden_field('products_id', $product_info['products_id']) . tep_image_submit('button_in_cart.gif', IMAGE_BUTTON_IN_CART); ?></td>
			<td width="10"><?php echo tep_draw_separator('pixel_trans.gif', '10', '1'); ?></td>
		  </tr>
		</table></td>
	  </tr>
	</table></td>
  </tr>
  <tr>
	<td><?php echo tep_draw_separator('pixel_trans.gif', '100%', '10'); ?></td>
  </tr>
  <tr>
	<td>
<?php
if ((USE_CACHE == 'true') && empty($SID)) {
  echo tep_cache_also_purchased(3600);
} else {
  include(DIR_WS_MODULES . FILENAME_ALSO_PURCHASED_PRODUCTS);
}
 }
?>
	</td>
  </tr>
</table></form></td>
<!-- body_text_eof //-->
<td width="<?php echo BOX_WIDTH; ?>" valign="top"><table border="0" width="<?php echo BOX_WIDTH; ?>" cellspacing="0" cellpadding="2">
<!-- right_navigation //-->
<?php require(DIR_WS_INCLUDES . 'column_right.php'); ?>
<!-- right_navigation_eof //-->
</table></td>
 </tr>
</table>
<!-- body_eof //--></P> <P><!-- 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

I have all of that code. In looking at the code I noticed this line....

 

//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;

 

Where do I change the PRODINFO_ATTRIBUTE_DISPLAY_STOCK_LIST == TRUE??

Share this post


Link to post
Share on other sites
I have all of that code. In looking at the code I noticed this line....

 

//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;

 

Where do I change the PRODINFO_ATTRIBUTE_DISPLAY_STOCK_LIST == TRUE??

 

 

admin/configuration/stock to true

Share this post


Link to post
Share on other sites
admin/configuration/stock to true

 

 

These are my settings

 

Configuration/Stock

Check stock level = true

Subtract stock = true

Allow Checkout = false

Mark product out of stock ***

Stock Re-order level 5

 

Configuration/Product Information

Product Info Attribute Display Plugin = multiple_dropdowns

Show Out of Stock Attributes = True

Mark Out of Stock Attributes = Right

Display Out of Stock Message Line = True

Prevent Adding Out of Stock to Cart = True

Share this post


Link to post
Share on other sites
These are my settings

 

Configuration/Stock

Check stock level = true

Subtract stock = true

Allow Checkout = false

Mark product out of stock ***

Stock Re-order level 5

 

Configuration/Product Information

Product Info Attribute Display Plugin = multiple_dropdowns

Show Out of Stock Attributes = True

Mark Out of Stock Attributes = Right

Display Out of Stock Message Line = True

Prevent Adding Out of Stock to Cart = True

 

 

don't want to sould stupid but to get to the bottom of your problem you will have to start with the basics

 

Have you set-up attributes for your stock?

then did you add the qty for each attribute in the stock page in admin?

Share this post


Link to post
Share on other sites

My settings are the same and yes I have set up attributes for stock and added qty ofr each attribute in the stock page.

 

don't want to sould stupid but to get to the bottom of your problem you will have to start with the basics

 

Have you set-up attributes for your stock?

then did you add the qty for each attribute in the stock page in admin?

Share this post


Link to post
Share on other sites
My settings are the same and yes I have set up attributes for stock and added qty ofr each attribute in the stock page.

 

 

OK now set the qty to 1 then do a test purchase for that product then see the results in stock.php

Share this post


Link to post
Share on other sites

I'll pay someone $25 if they can solve the JavaScript issue I posted about where the oosmsg comes out as-is rather than displaying the HTML.

 

For instance, I want it to be able to properly display characters like ´ rather than é

Share this post


Link to post
Share on other sites
I'll pay someone $25 if they can solve the JavaScript issue I posted about where the oosmsg comes out as-is rather than displaying the HTML.

 

For instance, I want it to be able to properly display characters like ´ rather than é

 

 

Hi Peter,

 

I would have to duplicate your issue to understand how to go about a fix

pm me your language file from catalog and admin (just the language you have the issue with)

Share this post


Link to post
Share on other sites

Stock is at 0.

 

Did it again on another attribute in the same product and stock went to -1.

 

OK now set the qty to 1 then do a test purchase for that product then see the results in stock.php

Share this post


Link to post
Share on other sites
Stock is at 0.

 

Did it again on another attribute in the same product and stock went to -1.

 

 

ok first things first

you went one step too far too soon

empty your database table for stock then start again and update the stock qty in stock.php but this time when your stock goes to 0 check to see that your out of stock message is seen in the dropdown options in product_info page

Share this post


Link to post
Share on other sites

Yes - the out of stock is there.

 

ok first things first

you went one step too far too soon

empty your database table for stock then start again and update the stock qty in stock.php but this time when your stock goes to 0 check to see that your out of stock message is seen in the dropdown options in product_info page

Share this post


Link to post
Share on other sites
I am still trying to figure out how to show the box that shows my 4 options with stock quantity on the Product Info Page. I really need this to work. Thanks, Amy

 

 

does this mean your "options with stock quantity on the Product Info Page" is solved?

Share this post


Link to post
Share on other sites

No - I still do not have this box showing up! Is it because I only have one option group? new_in_4.4.png

 

does this mean your "options with stock quantity on the Product Info Page" is solved?

Share this post


Link to post
Share on other sites
No - I still do not have this box showing up! Is it because I only have one option group? new_in_4.4.png

 

 

I have never seen this Qurrently in Stock table and it is not produced by qtpro?

goto admin > Configuration > Product Information > Product Info Attribute Display Plugin and change the dropdown and see each result in your product_info page you will see the options from qtpro.

Share this post


Link to post
Share on other sites

Hello Andrew :)

This "Currently on Stock" table is one of the things i created in the newest releases of qtpro. If you have not updated to the last version yet please do so and tell me what you think of it ^^

 

I have never seen this Qurrently in Stock table and it is not produced by qtpro?

goto admin > Configuration > Product Information > Product Info Attribute Display Plugin and change the dropdown and see each result in your product_info page you will see the options from qtpro.

Share this post


Link to post
Share on other sites

So again. Any idea why its not showing up? Thanks, Amy

Hello Andrew :)

This "Currently on Stock" table is one of the things i created in the newest releases of qtpro. If you have not updated to the last version yet please do so and tell me what you think of it ^^

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

×