Jump to content
zonetown

[Contribution] QTpro - Quantity Tracking Professional

Recommended Posts

Ok fixed above and tried to edit post but would not let me. Issue now is:

 

When I add this code:

 

<snip>

 

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

 

And this seems like you're missing the "<?" before that chunk of code. Keeps it from being executed as php code and just displays it.

Share this post


Link to post
Share on other sites

I added the <? and the ?> so it looks like this now:

 

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

 

 

 

 

But now I get this error:

 

//++++ QT Pro: Begin Changed code 1146 - Table 'bp_S2.TABLE_PRODUCTS_STOCK' doesn't exist

 

select products_stock_quantity from TABLE_PRODUCTS_STOCK where products_id = '224' AND products_stock_attributes REGEXP '(^|,)1-9(,|$)' AND products_stock_quantity > 0

 

[TEP STOP]

Share this post


Link to post
Share on other sites

Does anyone know a contribution to easily update the stock of all products and their attributes?

I was using Stockupdate 3.0, but I can't find a way to update the attributes quantities with this contribution.

 

Is their a contribution out there that can do this? Or can someone help me change the Stockupdate contribution for use with QT pro?

 

Thanks!

Share this post


Link to post
Share on other sites

How do I get to the screen (Product Stock) so I can add more quanity to each. I Looked around and I can not figure out where to go. help please.

 

Thanks

Share this post


Link to post
Share on other sites

I do not see the stock button for some reason by the product I am at. Where is this button defined so I can go and check code to make sure it is there and correct? Also what line/lines should it be on?

 

Thanks much

Share this post


Link to post
Share on other sites
How do I get to the screen (Product Stock) so I can add more quanity to each. I Looked around and I can not figure out where to go. help please.

 

Thanks

 

The Stock button is on the Categories / Products page. In Admin click Catalog, then Categories/Products. Navigate to your product. For your product you should see buttons Edit, Delete, Move, Copy to, and Stock.

Share this post


Link to post
Share on other sites

I have products with 3 attributes. When I go to add stock quantites for the attributes only 2 attributes are listed. I read through many posts and I have seen where others have casually mentioned having 3 attributes, but I have not read that anyone had a problem setting stock quantites for all 3.

 

My question is, is QTPro designed to allow me to set stock levels for more than 2 attributes? In other words, do I have a bug in my installation, or is it working as designed?

 

Thanks

Share this post


Link to post
Share on other sites
I do not see the stock button for some reason by the product I am at. Where is this button defined so I can go and check code to make sure it is there and correct? Also what line/lines should it be on?

 

I also don't see a Stock button. I installed another contrib after QT Pro, so maybe I screwed something up. I *THOUGHT* I was being very careful, but maybe not. Where is this button defined?

Edited by Obaida

Share this post


Link to post
Share on other sites
I also don't see a Stock button. I installed another contrib after QT Pro, so maybe I screwed something up. I *THOUGHT* I was being very careful, but maybe not. Where is this button defined?

 

I believe the page you are looking for is catalog/admin/categories.php, and I suspect the following is the code displaying the button.

 

<a href="' . tep_href_link("stock.php", 'product_id=' . $pInfo->products_id) . '">' . tep_image_button('button_stock.gif', "Stock") . '</a>

Share this post


Link to post
Share on other sites
I believe the page you are looking for is catalog/admin/categories.php, and I suspect the following is the code displaying the button.

 

<a href="' . tep_href_link("stock.php", 'product_id=' . $pInfo->products_id) . '">' . tep_image_button('button_stock.gif', "Stock") . '</a>

 

 

That's it, I had two contribs editing the same line, so I just combined the two and it works great. Thanks so much. Now all I need to do is figure out how I can make the attributes appear in the proper order in the drop down box. Is there a way to set this?

Share this post


Link to post
Share on other sites
I have products with 3 attributes. When I go to add stock quantites for the attributes only 2 attributes are listed. I read through many posts and I have seen where others have casually mentioned having 3 attributes, but I have not read that anyone had a problem setting stock quantites for all 3.

 

My question is, is QTPro designed to allow me to set stock levels for more than 2 attributes? In other words, do I have a bug in my installation, or is it working as designed?

 

Thanks

I have poducts with 6 or seven attributes, so in short... yes, you must have a bug somewhere.


Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites
I have poducts with 6 or seven attributes, so in short... yes, you must have a bug somewhere.

 

Great, but I hate when I do stuff like a total noob. :blush: When I entered my third option name I forgot to select the "Track Stock" box. I am now tracking more than two attributes at a time. Thanks.

 

Sorry, Obaida, I don't know anything about sequencing the attributes in the drop down box.

Share this post


Link to post
Share on other sites

do any of you guru's know if there exists an inventory report for qtpro? i'm looking for something that would help me export the data into excel. so basically, for this to work, it would have to be similar to the low stock report currently included with this module, however, it would need to have one line item for each product/attribute/attributevalue combination. the current method does not export well into excel.

 

also, how difficult would it be to program a field to capture wholesale cost of each product/attribute combination? i know that there is a products extra field contribution that would work if all attribute costs the same. however, in many instances, this is not the case.

 

these two reports would allow people to more easily calculate profit margins and inventory turns.

Share this post


Link to post
Share on other sites

Hey it works now. Is there a way to display in the drop down next to the option the stock amount?

 

