Jump to content
zonetown

[Contribution] QTpro - Quantity Tracking Professional

Recommended Posts

here's mine too....

 

Warning: Invalid argument supplied for foreach() in /home/osa786/public_html/shop2/includes/classes/pad_base.php on line 388

 

this happens when i choose not to track stock and select radio-set, single dropdown... but the out of stock vanishes from the dropset when using base too.

Ahh, thanks for the exact circumstances. I have reproduced the problem and its a simple fix. Both pad_single_dropdown.php and pad_single_radioset.php have a line:

      $out.=$this->_draw_out_of_stock_message_js($attributes);

in them. Move that line up above the closing brace (}) right before it in both files.

Share this post


Link to post
Share on other sites
I just checked the files with BBEdit's "Find differences". Both files are identical to the ones in QT Pro 4.2. I can't see the the attributes in for example the product "Matrox G200 MMS", just the total stock. I need some help to verify my database. I followed the install instructions and upated it with new_install.sql and config.sql

I have not touched the files starting with "pad" since there was no previous version of QT Pro installed.

It sound like you haven't set any options to track stock so you don't get the ability to add stock to the attributes on the stock page. This would also explain why you get the PHP error on the product_info page. See my response to chooch to get rid of the error when no options are set to track stock. Then go to the admin products attributes page and set some options to track stock and see if they show up on the stock page for products that use those options.

Share this post


Link to post
Share on other sites

Oh, thanks!! It seems to work now!

 

Are there some good contributions to handle attributes in the admin product page instead of product attributes page?

Share this post


Link to post
Share on other sites
Ahh, thanks for the exact circumstances.? I have reproduced the problem and its a simple fix.? Both pad_single_dropdown.php and pad_single_radioset.php have a line:

 ? ? ?$out.=$this->_draw_out_of_stock_message_js($attributes);

in them.? Move that line up above the closing brace (}) right before it in both files.

 

Thanks Ralph

 

I guess it can be a touch tedious having to deal with amateurs such as myself.. but your help is truly appreciated.

 

The code you instructions you gave were spot-on again!

 

Here's another problem............

 

Here is my original stock.php for gift vouchers

 

Value Quantity

 

?5 7

 

 

here's the page after i add another attribute to it (colour red)

 

Value Quantity

Red ?15 1

?5 7

 

it is now out of sync - the word Quantity should be above where the 1 is.

 

when i go back in to attributes to delete the 'red' option from gift vouchers (or other products) the stock page then looks like this:

 

Value Quantity

?15 1

?5 1

 

the word red has vanished but when i add 'zero' to ?15 this is what happen:

 

Value Quantity

?15 1

?5 1

?15 0

 

i can't delete it... even when i delete anything in attributes that has ?15 in it, mthis is what happens

Value Quantity

1

?5 1

0

 

an extra 'zero'?

 

i can get in to phpmyadmin and delete the rows but please can anyone help tell me why the attributes leave traces of their existence in the stock.php page even after they get deleted from the products_attributes.php page?

 

thanks again :-)

Edited by chooch

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
Thanks Ralph

 

I guess it can be a touch tedious having to deal with amateurs such as myself.. but your help is truly appreciated.

You are welcome. Its not amateurs that get frustrating - its jsut difficult for anyone to narrow down the circumstances causing a particular problem. And twice as difficult trying to do it via messages on a forum.

 

Here's another problem............

 

Here is my original stock.php for gift vouchers

 

Value Quantity 

 

  ?5    7 

here's the page after i add another attribute to it (colour red)

 

Value Quantity 

  Red    ?15    1 

  ?5    7 

 

it is now out of sync - the word Quantity should be above where the 1 is.

 

when i go back in to attributes to delete the 'red' option from gift vouchers (or other products) the stock page then looks like this:

 

Value Quantity 

      ?15    1 

  ?5    1 

 

the word red has vanished but when i add 'zero' to ?15 this is what happen:

 

Value Quantity 

      ?15    1 

  ?5    1 

  ?15    0

 

i can't delete it... even when i delete anything in attributes that has ?15 in it, mthis is what happens

Value Quantity 

            1 

  ?5    1 

        0

 

