Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] QTpro - Quantity Tracking Professional


zonetown

Recommended Posts

Also in response to "thebigyeti":

You probably have register globals turned off. Go to catalog/admin/stock.php and put this at the top, right below "require('includes/application_top.php');" :

 

link_get_variable('product_id');

 

That fixed it for me.

 

 

 

I have the same problem! :'( . Do someone have an answer about this problem. I am using PHP 5 Mysql 5 and Registry Gobals off.

Link to comment
Share on other sites

I have a querk in QtPro w/ pad_multiple_dropdowns.php....

 

"Out of Stock" in dropdown doesn't display if options and quantity criss-crossed like this:

Blue Medium 0

Blue Large 5

Black Medium 5

Black Large 0

 

How do you fix this?

Link to comment
Share on other sites

I installed QT Pro v4.3 for OSC v2.2 RC1.

 

When I click on stock reports in admin i get the following error

Stock Report Friday 04 January, 2008

1146 - Table 'wilde5_jan0408.products_stock' doesn't exist

 

SELECT products_stock_attributes, products_stock_quantity FROM products_stock WHERE products_id=149 ORDER BY products_stock_attributes

 

[TEP STOP]

 

Also, under my stock reports in admin I have BOX_REPORTS_STOCK_LEVEL

 

when clicked on I get

 

"Not Found

 

The requested URL /catalog/admin/FILENAME_STATS_LOW_STOCK was not found on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

is this because I already added all the products before adding this mod? If this is the case how can i add this to my setup without a clean install? I spent so much time adding all the products, is there any way i can do this?

 

I have this same problem but besides that everything is working perfectly. Looked at the reports.php and it looks like the code causing that could be deleted but I have hesitated and I am here seeing who else had this oddity. Please shoot mw an email if you figure it out. Thanks.

Link to comment
Share on other sites

This is perplexing me too! And where does the stock button come in haha

 

this is how im looking at it minus the messed up Stock Report i fixed

reporterror.jpg

 

You did not update the file filename.php. Update it and it should fix your problem. At least half of it.

Link to comment
Share on other sites

Look at my code that you quoted - the fix is right there - I think you may have overlooked it.

 

 

The problem is that your bugfix didnt work. It cant find the function link_get_variable(). Have I done something wrong? After some debugging I found out that the session drops in categories.php at row 405. Why I dont know but it has to be something with the globals.

 

//Erik

Link to comment
Share on other sites

I have this installed on my pc. When I hit the update button on stock.php, I get this:

Forbidden

You don't have permission to access /xxxxx.xxxx/admin/< on this server.

 

It is not file permissions.

 

Any ideas?

Link to comment
Share on other sites

The problem is that your bugfix didnt work. It cant find the function link_get_variable(). Have I done something wrong? After some debugging I found out that the session drops in categories.php at row 405. Why I dont know but it has to be something with the globals.

 

//Erik

 

 

Ah, I see. Did you install the register_globals contribution?

Link to comment
Share on other sites

Hi All

 

QT PRO is installed and working well but doesn't do what I need it to "I think."

 

I am modding a site that sells bikinis and I want shoopers to have the option of buying different size tops and bottoms. I also want to be able to track the quantities of how many tops and bottoms I have of each size. Can I configure QT Pro to do this?

 

I have tried a few work-arounds but none of them provide a practical solution to this pretty basic problem. Any ideas on configing this to work?

 

What do you think. I will bewatching post, thanks!

Edited by cheeseandrice
Link to comment
Share on other sites

There are other ways like... Master Products contribution makes one master item & slaves under it, so you could have a top with all the bottoms listed under it or vise-versa kinda. But this is what I suggest you can get a related products contrib where you can link any different top, bottom, accessories to any product. (But when you have a top & bottom pair, it will be difficult to seperate them for a customer to add a different bottom, comprende? You'll need somekind of attribute option that says Subtract -> 1. Bottom -$25 2. Top -$25, and then they'll add the related product for +25)

 

QTpro just tracks attribute's quantity HOLD ONTO IT! You'll need if for different sizes.