Like this: Size 6 (4 in stock) Or Size 6 (4)

 

Thanks

Share this post


Link to post
Share on other sites

In QTpro v4.25...

 

After adding 3 and more attributes to some of my items, and then adding stock for these attributes, I found that some of these attributes were not showing up in stock (even though I just defined the stock quantities).

 

I found there is a single quote misplaced in an SQL statement which was not allowing the 'order by' phrase to be executed. The affected file is:

 

/includes/functions/general.php

 

The code at line 136

$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'");

 

should be changed to

$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");

Share this post


Link to post
Share on other sites

does someone can tell me why this code make disappear my footer ??

 

the problem is in product_info.php

 

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

Share this post


Link to post
Share on other sites
Great, but I hate when I do stuff like a total noob. :blush: When I entered my third option name I forgot to select the "Track Stock" box. I am now tracking more than two attributes at a time. Thanks.

 

Sorry, Obaida, I don't know anything about sequencing the attributes in the drop down box.

LOL, we were all a noob once! Glad you got it fixed :D


Upon receiving fixes and advice, too many people don't bother to post updates informing the forum of how it went. Until of course they need help again on other issues and they come running back!

 

Why receive the information you require in good faith for free, only to then have the attitude to ignore the people who gave it to you?

 

There's no harm in saying, 'Thanks, it worked'. On the contrary, it creates a better atmosphere.

 

CHOOCH

Share this post


Link to post
Share on other sites

Simple little change...

 

Updated the link for "Back to Products Category" at the bottom of the Products Stock page. Previously, using this link would return you back to the begining of the categories.php page (root catalog)... I thought it better if this link return you to the previous category level you were at prior to clicking the stock button.

 

IE: Catagory\Lvl1\lvl2\lvl3 - Clicking link would return you to Lvl1, now, clicking the link will return you to lvl3 or whatever lvl the product was located when you clicked the stock button...

 

Included: Just a text file with the required changes - NOT A FULL PACKAGE

 

File: catalog\admin\categories.php

Search For:

tep_href_link("stock.php", 'product_id=' . $pInfo->products_id) . '">'

Change To:

tep_href_link("stock.php", 'cPath=' . $cPath . '&product_id=' . $pInfo->products_id) . '">'

 

File: catalog\admin\stock.php

Search For:

<a href="' . tep_href_link(FILENAME_CATEGORIES, '', 'NONSSL') . '" class="menuBoxContentLink">Back to Products Category</a>

Change To:

<a href="' . tep_href_link(FILENAME_CATEGORIES, 'cPath=' . $VARS['cPath'], 'NONSSL') . '" class="menuBoxContentLink">Back to Products Category</a>

Search For:

echo "<td class=dataTableHeadingRow><input type=text name=quantity size=4 value=\"" . $db_quantity . "\"><input type=hidden name=product_id value=\"" . $VARS['product_id'] . "\">

Change To:

echo "<td class=dataTableHeadingRow><input type=text name=quantity size=4 value=\"" . $db_quantity . "\"><input type=hidden name=cPath value=\"" . $VARS['cPath'] . "\"><input type=hidden name=product_id value=\"" . $VARS['product_id'] . "\">

Share this post


Link to post
Share on other sites

All-

I'm working on a "All Stock" report. Which will return all products and thier current stock levels. Pretty simple actually - I just took the stats_low_stock.php found in the contrib and removed the section that checks if the product is below the stock low count. However, I noticed, that while this report works as expected, it only includes those options that actually have stock.

 

IE: I have a product with a size option small (5), medium (0), large (1). When the report is run, it returns results for small and large and omits the medium option b/c it's not part of the products_stock table. The work around, add medium (0) to the stock of the product - this cases a draw back however, now in the store, the option medium is available in the drop down/radio buttons even though the stock count is zero.

 

I would like this report to be able to grab all options from a product, and if that option doesn't have a stock level, to still report it, but as zero - this way the report includes all options possible, but at the same time, doesn't "screw up" the front end store.

 

If anyone can help me with this, I would be very thankful. PM me and I can send you the report.

 

Thanks...

Steve (DeathAdder)

Share this post


Link to post
Share on other sites

I believe I just answered my own question regarding the "all stock report" and the draw back on the front end store. I changed my 'Product Info Attribute Display Plugin' to 'sequenced_dropdown' and it no longer displays those options in the dropdown with a 0 stock level.

 

On that note: It would still be nice to be able to get this report to work as previously descripbed without having to add the option(0) to the product....?

 

-Steve (DeathAdder)

Share this post


Link to post
Share on other sites

Hi

I have a problem with the updating of quantities in the attributes section.

The actual quantity in the product page is updating when a customer buys a product, but not the attribute quantity.

 

What file controls this?

Does anyone else have or have solved this problem?

Share this post


Link to post
Share on other sites
Hi

I have a problem with the updating of quantities in the attributes section.

The actual quantity in the product page is updating when a customer buys a product, but not the attribute quantity.

 

What file controls this?

Does anyone else have or have solved this problem?

 

I am having the same problem

 

I have 4 attributes assigned to a product, 4y, 5y, 6y & 8y, each attribute has a stock qty of 1, yet I can add 4 of the 4y to my shopping cart and it says they are in stock, does that make sense??

 

I hope someone can help

 

pretty please

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

×