Jump to content



Photo
- - - - -

Quickly Update Product Stock


  • Please log in to reply
184 replies to this topic

#61   buckman

buckman
  • Members
  • 3 posts
  • Real Name:toni
  • Gender:Male
  • Location:Porto Cristo, Spain

Posted 06 February 2008 - 23:05

I'm having the same problem here, does anybody know how to fix this?
Thanks


First, sorry for my english, now go to the solution:
I had the same problem, but I have the solution. The problem is when the servers run MySql 5, on MySql 4.xx works perfect.

Well, you must add this code at line 87 in the quick_stockupdate.php file:
$stock_update=$_POST['stock_update'];

The result must be something like this:

If you want download the contribution fixed I upload an update here: http://addons.oscommerce.com/info/3542

Bye

Edited by buckman, 06 February 2008 - 23:09.


#62   go2pub

go2pub
  • Members
  • 109 posts
  • Real Name:Nigel
  • Gender:Male
  • Location:Enniskillen, N. Ireland

Posted 06 July 2008 - 14:14

Using the fix above we've managed to get rid of the error messages generated after changing to php5 and mysql5. The problem now is that the actual database update will only work on categories with only a small number of products. On categories with over about 40 products it doesn't update and just goes back the the top start page where you select your category.
Really strange problem, and I've no idea how to solve it, any help appreciated.

Nigel

#63   diy

diy
  • Members
  • 354 posts
  • Real Name:kosmas
  • Gender:Male

Posted 06 November 2008 - 15:43

I downloaded the last file from

http://addons.oscommerce.com/info/558

which does not include the fix above which is included (?) here http://addons.oscommerce.com/info/3542
Besides the instructions language an the fix are the the contributions different??

The fix above solves the line 90 problem and I dont see the problem that go2pub refers to (ok I have a lot of prods but less than 40 )

#64   tylerd213

tylerd213
  • Members
  • 4 posts
  • Real Name:Tyler

Posted 13 November 2008 - 04:08

I tried these updates and im still recieving the Line 90 error. I then downloaded the latest file which supposedly fixed the line 90 error, and when I go to load the quick stock updater it wont even let me and gives me a Parse error, unexpexted ';' on line 166

Any help would be much appreciated! Thanks!

#65   azrin_aris

azrin_aris
  • Members
  • 34 posts
  • Real Name:Azrin Aris

Posted 01 December 2008 - 02:19

I've uploaded a new version which I think might have solved the problem. Give it a try and let me know of it.

Cheers.

#66   PiLLaO

PiLLaO
  • Members
  • 156 posts
  • Real Name:Gustavo

Posted 01 December 2008 - 21:44

hello

Would it be possible to list all the products from a manufacturer to implement the price increase for all its products, or you can only go category by category?

Thank you

I feel sorry for my bad English, I used the translator of google:)

#67   Ariffshah

Ariffshah
  • Members
  • 67 posts
  • Real Name:Noor Ariffshah
  • Gender:Male
  • Location:Kuala Lumpur

Posted 05 December 2008 - 16:37

Hello,

I using the Quick-Stock-Updater V3.0. The problem I had is when I want to update the price (I have about 200+ products), it seems reject after i update. Anybody know what happen?

Thank you

Edited by Ariffshah, 05 December 2008 - 16:37.


#68   dinmc

dinmc
  • Members
  • 50 posts
  • Real Name:Lars

Posted 09 December 2008 - 07:10

Hi,

I setup the version 3.1 and everything looks OK until I press "Quick-Stock-Updater" in the Admin Catalog menu, then I get this error. I'm using OSC 2.2MS i danish. I added information in the danish laungege file - but I try to change to english, but I get the same failure


" Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /var/www/www.dinmc.dk/www/catalog/admin/quick_stockupdate.php:13) in /var/www/www.dinmc.dk/www/catalog/admin/includes/functions/sessions.php on line 67

Any good hints how to solve this. By the way - I have more than 1300 partnumbers in the shop - will this be a problem??

Regards
Lars

#69   azrin_aris

azrin_aris
  • Members
  • 34 posts
  • Real Name:Azrin Aris

Posted 10 December 2008 - 02:11

Hi,

I setup the version 3.1 and everything looks OK until I press "Quick-Stock-Updater" in the Admin Catalog menu, then I get this error. I'm using OSC 2.2MS i danish. I added information in the danish laungege file - but I try to change to english, but I get the same failure


" Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /var/www/www.dinmc.dk/www/catalog/admin/quick_stockupdate.php:13) in /var/www/www.dinmc.dk/www/catalog/admin/includes/functions/sessions.php on line 67

Any good hints how to solve this. By the way - I have more than 1300 partnumbers in the shop - will this be a problem??

