Jump to content
zonetown

[Contribution] QTpro - Quantity Tracking Professional

Recommended Posts

Anyone using the new MS2 release?

 

It works for me in product_info and in checkout_information but not in shopping_cart

The function from general.php is not used to test the stock levels in

product_info.php That has it's own code to check from stock levels.

checkout_confirmation also does not use the general.php code to check for

stock levels. Both of those work. Shooping_cart, which does use the

function in general.php does not work.

 

In general.php:

$q=tep_db_query("select products_stock_quantity as quantity from " .

TABLE_PRODUCTS_STOCK . " where products_id='". (int)$products_id . "' and

products_stock_attributes='$attr'");

 

This is searching for 2-16,1-25 as the attribs and not

1-25,2-16

 

What is causing this? As you can see from mysql output this is the problem:

 

mysql> select products_stock_quantity from products_stock where products_id='35' and products_stock_attributes="1-25,2-16";

+----------------------------+

| products_stock_quantity |

+----------------------------+

| 0 |

+----------------------------+

1 row in set (0.00 sec)

 

mysql> select products_stock_quantity from products_stock where products_id='35' and products_stock_attributes="2-16,1-25";

Empty set (0.00 sec)

 

 

Anyone out there using the latest version and come across such problems?

 

regards,

 

Dave.

Share this post


Link to post
Share on other sites

FYI, I'd pretty much answered my question in my question :-)

Anyway, the attributes where getting out of order. So before imploding the array for the Select, add this around line 146, I think.

 

sort($attr);

reset($attr);

 

Now it works in the product list, the shooping cart and the checkout :-)

Share this post


Link to post
Share on other sites

After installed in the MS2 got this error on th Admin/stock.php

 

1064 - You have an error in your SQL syntax near 'and products_attributes.options_id=products_options.products_options_id and prod' at line 1

select products_name,products_options_name as _option,products_attributes.options_id as _option_id,products_options_values_name as _value,products_attributes.options_values_id as _value_id from products_description, products_attributes,products_options,products_options_values where products_attributes.products_id=products_description.products_id and products_attributes.products_id= and products_attributes.options_id=products_options.products_options_id and products_attributes.options_values_id=products_options_values.products_options_v
alues_id and products_description.language_id=1 and products_options_values.language_id=1 and products_options.special=0 and products_options.language_id=1 order by products_attributes.options_values_id

 

Had changed the DB everything seem to be okay

 

Please Help!!!!

 

add this around line 146, I think.

 

    sort($attr);

    reset($attr);

 

Where should this go to? Shopping_cart.php?

Share this post


Link to post
Share on other sites

I believe I have this contrib mostly working although it was anything but a slamdunk. The one problem I have found is when deleting an order. When return to stock is selected, it does not return attribute stocked items. I looked back through several revs of the contrib and it does not appear that this has ever worked as the admin/includes/functions/general.php file has never been part of the contrib.

 

The remove order code is actually in the function tep_remove_order.

 