Edited by tecno
Link to comment
Share on other sites

There are other ways like... Master Products contribution makes one master item & slaves under it, so you could have a top with all the bottoms listed under it or vise-versa kinda. But this is what I suggest you can get a related products contrib where you can link any different top, bottom, accessories to any product. (But when you have a top & bottom pair, it will be difficult to seperate them for a customer to add a different bottom, comprende? You'll need somekind of attribute option that says Subtract -> 1. Bottom -$25 2. Top -$25, and then they'll add the related product for +25)

 

QTpro just tracks attribute's quantity HOLD ONTO IT! You'll need if for different sizes.

 

Thanks Tecno, that is an interesting work-around, though as I understand it, I am not sure it solves my problem . That Master Product contribution is on my list to install but I think ideally I would like to force the customer to buy a set. The customers sees one picture of a model wearing a Bikini Top and Bottom together as a 'styled look' and they have to buy a Top and Bottom that are paired together, they can't choose other bottoms. I just want them to be able to choose the size of the Top and Bottom separately. So they may have large breasts and a small rear, problem solved, they order a TOP: XL and a BOTTOM: XS. And I want to track my inventory without having to make 2 separate product listings.

 

Any suggestions?

Link to comment
Share on other sites

It is still possible to place an order with sequenced attributes when the stock is 0. For example:

 

Jeans A

- waist: 30

- length: 32

 

Jeans A

- waist: 30

- lenght: 34

 

In the above example it is still posible to order both sizes, even when the jeans with waist 30 and length 34 is out of stock; stock in product editor is 0

 

The settings of Stock are:

 

Stock

Titel Waarde

Check stock level true

Subtract stock true

Allow Checkout false

Mark product out of stock ***

Stock Re-order level 2

 

 

Product Information

Titel Waarde Action

Product Info Attribute Display Plugin sequenced_dropdowns

Show Out of Stock Attributes False

Mark Out of Stock Attributes Right

Display Out of Stock Message Line True

Prevent Adding Out of Stock to Cart True

 

I am working with STS and have QTpro integrated with it.

 

Does anybody knows how i can fix this problem? When stock is 0, it is nog possible to select these attributes?

Link to comment
Share on other sites

It is still possible to place an order with sequenced attributes when the stock is 0. For example:

 

Jeans A

- waist: 30

- length: 32

 

Jeans A

- waist: 30

- lenght: 34

 

In the above example it is still posible to order both sizes, even when the jeans with waist 30 and length 34 is out of stock; stock in product editor is 0

 

The settings of Stock are:

 

Stock

Titel Waarde

Check stock level true

Subtract stock true

Allow Checkout false

Mark product out of stock ***

Stock Re-order level 2

Product Information

Titel Waarde Action

Product Info Attribute Display Plugin sequenced_dropdowns

Show Out of Stock Attributes False

Mark Out of Stock Attributes Right

Display Out of Stock Message Line True

Prevent Adding Out of Stock to Cart True

 

I am working with STS and have QTpro integrated with it.

 

Does anybody knows how i can fix this problem? When stock is 0, it is nog possible to select these attributes?

Maybe, the above is not very clear, what i am trying to say is that considering the above settings, it is still possible to select attributes which have a stock level of zero 0..

Link to comment
Share on other sites

I've found out myself on how to cover the first issue that I was asking about in my previous post:

 

-. The option to also display a message when an item+options+values is in stock (instead of only displaying a message saying that it is out of stock). My best guess is that I'd have to add a function in the pad_* classes similar to the "function _draw_out_of_stock_message_js" (but most likely a lot less code than that function). I do my best to figure out some PHP stuff (not realy a programmers background...) but this class writing is way above my head :huh: Can some-one give me some pointers?

 

Figured out it's not that hard at all, but for those that want to use this option as well, here's what you need to do in order to get this working in the multiple dropdows display version:

 

