Jump to content
zonetown

[Contribution] QTpro - Quantity Tracking Professional

Recommended Posts

Stock is adjusted in checkout process with this code.

 

   if ($attributes_stock_left < 1) {
          tep_db_query("update " . TABLE_PRODUCTS_STOCK . " set products_stock_quantity = '0' where products_stock_attributes = '$products_stock_attributes' AND products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
          $actual_stock_bought = $attributes_stock_values['products_stock_quantity'];
         }else{
          tep_db_query("update " . TABLE_PRODUCTS_STOCK . " set products_stock_quantity = '" . $attributes_stock_left . "' where products_stock_attributes = '$products_stock_attributes' AND products_id = '" . tep_get_prid($order->products[$i]['id']) . "'");
          $actual_stock_bought = $order->products[$i]['qty'];


while (!succeed) {try()};

 

GMT -6:00

Share this post


Link to post
Share on other sites

My qtpro still isnt subtracting stock... It doesn't even take it away from the overall stock...

I have STS, Gift Voucher, Discoutn Coupon, and I think those are the only ones that might have anything to do with it....

 

Ive downloaded new qtpro files and compared them with mine with beyond compare 2, and I still can't find anything wrong!!!!

 

Please help me... What else can i do?

-Can you maybe post your entire checkout_proccess code here...

 

I dont think that is the problem though...

 

Any help is appreciated, Thanks so much!

Share this post


Link to post
Share on other sites

So i just spent the last hour or two uninstalling everything and reinstalling it to make sure nothing was missing...

 

No luck :mellow:

 

any other solutions?

Share this post


Link to post
Share on other sites

Well I found the solution is that you must have downloads set to off...

Any way to make this contribute work with downloads set to on?

Share this post


Link to post
Share on other sites

Now with the newest update i get this error and my page is displayed funny...

1050 - Table 'Table_One' already exists

CREATE TEMPORARY TABLE Table_One SELECT products_stock_attributes FROM products_stock WHERE products_id = 28 AND products_stock_quantity >0

[TEP STOP]

Share this post


Link to post
Share on other sites
Now with the newest update i get this error and my page is displayed funny...

1050 - Table 'Table_One' already exists

CREATE TEMPORARY TABLE Table_One SELECT products_stock_attributes FROM products_stock WHERE products_id = 28 AND products_stock_quantity >0

[TEP STOP]

Me too.. just tried to install QTpro for the first time. Please help.

Share this post


Link to post
Share on other sites

Anyone installing this should only install this on top of a clean install of MS2. It took me awhile to figure it out, but you only need to install the 2.1 and 2.2 upgrades. 2.1 contains all the files you need to get going. 2.2 subtracts the quantity on hand. After playing with Master Products last night and this today, QTPro seems like a better solution for items with a single attribute like size. I haven't tried two attributes at once like color and size.

 

Also, I'm going to attempt easypopulate with this. Hopefully it works in updating the stock on hand.

Share this post


Link to post
Share on other sites

I can't understans why I must install qtpro on top of a clean install of MS2. Since I've installed several other contributions I used a text editor that compared the old files with the files in qtpro. It works in the admin but I still get the error message above. Please help me, I can't go live before solving this.

Edited by Fredrik.r

Share this post


Link to post
Share on other sites
I can't understans why I must install qtpro on top of a clean install of MS2. Since I've installed several other contributions I used a text editor that compared the old files with the files in qtpro. It works in the admin but I still get the error message above. Please help me, I can't go live before solving this.

Hello Fredrik.r,

 

You don't have to install it into a clean installation. But it takes some effort to get it working.

 

What are you doing when you receive the error you mention? What URL are you going to?

 

-Michael


-MichaelC

Share this post


Link to post
Share on other sites

It seems I only get the error message below for products with attributes. When looking at for example the Matrox G400 32MB I can only choose memory but not premium or deluxe. I've put stock info for all alternatives.

 

 

1050 - Table 'Table_One' already exists

 

CREATE TEMPORARY TABLE Table_One SELECT products_stock_attributes FROM products_stock WHERE products_id = 28 AND products_stock_quantity >0

 

[TEP STOP]

Share this post


Link to post
Share on other sites

This last update to this contribution is doing things the hard way. Get the product_info.php from one of the earlier versions and make the changes recommended by coffman here coffman's great work.

 

This will remove or say "out of stock" without creating a temp table.


while (!succeed) {try()};

 

GMT -6:00

Share this post


Link to post
Share on other sites

maybe a different command should be used... drop table if exists, or alter table might have a better effect... I am no expert but maybe...

Share this post


Link to post
Share on other sites

I hope somebody could help me.

 

I installed qtpro and the hack that only the available combinations are shown with radiobuttons. Now i have the problem that i have 2 Attributes, one for the size and one for the name of the player. I managed to sort the size, wich is the first attribute, but i dont know how to sort the second attribute,too so that the triots in the same size are orderd by the players number.

 

I think the with ---> marked line is the peace of code of products_info.php which should be affected :

 ? .
? .
? .
? $var.="ksort(\$attr1);\n";
? $var.="reset(\$attr1);\n";
? ? ?$var.="\$price2=".implode("+",$price1).";\n";
? ? ?$var.='if (!tep_check_stock_new($HTTP_GET_VARS[products_id],$attr1,1)) {$sa1[';
? ? ?$var.="\"<input type=radio name=some1 onclick=\\".'"'.$var2."\\".'"'." ##checked##>\".".join(".\", \".",$var1).".\" \"";
? ? ?if ($price1 == 0) {

? ? ? ? $var.=".\"\".\"<br>\\n\"]=\$price2;}\n";

? ? ? ? } else ?{

? ? ? ? $var.=".\"(\".\$currencies->display_price(\$price2,0).\")<br>\\n\"]=\$price2;}\n";

? ? }
? $var.="}\n";
---> ? ? $var.="if (sizeof(\$sa1)) {ksort(\$sa1);reset(\$sa1);\n";
? ? $var.="\$sel='';foreach(array_keys(\$sa1) as \$sa) { \$sa=str_replace('##checked##',\$sel,\$sa); \$sa=str_replace('('.\$currencies->display_price(0,00).')','',\$sa); ?\$sel=''; echo \$sa;}}else{ echo 'This product is currently unavailable!';}";
.
.
.

 

Anybody here, with an idea for me ?

 

regards

Martin

Edited by derzbach

Share this post


Link to post
Share on other sites

I have posted qtpro 2.3. I updated product_info.php that filters on attribute quantity without using temporary tables. People that are having problems with qtpro 2.2 can replace only this file.

 

I also added an inventory report that shows attribute quantities.


while (!succeed) {try()};

 

GMT -6:00

Share this post


Link to post
Share on other sites

Hi Tom Thumb,

 

the thing only works with one option i think. Because if i use it, everything is out of stock :-(

 

regards

Martin

Share this post


Link to post
Share on other sites

Hello,

 

Hard to keep up with all the code changes and errors. I desparately need this for a site of mine, however. I'm willing to pay somebody to install this contribution for me. If you can get it working well, then we're good to go. From what I can see, it should be a fairly painless operation...I just don't have time for it right now.

 

Get a hold of me:

 

Cell: 937.620.1004

AIM: ace56789

ICQ: 9477315

E-mail: kevin@kevinwimer.com

 

Thanks,

Kevin

Share this post


Link to post
Share on other sites

QTPRO 2.3 Update

 

Fixed zip file directory structure problem.

 

Removed references to 'products_attributes_quantity'. This is not used in QTPRO.

 

This product_info only works with one attribute. I am working on this. I'll post an update when I get this fixed.

 

If you have more than one attribute you need to track like color and size and have problems with 18 Jun 2004 - QTpro 2.2 update Author: Christoph Schram because of temp_tables use

 

6 Sep 2003 - QTPRO 2.1 update for MS2 by Freezhell

 

Sorry about the inconvenience.


while (!succeed) {try()};

 

GMT -6:00

Share this post


Link to post
Share on other sites

Thanks so much for your hard work! I can't wait for the newest version to come out with support for more than one option! That will be very tricky... I am interested to see what your solution will be...

Share this post


Link to post
Share on other sites

What is the working package after reading the last few messages I am somewhat confused.. I need this terribly bad for my site and do not want to install the wrong one.. I would need this to handle multiple options loft,dexterity,flex so 3 attributes at a minimum sometimes 5-6 for other items.

 

 

Also, any better instructions on installing this? I am using a compare program and am noticing alot of changes in the files..

 

--Andrew

Share this post


Link to post
Share on other sites

In the stock section of a product there is a link that links to a FILENAME_STATS_LOW_STOCK_ATTRIB

 

Is there a file that can display low stock on an attribute basis?

 

If not could someone alter one that is already created to do this... I have no idea how to start!

Share this post


Link to post
Share on other sites

In my last update I add a file that show the entire inventory including the attributes.

 

I created this file from another inventory file and added the attributes.

 

FILENAME_STATS_LOW_STOCK_ATTRIB

 

QTPro

 

Its stats_low_stock_attrib.php in the admin folder.

 

You will need to add this to /catalog/admin/includes/filenames.php

  define('FILENAME_STATS_LOW_STOCK_ATTRIB', 'stats_low_stock_attrib.php');


while (!succeed) {try()};

 

GMT -6:00

Share this post


Link to post
Share on other sites

at the top of the low stock report I get this...

HEADING_TITLE Thursday 08 July, 2004 

TABLE_HEADING_PRODUCTS TABLE_HEADING_QUANTITY TABLE_HEADING_PRICE  

 

What am I missing?

Share this post


Link to post
Share on other sites

I apologize if this has already been covered, but I've done so many mods on my oscommerce shop, that I would prefer to modify my files myself. The latest QTPRO 2.3 version I downloaded had the modified files if you have a virgin board, I looked through this thread for a "find & replace/add" list to modify my existing files, but did not see it. confused.gif

 

I also tried www.vary.net/qtpro but it was dead. :(

 

Again, I apologize if the information I am looking for is right in front of me.

 

Thank you in advance for any help you can offer. :)

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

×