Regards
Lars


Hi Lars,

For the language, what you have to do is just create a language directory under includes/languages/ - e.g 'include/languages/danish', than copy include/languages/english/quick_stockupdate.php to that new direactory and edit the new copied file according to your language.

For 1300 part numbers, i think it really depends on the server itself. I added the server load checking because I had a web server that is very busy (slow /huh.gif' class='bbc_emoticon' alt=':huh:' /> ) I also added a small variable to each item if they are edit - so only items that are edited will be updated instead of all items like in the previous version. I'm still thinking of how to update the data in one single call rather than looping through the items. Any ideas anyone?

As for you problem, I have no clue at this moment - sorry.

Good luck

Azrin

#70   azrin_aris

azrin_aris
  • Members
  • 34 posts
  • Real Name:Azrin Aris

Posted 10 December 2008 - 02:16

Hello,

I using the Quick-Stock-Updater V3.0. The problem I had is when I want to update the price (I have about 200+ products), it seems reject after i update. Anybody know what happen?

Thank you


Hi Ariffshah,

Try the V3.1. I have added quite a bit of new codes in it.

#71   azrin_aris

azrin_aris
  • Members
  • 34 posts
  • Real Name:Azrin Aris

Posted 12 December 2008 - 03:50

Hi Lars,

For the language, what you have to do is just create a language directory under includes/languages/ - e.g 'include/languages/danish', than copy include/languages/english/quick_stockupdate.php to that new direactory and edit the new copied file according to your language.

For 1300 part numbers, i think it really depends on the server itself. I added the server load checking because I had a web server that is very busy (slow /huh.gif' class='bbc_emoticon' alt=':huh:' /> ) I also added a small variable to each item if they are edit - so only items that are edited will be updated instead of all items like in the previous version. I'm still thinking of how to update the data in one single call rather than looping through the items. Any ideas anyone?

As for you problem, I have no clue at this moment - sorry.

Good luck

Azrin


Hi Lars,

Try to move these code starting from line 13:

<script TYPE="text/javascript">
<!--
function changed(a){
var allElements = document.getElementsByName(a);

for (var i=0; i < allElements.length; i++) {
allElements[i].value = 1;
}

}
//-->
</SCRIPT>

and find

<script language="javascript" src="includes/general.js"></script>

move it just below this code.


HTH

Azrin

#72   azrin_aris

azrin_aris
  • Members
  • 34 posts
  • Real Name:Azrin Aris

Posted 12 December 2008 - 19:40

Hi Guys,


Just uploaded a new version V3.2. Some changes in updating method. I create a tmp SQL file and use another script to import the sql text file. It seems to be much faster (observed from my server). I updated 157 items in just 0.0013 secs. /smile.gif' class='bbc_emoticon' alt=':)' />

Please create a tmp directory under your catalog directory - e.g /catalog/tmp and set permission to 777

But if you cannot create the directory, you can change the directory defination (QUICK_DIR_TEMP) in /admin/include/languages/english/quick_stockupdate.php

Please let me know how it works for your site

Cheers,

Azrin

Edited by azrin_aris, 12 December 2008 - 19:43.


#73   azrin_aris

azrin_aris
  • Members
  • 34 posts
  • Real Name:Azrin Aris

Posted 16 December 2008 - 05:05

Hi Guys,

New Version V3.5

Add Quick Stock Updater Configuration page (Configuration->Quick Stock Updater)
- Enable/Disable Add to stock option (value entered in 'New Stock' will be added to existing stock - Default = Enable)
- Enable/Disable Update Process time (Default = Enable)
- Set Max input character for 'Model' field (Default = 8)
- Set Max input character for 'Weight' field (Default = 4)
- Set Max input character for 'New Stock' field (Default = 4)
- Set Max input character for 'Proce' field (Default = 6)
- Set decimal point for 'Price' field (Default = 2)

Import QuickStock_sql_install.sql using phpMyAdmin or use Run SQL From Admin add-on (http://www.oscommerc...tributions,4567) for configuration page.

Configuration page can be access via "Configuration->Quick Stock Updater"

p/s Lars, now the input max size is changeable and you can change the behavior of New stock input /smile.gif' class='bbc_emoticon' alt=':)' />

HTH

#74   s e r e n i t y

s e r e n i t y
  • Members
  • 30 posts
  • Real Name:Ryan

Posted 16 December 2008 - 05:47

Hey Azrin,

Looks like a fantastic contrib and im trying to install it now (v3.5) and i get a long string of repeating errors when i got to config; quick-stock-updater -


Warning: reset() [function.reset]: Passed variable is not an array or object in /home/ryanscom/public_html/catalog/adminl/quick_stockupdate.php on line 106

Warning: Variable passed to each() is not an array or object in /home/ryanscom/public_html/catalog/admin/quick_stockupdate.php on line 107


Any solution? I'm pretty sure everything has been set-up properly.

Thanks,
Ryan

#75   azrin_aris

azrin_aris
  • Members
  • 34 posts
  • Real Name:Azrin Aris

Posted 16 December 2008 - 15:10

Hey Azrin,

Looks like a fantastic contrib and im trying to install it now (v3.5) and i get a long string of repeating errors when i got to config; quick-stock-updater -


Warning: reset() [function.reset]: Passed variable is not an array or object in /home/ryanscom/public_html/catalog/adminl/quick_stockupdate.php on line 106

Warning: Variable passed to each() is not an array or object in /home/ryanscom/public_html/catalog/admin/quick_stockupdate.php on line 107


Any solution? I'm pretty sure everything has been set-up properly.

Thanks,
Ryan


Hmm that's strange.... what version of php are you using?

BTW please try this

find: (line 138)

while ($manufacturers = tep_db_fetch_array($manufacturers_query)) {
		  $manufacturers_array[$manufacturers['manufacturers_id']] = $manufacturers['manufacturers_name'];
	  }

add above it

$manufacturers_array[] = array();

Please let me know of its outcome. If it is ok I will update the code.

Edited by azrin_aris, 16 December 2008 - 15:23.


#76   s e r e n i t y

s e r e n i t y
  • Members
  • 30 posts
  • Real Name:Ryan

Posted 16 December 2008 - 22:59

The allowed me to access quick stock update without any dramas. However when I enter new stock this follow error comes up.[codebox]Warning: fopen() [function.fopen]: Unable to access /home/ryanscom/public_html/catalog/tmp/qs_update.sql in /home/ryanscom/public_html/catalog/admin/quick_stockupdate.php on line 234

Warning: fopen(/home/ryanscom/public_html/catalog/tmp/qs_update.sql) [function.fopen]: failed to open stream: No such file or directory in /home/ryanscom/public_html/catalog/admin/quick_stockupdate.php on line 234

Warning: fopen() [function.fopen]: Unable to access /home/ryanscom/public_html/catalog/tmp/debug.sql in /home/ryanscom/public_html/catalog/admin/quick_stockupdate.php on line 269

Warning: fopen(/home/ryanscom/public_html/catalog/tmp/debug.sql) [function.fopen]: failed to open stream: No such file or directory in /home/ryanscom/public_html/catalog/admin/quick_stockupdate.php on line 269[/codebox]

Edited by s e r e n i t y, 16 December 2008 - 23:02.


#77   azrin_aris

azrin_aris
  • Members
  • 34 posts
  • Real Name:Azrin Aris

Posted 18 December 2008 - 00:09

The allowed me to access quick stock update without any dramas. However when I enter new stock this follow error comes up.

Warning: fopen() [function.fopen]: Unable to access /home/ryanscom/public_html/catalog/tmp/qs_update.sql in /home/ryanscom/public_html/catalog/admin/quick_stockupdate.php on line 234Warning: fopen(/home/ryanscom/public_html/catalog/tmp/qs_update.sql) [function.fopen]: failed to open stream: No such file or directory in /home/ryanscom/public_html/catalog/admin/quick_stockupdate.php on line 234Warning: fopen() [function.fopen]: Unable to access /home/ryanscom/public_html/catalog/tmp/debug.sql in /home/ryanscom/public_html/catalog/admin/quick_stockupdate.php on line 269Warning: fopen(/home/ryanscom/public_html/catalog/tmp/debug.sql) [function.fopen]: failed to open stream: No such file or directory in /home/ryanscom/public_html/catalog/admin/quick_stockupdate.php on line 269


Please make sure your tmp has all the correct permission. Please chmod tmp to 777

#78   s e r e n i t y

s e r e n i t y
  • Members
  • 30 posts
  • Real Name:Ryan

Posted 18 December 2008 - 00:26

where exactly can I find tmp?

#79   s e r e n i t y

s e r e n i t y
  • Members
  • 30 posts
  • Real Name:Ryan

Posted 18 December 2008 - 00:36

I found the tmp folder and changed permissions to 777. Still the same error comes up.

Perhaps I'm doing something wrong?

#80   lyonsperf

lyonsperf
  • Members
  • 333 posts
  • Real Name:Matt
  • Gender:Male
  • Location:CT

Posted 19 December 2008 - 18:59

I downloaded the latest version and it works great! I had one question. Can I add a column for vendor price and product cost? If so how and where in the code?
Thanks
Matt
If the only tool you have is a hammer, all your problems look like nails