Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[Contribution] QTpro - Quantity Tracking Professional


zonetown

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

Link to comment
Share on other sites

  • 2 weeks later...

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!

Link to comment
Share on other sites

  • 3 weeks later...

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]

Link to comment
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.

Link to comment
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.

Link to comment
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
Link to comment
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

Link to comment
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]

Link to comment
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

Link to comment
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
Link to comment
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

Link to comment
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: [email protected]

 

Thanks,

Kevin

Link to comment
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

Link to comment
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

Link to comment
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!

Link to comment
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

Link to comment
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. :)

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