I believe most of the code needed is already written and in the admin/stock.php file, but it will take me many days if not weeks to figure out what is needed and how to implement it :(

 

Any clues or pointers would be greatly appreciated.


-MichaelC

Share this post


Link to post
Share on other sites

OK. One more small issue. After entering the stock.php page to update stock, there are 2 links at the bottom of the page.

 

The one on the right is titled "Back to Low Stock Report for Attributes". The link for this is defined as FILENAME_STATS_LOW_STOCK_ATTRIB.

 

Where is this supposed to be defined and what should it be pointing to? I find no other reference to it in the code :huh:

 

Thanks


-MichaelC

Share this post


Link to post
Share on other sites
OK.  One more small issue.  After entering the stock.php page to update stock, there are 2 links at the bottom of the page. 

 

The one on the right is titled "Back to Low Stock Report for Attributes".  The link for this is defined as FILENAME_STATS_LOW_STOCK_ATTRIB. 

 

Where is this supposed to be defined and what should it be pointing to?  I find no other reference to it in the code  :huh:

 

Thanks

 

 

Same problem!!

 

Can anyone help?

Share this post


Link to post
Share on other sites

Does anyone know if you need to have version 2.0 loaded before installing 2.1?

I installed 2.1, but I am getting an error that says it can't find order_details.php which is located in includes/modules in version 2.0????

Share this post


Link to post
Share on other sites

Keep getting a fatal error when trying to use this contribution for MS2

 

Fatal error: Call to undefined function: tep_get_categories_name() in /.../catalog/index.php on line 232

 

Any help?

 

Has anyone been using this successfully with MS2. I have a pretty new install very few modifications. And this was my first trial on any of the contributions.

 

Having inventory for the attributes is a big plus, if I can get this sucker to work.

 

Did I need to install an earlier version before this one?

 

:(

Share this post


Link to post
Share on other sites
Keep getting a fatal error when trying to use this contribution for MS2

 

Fatal error: Call to undefined function: tep_get_categories_name() in /.../catalog/index.php on line 232

 

Any help?

 

Has anyone been using this successfully with MS2.  I have a pretty new install very few modifications. And this was my first trial on any of the contributions.

 

Having inventory for the attributes is a big plus, if I can get this sucker to work.

 

Did I need to install an earlier version before this one?

 

:(

I don't know why you are getting the error, but I do know it is possible to get it working. I have it working. It took a bit of time to get it into my customized site, but it was well worth it..

 

As for your error, I can't find the function tep_get_categories_name anywhere in my tree and I have QTPro up and running. Do you have other modules installed? Could you have introduced a syntax error when installing QTPro?


-MichaelC

Share this post


Link to post
Share on other sites
As for your error, I can't find the function tep_get_categories_name anywhere in my tree and I have QTPro up and running. Do you have other modules installed? Could you have introduced a syntax error when installing QTPro?

I have no other modules running and have made only minor changes to the CSS and column sizing etc. nothing to any real coding.

Share this post


Link to post
Share on other sites

Can someone PLEASE get this working with the latest oscommerce release? I literally can not open my site to the public until this feature is working....

Share this post


Link to post
Share on other sites

Jeremy:

 

I am not an expert, but have gotten this working fine on my store which is running MS2.2. What is not working?


-MichaelC

Share this post


Link to post
Share on other sites

Everything. I installed the most recent contribution released on 09/06/2003, called QTPRO 2.1 update for MS2 and made by freezehell. Is this what you are using? I downloaded that, ran the .sql querry in phpMyAdmin, then just ported the files over from the zip to my directory and nadda. Nothing happens.

Share this post


Link to post
Share on other sites

And just to add, I am a VERY experienced modification installer for Invision board and other software, I am not a clumsy newbie. :)

Share this post


Link to post
Share on other sites

I've integrated the QTpro contrinb into my system with help from coffman, but i've got what i think is a bug.

 

I can't reproduce this all the time for some reason.

 

I have a product Black, Size: 16, quantity of 1.

 

I'm trying to change the sizes from 16 to Large, and to do that i wan't to delete the stock. Usually I change the stock to zero - sometimes it disapears from the list, and sometimes it set the quantity on the list to 0.

 

When i do this today, i get the following error.

 

1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'where products_id=53' at line 1

update products set products_quantity= where products_id=53

[TEP STOP]

 

As a temporary measure, where can i make the changes in the database to delete this stock entry?

 

Any ideas would be very much appreciated, i'd really like to sort this out.

 

Sam

Share this post


Link to post
Share on other sites

Additional, it's seems it didn't like deleting the only entry in that list.

 

I added a Black - Small - 1 and then set it to zero (deleting it) no worries.

 

Curious stuff.

Share this post


Link to post
Share on other sites

Jeremy:

 

My Installation.html says

QTPRO 2.1 Update for osCommerce 2.2 MS2 ONLY

 

I did not copy the files into place, but hand edited my files as I have made quite a few mods I wanted to keep.

 

So you installed all the admin and catalog files?

 

You have added attributes, like color, and left them designated as "Special = NO". Then given the att's values like red, green, blue. Then attached the att's to a product? And the tracking does not work?

 

Do you not get the stock button in the admin/categories.php page?

 

What happens when you call stock.php directly as in:

 

http://your.store.com/admin/stock.php?product_id=24

 

24 being a number to a valid item in your catalog?

 

In other words. What exactly is not working, and what are you expecting?

 

Don't give up as this contrib is definatly worth it. I won't be able to respond again until tonight, MST that is, as I am off to my real job now :)


-MichaelC

Share this post


Link to post
Share on other sites

I have installed the qtpro 2.1 update in my osc 2.2 ms2 shop - and it works - almost!

 

but -- there are two main problems:

 

1. The products are not filtered in the products_info.php!

 

Why should I track my products and the customer isn't able to see if the product is in stock? Without customer information about availability of a product the qtpro addon makes no sense.

 

2. The ordered products are not subtracted from the products_stock table in the database. So multiple orders of products are possible even if only 1 piece is in stock!

 

I'm using the following contrib to inform my customers if product is in stock (added the following lines into product_info.php). But this considers only the stock which is in the products table!

 

<?php

$prod_quantity = tep_get_products_stock($products_id);

switch ($prod_quantity) {

case 0:

print '<img src="images/stock_soldout.gif" border="0">';

break;

case 1:

print '<img src="images/stock_limitedstock.gif" border="0">;

break;

case 2:

print '<img src="images/stock_limitedstock.gif" border="0">';

break;

case 3:

print '<img src="images/stock_instock.gif" border="0">';

break;

case 4:

print '<img src="images/stock_instock.gif" border="0">';

break;

default:

print '<img src="images/stock_instock.gif" border="0">';

}

?>

 

Any ideas how to get the real stock from products with options added with qtpro?

 

I would be happy if someone could help with a piece of php code!

Share this post


Link to post
Share on other sites

I just used Beyond Compare to compare my files to the ones in the zip, and copy and pasted the the differences. Everythings works now, after some major testing, it all seems to be in order. Thank you for being so eager to help Michael, people like you can turn a regular online community into something great. :)