in /catalog/includes/classes/pad_multiple_dropdowns.php on lines 156-158 replace:

 

          $out.="      span.appendChild(document.createTextNode(\"".TEXT_OUT_OF_STOCK_MESSAGE."\"));\n";
         $out.="    else\n";
         $out.="      span.appendChild(document.createTextNode(\" \"));\n";

 

by:

 

          $out.="      span.appendChild(document.createTextNode(\"".TEXT_OUT_OF_STOCK_MESSAGE."\"));\n";
         $out.="    else\n";
         $out.="      span.appendChild(document.createTextNode(\"".TEXT_IN_STOCK_MESSAGE."\"));\n";

 

I guess this should also be possible for the other pad_ variants.

 

Next, in your /catalog/includes/languages/english/product_info.php (and all other language versions of this file) add after:

 

define('TEXT_OUT_OF_STOCK_MESSAGE', 'The combination of options you have selected is currently out of stock.  Please select another combination.');

 

The following line:

 

define('TEXT_IN_STOCK_MESSAGE', 'The combination of options you have selected is currently in stock.');

 

That should do the trick if I'm correct (please original contributors, correct me if I'm wrong).

 

I'm still working on the other issue, where I'm trying to output per manufacturer (expected) delivery times in the TEXT_OUT_OF_STOCK_MESSAGE, but that's a bit more dificult :)

Link to comment
Share on other sites

Ah, I see. Did you install the register_globals contribution?

 

I dont use the register_globals contribution . I am using the RC1 version instead and it seems to be some incompatible code in QTpro for that version. I have also done a diff between RC1 and ms2.2 and found some code that differs. You dont need a contribution for register globals together with RC1, its built in. I havent got any api for QTpro and its the first time I installed that contribution. I have also installed QTPro in a clean shop and got the same problem so it cant be a compabillity problem with other contributions a had installed.

 

Code for debug

change /catalog/admin/include/classes/object_info.php to

 

 

<?php

class objectInfo {

 

// class constructor

function objectinfo($object_array) {

if (!is_array($object_array) &&!is_object($object_array)) {

echo "*** ERRor FOUND ***";

var_dump($object_array);

debug_print_backtrace();

die();

}

reset($object_array);

while (list($key, $value) = each($object_array)) {

$this->$key = tep_db_prepare_input($value);

}

}

 

 

}

?>

 

The result in my case is *** ERRor FOUND ***bool(false) #0 objectInfo->objectinfo() called at [C:\Apache\htdocs\catalog\admin\categories.php:406]

 

//Erik

Link to comment
Share on other sites

I set up QT Pro and can use all the functions except seemingly the most important --> Adding stock to attributes. I can get to the page to enter the quantity for the attributes but when I click "Add" after I enter my quantity, it sends me to https://www.minervasportswear.com/ihsa/stor...&action=Add and says the page cannot be found.

 

Any ideas what is going on?

Link to comment
Share on other sites

Has anyone figured out how to make the options appear in the correct order in sequenced dropdowns? My options, in order entered and order desired, are Size, Paper, Quantity. When I add stock, they appear in that order. But, when the dropdowns appear, they are in alphabetical order.

Edited by baalwww
Link to comment
Share on other sites

I have this installed on my pc. When I hit the update button on stock.php, I get this:

Forbidden

You don't have permission to access /xxxxx.xxxx/admin/< on this server.

 

It is not file permissions.

 

Any ideas?

Since it did not work, I have deleted this contribution. It appears as though the authors no longer support it.

Link to comment
Share on other sites

Hi

How can I remove a combination of attributes on a product?

Even if I delete a product and add it again it keeps (remember) old attributes combinations.

 

I hope you know what I meen.

 

Johnni

Link to comment
Share on other sites

Hello,

 

I have installed the contribe QTPRO, I have this parameters in the options of "Product Information":

 

- Product Info Attribute Display Plugin = sequenced_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 = False

 

I have insert some attribs with options for one product, and when I try in the catalog, I have 2 options available.

 

When I select the option in the first box, the second box is empty. Even though I have some products in stock with this combination of options.

 

I hope you could help me because on the French forum, nobody knows!!!!

 

