Jump to content



Photo
* * * * - 6 votes

[Contribution] QTpro - Quantity Tracking Professional


  • Please log in to reply
2154 replies to this topic

#2101   PhaseClone

PhaseClone
  • Members
  • 5 posts
  • Real Name:Chris

Posted 20 June 2013 - 18:59

@PhaseClone Nope, I'm wrong about what I just posted as a problem. It's not a problem, except for some of my items some of the time. They appear to have gotten their colors and sizes transposed on the stock display table and the menu.

#2102   PhaseClone

PhaseClone
  • Members
  • 5 posts
  • Real Name:Chris

Posted 02 July 2013 - 17:28

@twigster

try this:

edit your pad_base.php file:

FIND:

$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$this->products_id . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");

REPLACE WITH:

// Begin QT Pro 4.6.1 (sort by products options values id MOD) 7-2-13
	   $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$this->products_id . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pov.products_options_values_id");

/*
	    $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$this->products_id . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
*/
// End QT Pro 4.6.1 (sort by products options values id MOD) 7-2-13


The old code is still preserved in the system for you to restore if you need. Please note, this sorts the options by ID, so the order you put them into osCommerce becomes the order that osCommerce displays them.

#2103   Serghino

Serghino
  • Members
  • 2 posts
  • Real Name:Serge Bouwens

Posted 08 July 2013 - 14:25

Most of time I'm able to solve issues but in this case I realy cannot figure out what is wrong. I have Qtpro for Osc2.3 installed and are having problems with updating stock. To make it more interesting: I can update stock from my own internet connection, from any device but when connected to any other internet option/location with any device (even devices used on my own network on which it works) I get the below error. This happens on 2 website (same domain); One is OSC 2.2, the other 2.3.3...both on PHP 5.2.
Warning: sort() expects parameter 1 to be array, null given in /home/xxx/domains/xxx/public_html/catalog/admin/stock.php on line 69
Warning: join() [function.join]: Invalid arguments passed in /home/xxx/domains/xxx/public_html/catalog/admin/stock.php on line 70
Above resulting in messy rows in the products_stock db.

if ($HTTP_SERVER_VARS['REQUEST_METHOD']=="GET") {
$VARS=$_GET;
} else {
$VARS=$_POST;
}
if ($VARS['action']=="Add") {
$inputok = true;
if (!(is_numeric($VARS['product_id']) and ($VARS['product_id']==(int)$VARS['product_id']))) $inputok = false;
while(list($v1,$v2)=each($VARS)) {
if (preg_match("/^option(\d+)$/",$v1,$m1)) {
if (is_numeric($v2) and ($v2==(int)$v2)) $val_array[]=$m1[1]."-".$v2;
else $inputok = false;
}
}
if (!(is_numeric($VARS['quantity']) and ($VARS['quantity']==(int)$VARS['quantity']))) $inputok = false;
if (($inputok)) {
sort($val_array, SORT_NUMERIC);
$val=join(",",$val_array);

The last 2 lines above are 69 and 70.
Does anyone have any idea what the issue could be?

#2104   pheludar

pheludar
  • Members
  • 25 posts
  • Real Name:sss sss

Posted 23 July 2013 - 01:55

Hi
Iam having a problem as follows:
i was trying to install tghe jax update price module and saw that the relevant codes are removed by this module in product_info,php

basically if someone selects 4mb 50.00 / 8mb 200.00 then the product price should get updated in this page withe the resepctive values getting added to the product price.

how can i get this?

#2105   twigster

twigster
  • Members
  • 15 posts
  • Real Name:Mike
  • Location:Luton england

Posted 15 August 2013 - 18:14

@twigster



I know from looking at pad_multiple_dropdowns that the system loops through individual queries to build a set of results (see my recent post). Each query it runs is just ONE combination of attributes, like "RED / SMALL," so I'm guessing the only way to influence the ordering of the options would be to figure out a way to get the option sort column into a query of all the options before you run anything else. Then you would need to use "ORDER BY" in SQL to control sorting order. Then you would run a "for..next" loop covering the range of numbers covered in your sort column.

Then on each loop, you could add the sort column's value to the "WHERE" clause of the query, getting you the rows in order.

Unfortunately, since I'm so new to this, I can't tell you exactly how you're going to do that, but if you know some SQL, you should be able to get it.


@twigster

try this:

edit your pad_base.php file:

FIND:

$products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$this->products_id . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");

REPLACE WITH:

// Begin QT Pro 4.6.1 (sort by products options values id MOD) 7-2-13
	 $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$this->products_id . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "' order by pov.products_options_values_id");

/*
	 $products_options_query = tep_db_query("select pov.products_options_values_id, pov.products_options_values_name, pa.options_values_price, pa.price_prefix from " . TABLE_PRODUCTS_ATTRIBUTES . " pa, " . TABLE_PRODUCTS_OPTIONS_VALUES . " pov where pa.products_id = '" . (int)$this->products_id . "' and pa.options_id = '" . (int)$products_options_name['products_options_id'] . "' and pa.options_values_id = pov.products_options_values_id and pov.language_id = '" . (int)$languages_id . "'");
*/
// End QT Pro 4.6.1 (sort by products options values id MOD) 7-2-13


The old code is still preserved in the system for you to restore if you need. Please note, this sorts the options by ID, so the order you put them into osCommerce becomes the order that osCommerce displays them.




I originally used an asort(); function to order the attributes in the pad_single_radioset.php which worked ok.

However, the pad_base update above works perfectly for both radio buttons and drop downs no need for the asort()

thanks PhaseClone top notch answer :)