an extra 'zero'?

 

i can get in to  phpmyadmin and delete the rows but please can anyone help tell me why the attributes leave traces of their existence in the stock.php page even after they get deleted from the products_attributes.php page?

 

thanks again :-)

 

That's just the way it is with QT Pro for now. What you should do is delete the stock for the product before changing the attributes. You can do this on the stock page by setting any attributes showing stock to zero. Then change the attributes, then add the attribute stock. QT Pro really should prevent you from making this mess but there is no simple fix and I just don't have the time to develop the fix right now.

Share this post


Link to post
Share on other sites
You are welcome.  Its not amateurs that get frustrating - its jsut difficult for anyone to narrow down the circumstances causing a particular problem.  And twice as difficult trying to do it via messages on a forum.

That's just the way it is with QT Pro for now.  What you should do is delete the stock for the product before changing the attributes.  You can do this on the stock page by setting any attributes showing stock to zero.  Then change the attributes, then add the attribute stock.  QT Pro really should prevent you from making this mess but there is no simple fix and I just don't have the time to develop the fix right now.

 

 

i got it... i will do it that way Ralph, thanks for the guidance

 

at the moment it seems to be working fine.. no error codes or anything

 

just a further question. i saw a site ages back that had the radio-set in product_info and it actually had a $10, $25 and $50 gift voucher options

 

i have been thinking of a way to try and do this too.. if the gift voucher is on one page (product_info) then really there should be no way to use attributes as the GIFT_10, or GIFT_25 or GIFT_50 can only appear in one product field, right?

 

do you think i may have been hallucinating at the time and that it isn't possible to use the attributes for Gift _vouchers :-)

 

the closest i can to that is to have any onr gift voucher on sale and use the other ones as out of stock - because if they were in stock, how does one differentiate between the vouchers when adding to cart?

 

can anyone please advise on this matter too...

 

thanks (a million!)


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 got it... i will do it that way Ralph, thanks for the guidance

 

at the moment it seems to be working fine.. no error codes or anything

 

just a further question. i saw a site ages back that had the radio-set in product_info and it actually had a $10, $25 and $50 gift voucher options

 

i have been thinking of a way to try and do this too.. if the gift voucher is on one page (product_info) then really there should be no way to use attributes as the GIFT_10, or GIFT_25 or GIFT_50 can only appear in one product field, right?

 

do you think i may have been hallucinating at the time and that it isn't possible to use the attributes for Gift _vouchers  :-)

 

the closest i can to that is to have any onr gift voucher on sale and use the other ones as out of stock - because if they were in stock, how does one differentiate between the vouchers when adding to cart?

 

can anyone please advise on this matter too...

 

thanks (a million!)

This is the wrong thread for gift vouchers. Try asking your question on the thread for that contribution.

Share this post


Link to post
Share on other sites
This is the wrong thread for gift vouchers.? Try asking your question on the thread for that contribution.

 

ok, i understand.. sorry about that.

 

as it stands is there a way of showing remaining stock using the QTpro mod? here's what was available on the forum for displaying it in the actual product_info.php page

 

 

 

<!-- Added quantity in stock display -->

<tr>

<td align="center" class="main">There are currently <b><?php echo tep_get_products_stock($product_info['products_id']); ?></b> available in stock.<p></td>

</tr>

<!-- End quantity in stock display -->

 

 

 

even using this now shows only the total number of stock remaining not total per attribute. does anyone have any pointers as to how to get the stock count show up next to the actual attribute radio-buttons? (i.e. black=10, blue =17, yellow=4, etc)

 

thanks

Edited by chooch

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
ok, i understand.. sorry about that.

 

as it stands is there a way of showing remaining stock using the QTpro mod?

 

...snip...

 

does anyone have any pointers as to how to get the stock count show up next to the actual attribute radio-buttons? (i.e. black=10, blue =17, yellow=4, etc)

 

thanks