Thank you.

 

Guillaume.

Link to comment
Share on other sites

I don't know whether to try this or Master Slave.

 

If I have to keep stock at color/size level then I know with Master Slave I can create a Master for the product, have slaves be the color and then have an attribute which is the size.

 

With this one, can I just have a stndard product and somehow manage the color/size/stock combination with this?

Link to comment
Share on other sites

  • 2 weeks later...

Hello!

 

I have installed this contribution 4.3.

 

i have done everything the way i should but when i put the quantaty in for each size (32,34,36,38,40)

 

when i have 34 = 0 it doesnot say that it is out of stock in the dropdown? is there som stupid misstake im doing or why is it playing whit me?

 

Product Info Attribute Display Plugin multiple_dropdowns

Show Out of Stock Attributes True

Mark Out of Stock Attributes Left

Display Out of Stock Message Line True

Prevent Adding Out of Stock to Cart True

 

 

Check stock level true

Subtract stock true

Allow Checkout false

 

 

anyone have any idea?

 

i would be grateful

 

Jakob from Finland

Link to comment
Share on other sites

  • 3 weeks later...

Has anyone implemented QT Pro with Quanity Price Breaks per product? I am running into a problem AS I'm going through the code changes of catalog/includes/functions/general.php.

 

The problem lies in the following code, as it wants you to find:

 

// Return a product's stock
// TABLES: products
 function tep_get_products_stock($products_id) {
$products_id = tep_get_prid($products_id);
$stock_query = tep_db_query("select products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
$stock_values = tep_db_fetch_array($stock_query);

return $stock_values['products_quantity'];
 }

 

And replace it with:

 

// Return a product's stock
// TABLES: products
// adapted to take advantage of $pfs (instance of PriceFormatterStore)
 function tep_get_products_stock($products_id) {
	global $pfs;
	$stock = false;
	if (is_object($pfs)) {
		$stock = $pfs->getStock($products_id); 
	}
	if ($stock !== false) {
		return $stock;
	} else {
$products_id = tep_get_prid($products_id);
$stock_query = tep_db_query("select products_quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
$stock_values = tep_db_fetch_array($stock_query);
return $stock_values['products_quantity'];
	} // end if/else $stock !== false
 }

 

My problem is that QTPro 4.3 has the following code:

 

function tep_get_products_stock($products_id, $attributes=array()) {
global $languages_id;
$products_id = tep_get_prid($products_id);
if (sizeof($attributes)>0) {
  $all_nonstocked = true;
  $attr_list='';
  $options_list=implode(",",array_keys($attributes));
  $track_stock_query=tep_db_query("select products_options_id, products_options_track_stock from " . TABLE_PRODUCTS_OPTIONS . " where products_options_id in ($options_list) and language_id= '" . (int)$languages_id . "order by products_options_id'");
  while($track_stock_array=tep_db_fetch_array($track_stock_query)) {
	if ($track_stock_array['products_options_track_stock']) {
	  $attr_list.=$track_stock_array['products_options_id'] . '-' . $attributes[$track_stock_array['products_options_id']] . ',';
	  $all_nonstocked=false;
	}
  }
  $attr_list=substr($attr_list,0,strlen($attr_list)-1);
}

if ((sizeof($attributes)==0) | ($all_nonstocked)) {
  $stock_query = tep_db_query("select products_quantity as quantity from " . TABLE_PRODUCTS . " where products_id = '" . (int)$products_id . "'");
} else {
  $stock_query=tep_db_query("select products_stock_quantity as quantity from " . TABLE_PRODUCTS_STOCK . " where products_id='". (int)$products_id . "' and products_stock_attributes='$attr_list'");
}
if (tep_db_num_rows($stock_query)>0) {
  $stock=tep_db_fetch_array($stock_query);
  $quantity=$stock['quantity'];
} else {
  $quantity = 0;
}
return $quantity;

 

Without a ton of trial and error, I can't see how I'd get the QTPro code to work with the changes I need to make, above.

 

Has anyone done this?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...