#2106   satinwoods

satinwoods
  • Members
  • 51 posts
  • Real Name:Jeff

Posted 15 September 2013 - 19:21

This is a great mod and works great for me. I would like one option though.

When I add a new attribute, I would like to have it default the quantity to 1. Is there anyway for me to do this?

#2107   vourlismenos

vourlismenos
  • Members
  • 39 posts
  • Real Name:Dimitris
  • Gender:Male
  • Location:Greece

Posted 13 October 2013 - 21:35

I'm using qtpro with oscommerce 2.3 (and ajax attribute manager)

Everything works fine, but in case I delete an order, the "restock product" option is not working. The product remains "not published"

Also when I receive the order and go to the "orders" in the admin side, I get a qtpro warning "Warning: There are 1 sick products in the database. Please visit the QTPro doctor." related to the product that is ordered
If I go to the qtpro doctor I get this:

The stock quantity summary is NOT ok
This means that the current summary of this products quantity, which is in the database, isn't the value we get if we calculates it from scratch right now.
The current summary stock is: 0
If we calculates it we get: 1

The options stock is ok
This means that the database entries for this product looks the way they should. No options are missing in any row. No option exist in any row where it should not.
Total number of stock entries this product has: 1
Number of messy entries: 0


The attribute quantity remains for some reason?

I suppose that both problems are related because when I delete the order, the qtpro warning dissapears but the product remains out of stock and stays unpublished

Have I missed something in the installation or is there something else wrong? Any ideas?

#2108   misfitsbodypiercing

misfitsbodypiercing
  • Members
  • 15 posts
  • Real Name:sam

Posted 14 October 2013 - 20:12

I've put QTpro addon on, and im testing with one product - but i can't seem to set individual quantities on the osCommerce admin - and i also can't see the actual product on my page

www.misifitsbodypiercing.co.uk/catalog

anyone help?

#2109   gasan

gasan
  • Members
  • 8 posts
  • Real Name:Gaston Arenares
  • Gender:Male

Posted 23 October 2013 - 21:25

I am running 2.3.3.4 and have installed QTPro 4.6.1. All works fine but options of products appears twice. The second "option" works fine. How can I solve this issue?
Here is how it looks:

Attached Files


Edited by gasan, 23 October 2013 - 21:40.


#2110   Miroku

Miroku
  • Members
  • 14 posts
  • Real Name:mike

Posted 25 October 2013 - 11:59

Hi guys,
I have installed QTpro 4.6.1 on OsCommerce 2.3. I add attributes with stock to a specific product with success. The problem occurs when i delete those attributes. The options are still shown in the stocks table in product_info.php although i deleted everything in admin/products attributes and admin/stocks.

Any ideas?

#2111   satinwoods

satinwoods
  • Members
  • 51 posts
  • Real Name:Jeff

Posted 04 November 2013 - 18:09

My attributes in the drop down are not sorting.

http://strutfashion....products_id=193

As you can see they're not in any order. Just in what order I added them.

I can't seem to figure it out!

#2112   vourlismenos

vourlismenos
  • Members
  • 39 posts
  • Real Name:Dimitris
  • Gender:Male
  • Location:Greece

Posted 12 November 2013 - 02:05

I see lot's of people have the same problem, with the attribute stock not subtracting while the actual stock does...

no definite solutions?

#2113   satinwoods

satinwoods
  • Members
  • 51 posts
  • Real Name:Jeff

Posted 27 November 2013 - 16:45

In qtpro_stock_table.php