Take a look at _build_attributes_combinations in pad_base:

 

          $is_out_of_stock=tep_check_stock(tep_get_prid($this->products_id),1,$newcomb);
         if (!$is_out_of_stock | ($showoos == true)) {
           switch ($markoos) {
             case 'Left':   $newtext=($is_out_of_stock ? TEXT_OUT_OF_STOCK.' - ' : '').substr($newtext,2);
                            break;
             case 'Right':  $newtext=substr($newtext,2).($is_out_of_stock ? ' - '.TEXT_OUT_OF_STOCK : '');
                            break;
             default:       $newtext=substr($newtext,2);
                            break;
           }
           $combinations[] = array('comb'=>$newcomb, 'id'=>substr($newid,1), 'text'=>$newtext);
           if ($newisselected) $selected_combination = sizeof($combinations)-1;
         }

You can tweak this to add the stock level to the text of the radioset or dropdown when you are using single_dropdown or single_radioset. Use this to get the current stock level:

tep_get_products_stock($this->products_id, $newcomb)

Probably the best thing to do is to replace the null strings ('') in the case 'left' and case 'right' with the above call (along with some spacing & whatever your desired punctuation is). That way if stock goes negative the customer will see your out of stock message instead of -42.

Share this post


Link to post
Share on other sites
tep_get_products_stock($this->products_id, $newcomb)

Probably the best thing to do is to replace the null strings ('') in the case 'left' and case 'right' with the above call (along with some spacing & whatever your desired punctuation is).? That way if stock goes negative the customer will see your out of stock message instead of -42.

 

i did it but without knowing what code to type i get the selection and without any 'space' i get the number..

 

can anyone tell me how to write text within the code (sorry Ralph, i played around with it but keep going round in circles - i should have gone to college for evening classes to learn this php malarky!)

 

what should i do if i want to get something like 'space' 'there are # remaining'. will that have to go via a language file?

 

any help will be appreciated as always

 

thanks

Edited by chooch

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

Please see the zip file HERE first!!!

 

I have been working on this for a month now , and i think it would be a benefit to have it built for the OSC community! I designed it, but i dont know how to code :(

 

Can anyone help me build this? Thanks!

Share this post


Link to post
Share on other sites
i did it but without knowing what code to type i get the selection and without any 'space' i get the number..

 

can anyone tell me how to write text within the code (sorry Ralph, i played around with it but keep going round in circles - i should have gone to college for evening classes to learn this php malarky!)

 

what should i do if i want to get something like 'space' 'there are # remaining'. will that have to go via a language file?

 

any help will be appreciated as always

 

thanks

 

You should really check out some of the PHP tutorials on the net and learn some basics. The time invested will pay back many times over.

 

' there are ' . tep_get_products_stock($this->products_id, $newcomb) . ' remaining'

Share this post


Link to post
Share on other sites
You should really check out some of the PHP tutorials on the net and learn some basics.  The time invested will pay back many times over.

 

' there are ' . tep_get_products_stock($this->products_id, $newcomb) . ' remaining'

 

thanks - will try to go college one evening after work, if i can't do that i'll definately get some online PHP tutorials for basic stuff.

 

thanks helping out with the script - it works a treat and the drop set and radio set work fantastically well. :-)


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

Hi

 

just noticed that when i choose radio-set but opt not to track quantity, the radio-set reverts back to a dropbox even though i want the radio-set

 

is this supposed to happen.. is it a built in default?

 

any advice is appreciated - thanks

Edited by chooch

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
Hi

 

just noticed that when i choose radio-set but opt not to track quantity, the radio-set reverts back to a dropbox even though i want the radio-set

 

is this supposed to happen.. is it a built in default?

 

any advice is appreciated - thanks

The design assumption was that no-stock options are add-ons of some sort so any option that you don't track stock for always displays as a drop-down. For example, if you have size and color you are tracking stock for and you also offer gift wrapping as an option. If you use the single radioset plugin you will get the size color combinations in a radioset and gift wrap yes/no as a dropdown. It makes more sense (at least in my mind) than size, color. giftwrap combinations in a single radioset.

Share this post


Link to post
Share on other sites
The design assumption was that no-stock options are add-ons of some sort so any option that you don't track stock for always displays as a drop-down.  For example, if you have size and color you are tracking stock for and you also offer gift wrapping as an option.  If you use the single radioset plugin you will get the size color combinations in a radioset and gift wrap yes/no as a dropdown.  It makes more sense (at least in my mind) than size, color. giftwrap combinations in a single radioset.

 