Share this post


Link to post
Share on other sites

Ok, another thing...does anyone know how to actually omit an attribute from the selection on the product info page if the quantity is zero? I know a contribution for QTpro was released to do this, but it is now compatible with the latest release. It is very important that when I run out of a certain size, that it is no longer even selectible. I know I can remove the attribute from the product, but this is to be for an EXTREMELY busy store, products will be running out all the time and will not be reordered. I need the store to sort of "take-care-of-itself". Any ideas?

Share this post


Link to post
Share on other sites

Man I must be missing something....

 

First, for those successful at implementing....... Did you use the 2.1 contrib for MS2 update alone, or did you upgrade from a previous contrib version?

 

I have tried & tried on a fresh MS2 install, but this contrib doesnt exist as far as I can see.

 

I even used Beyond Compare as Jeremy described.

My Attributes section of the admin looks no different than before.

 

I did try & load admin/stock.php in the browser & was given a syntax error:

====================

near 'and products_attributes.options_id=products_options.products_op

====================

 

by the response in the forum, Its obvious that this is a much needed feature, however the lack of documentation or any real explanation of how this contrib works has me very confused.

 

If anyone has successfully implemented qtpro 2.1 on a fresh MS2 install, I would love some basic insight.

Looks like most of the documentation was on the authors site & is now gone.

 

Thanks

Share this post


Link to post
Share on other sites

Maybe Master Products is the way to go if you are running an MS2 store. It seems to address many of the same things as QTPro in a very straightforward way. I was quite excited to find the new contribution.

Share this post


Link to post
Share on other sites

Hi there guys

 

I have installed the QTPro 2.1 update into my MS2 V2.2 store and I seem to have got all the pages working apart from the point at which I actually want to add stock to the attributes

 

I am getting the following error messages all relating to the stock.php file in admin

 

Warning: Variable passed to each() is not an array or object in /home/.sites/33/site5/web/catalog/admin/stock.php on line 26

Warning: Wrong datatype in sort() call in /home/.sites/33/site5/web/catalog/admin/stock.php on line 33

Warning: Bad arguments to join() in /home/.sites/33/site5/web/catalog/admin/stock.php on line 34
1064 - You have an error in your SQL syntax near ''',)' at line 1

insert into products_stock values (0,,'',)

[TEP STOP]

 

Can anyone shed any light on why these are occurring and if so offer any advice

 

I'd be most grateful

 

Regards

 

Jos Medinger


===============

Simple yet Creative

Get Online Web Design : getonlinedesign.com

===============

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

×