Here is the original
$products_attributes_query = tep_db_query("SELECT pa.options_id, pa.options_values_id, pa.options_values_price, pa.price_prefix
		   FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa
		   WHERE pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'");

What I would like it to do is
$products_attributes_query = tep_db_query("SELECT pa.options_id, pa.options_values_id, pa.options_values_price, pa.price_prefix, pa.products_options_values_name
		   FROM " . TABLE_PRODUCTS_ATTRIBUTES . " pa
		   WHERE pa.products_id = '" . (int)$HTTP_GET_VARS['products_id'] . "'.
		   ORDER BY pa.products_options_values_name");

I'm not getting any errors, but its also not doing anything.

Help?

#2114   sinkerslingers

sinkerslingers
  • Members
  • 10 posts
  • Real Name:Jennifer Stanke

Posted 08 December 2013 - 04:55

I am having problems with the SQL portion of this add on and hope someone can help me since my web host cannot.

I cannot get the SQL file to import and I do not know what I am doing wrong.

I tried to do the SQL 1st, before the files, my web host was not able to import the file, the file is "incomplete". I don't see that as being the case if you are all using it.

When I first tried to import using import, it gave me an error. No table. Then I located a quary window that would take the copy and paste, it came back with lots of additional comments that tables did not exist.

My host said to use FTP and upload the file and they would install. So I installed FileZilla on my computer, uploaded the SQL file to that. Still error messages. I then uploaded the PHP files to FileManager on my host. My host has attempted to import the SQL again and still has an error. They keep telling me I need a new SQL file.

Can someone who has successfully imported the SQL please help me? I think I can finish once I get past this hurdle.

Thank you,

Jennifer

Edited by sinkerslingers, 08 December 2013 - 04:56.


#2115   sinkerslingers

sinkerslingers
  • Members
  • 10 posts
  • Real Name:Jennifer Stanke

Posted 11 December 2013 - 16:17

I am going to put this out there and hopefully someone can help me fix this. I have osCommrce 2.3.3 that I had previously installed add on sort_product_options_v1.1.0. I liked how this moved my options to the product page for adding.

I then tried adding QTPro v4.6.1. I wanted to track stock for some of the more difficult products we manufacture. I had the product.info.php error but my host seems to have fixed it for me and now I can see my product pages again.

However, my options are now gone. I am not finding them on the product add page or in the admin section.

I had 19 products with different quantities for options. Now these products lost the options.

Any help is appreciated.

Jennifer

#2116   PixelatedPanda

PixelatedPanda
  • Members
  • 2 posts
  • Real Name:Dan

Posted 17 January 2014 - 13:23

Hello Everyone,
I've got an issue that I just can't seem to track down.

I've installed QTPro 2.3.1 into osCommerce Online Merchant v2.3.3.4 as per http://addons.oscommerce.com/info/7786 using instructions contained.

The problem is that when I click on catalog > products attributes I just get a blank screen with no error messages or warnings.

I've restored the products_attributes.php from the install file and replaced it, re-edited again as per the instructions just in case I'd done something wrong and the same is happening again.

I don't know if this is relevant but when I paste the code from Step 11.3 into dreamweaver, it says there are a lot of syntax errors.

Anyone any ideas please?
Thanks

#2117   Serghino

Serghino
  • Members
  • 2 posts
  • Real Name:Serge Bouwens

Posted 18 March 2014 - 23:56

Last year I posted on this topic with a question regarding being unable to update tracked stock from all "ip-addresses" except my own. Didn't get any help though. Untill not a huge problem but guess what, my provider has changed my ip and now I'm also unable to update stock from the last location I could.

So in short...when updating (tracked) stock attributes...clicking "add" will give me the following error:

Warning: sort() expects parameter 1 to be array, null given in /home/xxx/domains/xxx/public_html/catalog/admin/stock.php on line 69
Warning: join() [function.join]: Invalid arguments passed in /home/xxx/domains/xxx/public_html/catalog/admin/stock.php on line 70

I used to be able to update it from my internet connection at home, say ip-address 1.2.3.4 (from any device, via Wlan/Lan whatever) but not from any other location/ip-address.

I suppose it has something to do with rights on the database or something but have no idea where to look for it. Especialy knowing the above ip-address part?!

Specs about the hosting and website
OSC 2.3.3
PHP 5.2
Mysql 5

I will be trying to run the site in a VM localy to see if the issue will still be there.

I hope someone had the same issue and solved it...Please help me?

#2118   rwood

rwood
  • Members
  • 20 posts
  • Real Name:Rob Wood

Posted 31 March 2014 - 00:14

Is this addon still being supported? I can't get it to work, and I've spent the entire weekend working on it.

My problem: Following this install instruction for Qtpro 4.6. for oscommerce 2.3.1:

admin/categories.php

Find

require('includes/application_top.php');

Add Beneath:

//++++ QT Pro: Begin Added code
//Create the product investigation for this product that are used in this page.
$product_investigation = qtpro_doctor_investigate_product($HTTP_GET_VARS['pID']);
//++++ QT Pro: End Added code


Causes Admin to crash with a blank page. It generates this error message in the error log:

PHP Fatal error: Call to undefined function qtpro_doctor_investigate_product() in /home/citywhee/public_html/dev/admin/stock.php on line 128

It looks like it should be reading the definition of the function in admin/includes/functions:

require('includes/functions/qtpro_functions.php');

But there is no line of code telling it to do so. Can anybody help?


Thanks,

Rob

Edited by rwood, 31 March 2014 - 00:15.


#2119   rwood

rwood
  • Members
  • 20 posts
  • Real Name:Rob Wood

Posted 31 March 2014 - 01:23

Cancel my request! I got it working - all but the PayPal Express token retrieval - it fails to get it, and therefore fails at checkout. Anybody have any ideas?

Thanks!

Rob

#2120   rwood

rwood
  • Members
  • 20 posts
  • Real Name:Rob Wood

Posted 31 March 2014 - 03:09

Nevermind. I found the culprit that was causing blank pages at login, registration, and checkout through PayPal Express. There's a conflict in the "Who's Online" code and QTPro. I commented out the calls to it, and everything works now.

Rob