Aaaaa Haaaa, i see.

 

When you put it like that Ralph it makes sense for sure - there is a logic to it.

 

I am pretty sure i installed it correctly and was well happy but my low stock report has no products listed or atrtributes/quantities shown in: admin/stats_low_stock_attrib.php

 

can anyone please advise on where to look. i added the 4.2a code too.

 

i have the low stockreport link in the reports box and the link takes me the correct page but the stock doesn't show.

 

thanks

 

thanks


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

Hi, I am new to QTpro, but I plan to use it to keep track of product & product options inventory. My question is where on the storefront does it show the product inventory? And in the admin where does it show the QTpro options? I see OSC has built in inventory features, but I don't see where QTpro is displayed on either the user or admin side. Can someone point this out for me?

 

Also could someone provide a storefront URL that is using QTpro so I can see what it looks like on a live store?

 

Thanks

Tom

Share this post


Link to post
Share on other sites

Is anyone else getting a formatting problem with the product_info page? It seems that after this mod (4.2), all the boxes are along the left-side of the screen, and nothing is on the right. The "reviews / add to cart" aren't centered anymore, but shoved along the left-side now, with the manufacturer, order history, etc boxes all along the left-side...

 

Anyone seen this??

 

Patrick

Share this post


Link to post
Share on other sites
Is anyone else getting a formatting problem with the product_info page? It seems that after this mod (4.2), all the boxes are along the left-side of the screen, and nothing is on the right. The "reviews / add to cart" aren't centered anymore, but shoved along the left-side now, with the manufacturer, order history, etc boxes all along the left-side...

 

Anyone seen this??

 

Patrick

one ofthe pages you modify when using QTpro is product_info.php and you may have made an error copy and pasting.

 

add a default verson page of product_info.php and see what happens (or use a text diff program)


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

Never mind - finally found the cause to this problem (see post):

 

http://forums.oscommerce.com/index.php?sho...28entry668728

 

Is anyone else getting a formatting problem with the product_info page? It seems that after this mod (4.2), all the boxes are along the left-side of the screen, and nothing is on the right. The "reviews / add to cart" aren't centered anymore, but shoved along the left-side now, with the manufacturer, order history, etc boxes all along the left-side...

 

Anyone seen this??

 

Patrick

Share this post


Link to post
Share on other sites
http://www.graphicrats.com/store/womens-ta...ircle-p-86.html

here's a product, that as of today, has in stock and out of stock attributes.

 

 

So this QTpro doesn't actually show the exact remaining quantities for each product option? It just shows which options are out of stock?

 

How is this different from what OSC offers originally? Does the standard OSC inventory not break it down to an individual product options level?

 

Is there anything that will display the remaining product option inventory numbers?

 

Tom

Share this post


Link to post
Share on other sites
So this QTpro doesn't actually show the exact remaining quantities for each product option? It just shows which options are out of stock?
correct.

Or you can set it to hide the attributes that are out of stock.

i want my customers to be able to order anything i have in any size. if it is out of stock i can make one for them. I make everything i sell.

How is this different from what OSC offers originally? Does the standard OSC inventory not break it down to an individual product options level?
osc has no option to track attribute stock. load it up and look.
Is there anything that will display the remaining product option inventory numbers?
yes: your clever code that queries the database and posts that in a quantity box next to the attribute. AS SOON AS YOU DOWNLOAD QTPRO AND EDIT IT FOR US TO DO THIS. :D

Share this post


Link to post
Share on other sites
correct.

Or you can set it to hide the attributes that are out of stock.

i want my customers to be able to order anything i have in any size. if it is out of stock i can make one for them. I make everything i sell.

osc has no option to track attribute stock. load it up and look.yes: your clever code that queries the database and posts that in a quantity box next to the attribute. AS SOON AS YOU DOWNLOAD QTPRO AND EDIT IT FOR US TO DO THIS.  :D

 

 

So can customers still order products that QTpro labels as 'out of stock'? And is there any way or place to add a note that says when out of stock items will be available?

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

×