Jump to content
homewetbar

Quickly Update Product Stock

Recommended Posts

Thanks, but I am not the author of this great MOD.


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

Hello there,

 

here is the fix for users, they not see the categories.

The problem is the sql-query, it ask for the language_id!

 

 

For German-USER!

Chance the code in quick_stockupdate.php on line around 102:

// first select all categories that have 0 as parent:
$sql = tep_db_query("SELECT c.categories_id, cd.categories_name from categories c, categories_description cd WHERE c.parent_id = 0 AND c.categories_id = cd.categories_id AND cd.language_id = 1");

 

to:

// first select all categories that have 0 as parent:
$sql = tep_db_query("SELECT c.categories_id, cd.categories_name from categories c, categories_description cd WHERE c.parent_id = 0 AND c.categories_id = cd.categories_id AND cd.language_id = 2");

 

 

For other USER:

Set the number on cd.lanuage_id = 1 to your language_id you use.

 

 

... and wuuuup, it runs ... :thumbsup:

 

Greets,

G?nter

 

Sorry for my "bad" english :-"

Share this post


Link to post
Share on other sites

I recently installed the new version, but I get the same null output. It's too bad it won't work on every shop.. :'(

this is a screenshot of what i get (i made the translations in romanian), but is the same thing..

stoc_update.jpg

 

(the resolution is small because of the file size)


==========

Share this post


Link to post
Share on other sites

Did you update your code as statedin post #27 above?


L8r,

PopTheTop

 

Published osC Contributions:

- eCheck Payment Module v3.1

- Reviews in Product Display v2.0

- Fancier Invoice & Packingslip v6.1

- Admin Notes / Customer Notes v2.2

- Customer Zip & State Validation v2.2

- Search Box with Dropdown Category Menu v1.0

 

Pop your camper's top today!

It's a popup thing...

You wouldn't understand

Share this post


Link to post
Share on other sites

well.. i figured it out. it seems that my romanian language had the id=4 (!!)

I changed that and every thing works fine now..

also I got rid off the model and weight columns, i don't really need them..

It'a a great contribution, congratulations..


==========

Share this post


Link to post
Share on other sites

Has anyone come across this issue. When I try load the page I get

 

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /homepages/18/d70773370/htdocs/thestorezone/admin/includes/languages/english/quick_stockupdate.php on line 18

 

Any help appreciated for what looks to be a great mod

Share this post


Link to post
Share on other sites
Has anyone come across this issue.  When I try load the page I get

Any help appreciated for what looks to be a great mod

 

Hi

 

Yes i got the same and just uploaded a corrected package in the contribution area.

 

The error is in the english language file whre you in line 18 have

define('QUICK_NAME', 'Name'');

Should be

define('QUICK_NAME', 'Name');

 

 

Christian

Share this post


Link to post
Share on other sites
The error is in the english language file whre you in line 18 have

define('QUICK_NAME', 'Name'');

Should be

define('QUICK_NAME', 'Name');

 

Ok great that fixed it but the typo I saw on mine was actually on line 17 where it had

 

define('QUICK_ID', 'ID''); #<------- Note second quote here rather than in name

define('QUICK_NAME', 'Name');

 

which I changed to

 

define('QUICK_ID', 'ID');

define('QUICK_NAME', 'Name');

 

Well spotted anyway and I saw you uploaded a fix to the contrib area.

 

Thanks

 

Nick

Share this post


Link to post
Share on other sites

It is probably easy but after looking over the code for quick stock updates I am clueless. I want to rearange the listing of the products info from:

 

Model, ID, Name, Weight, Price, in stock

 

to

 

Model, ID, Name, Price, Weight, in stock

 

also these items show up in black text which is not visible with my 003366 dark blue heading color.

 

Any help is appreciated.

 

If you are really experience with this mod, also is there a way to remove the edititable model box and just make the model appear like the name?

 

Thanks, Matt

Share this post


Link to post
Share on other sites

goeiemiddag,

 

Voor Nederlandse gebruikers: language_id op 4 zetten.

 

For dutch users, set languge_id to 4.

 

Great contribution, thanks a lot!

 

groeten,

Aldert

Share this post


Link to post
Share on other sites

I have a suggestion to make.

It will be great to add to this contribution an extra field - taxes.

I added a new tax for shipping and I have to take every single product to insert the new tax. It will be much easier with quick stock update!

Thanks!


==========

Share this post


Link to post
Share on other sites

It would also be great if you have a colum where we can change the prices included taxes. We make nice prices with taxes included so most of the time we chance te price excluded taxes, look at the included taxes price and change it to some nice figure. Now we have to do that with a calculator. Maybe one of you guys can fix this? :D

Share this post


Link to post
Share on other sites

I?m posting this in the forum instead of releasing a new package because it?s just a small fix for the language issue. There was a missing statement to set language id.

 

For the stockupdate work in any language you must add the following line:

 

FIND:

<br><form method="post" action="quick_stockupdate.php">
<?php

// first select all categories that have 0 as parent:
 $sql = tep_db_query("SELECT c.categories_id, cd.categories_name from categories c, categories_description cd WHERE c.parent_id = 0 AND c.categories_id = cd.categories_id AND cd.language_id = 1");

 

REPLACE FOR:

<br><form method="post" action="quick_stockupdate.php">
<?php

 $languages = tep_get_languages();
// first select all categories that have 0 as parent:
 $sql = tep_db_query("SELECT c.categories_id, cd.categories_name from categories c, categories_description cd WHERE c.parent_id = 0 AND c.categories_id = cd.categories_id AND cd.language_id = language_id = '" . (int)$languages_id . "'");

 

That should do it!

 

Claudio

Share this post


Link to post
Share on other sites

Is there anyway of modifying this great contrib to add a column to include the sort order if we have product sort order installed?

 

Does anyone know how?

Share this post


Link to post
Share on other sites

Installed V2.5 Quick Stock Update then attempted to run. At admin screen I see this code with is followed by 'Configuration' menu only / nothing else below or beside:

Parse error: parse error, unexpected '}' in /home/ossind/public_html/sales/admin/includes/boxes/catalog.php on line 30

In the catalog.php file I have:

                                   '<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a>');
          '<a href="' . tep_href_link(FILENAME_QUICK_STOCKUPDATE, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_QUICK_STOCKUPDATE . '</a><br>' .
 }

the last "}" is line 31

I have tried changing the last

'</a><br>'.

to look like this instead:

'</a>'

with no change in result.

This must be something so simple I'm going to smack myself but I can't seem to grasp it. Any help appreciated. This Contribution will be handy for me if I can get it running.

 

Thanks!

Share this post


Link to post
Share on other sites

uh oh, i probably should NOT have put real path there - umm thats a fake path, yeah yeah thats it. Moderator, would you delete that? Hackers - don't hurt me :blush: I can't edit my post.

Share this post


Link to post
Share on other sites

Installed V2.5 Quick Stock Update then attempted to run. At admin screen I see this code with is followed by 'Configuration' menu only / nothing else below or beside:

Parse error: parse error, unexpected '}' in /homepathtoosc/admin/includes/boxes/catalog.php on line 30

In the catalog.php file I have:

                                   '<a href="' . tep_href_link(FILENAME_PRODUCTS_EXPECTED, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_PRODUCTS_EXPECTED . '</a>');
          '<a href="' . tep_href_link(FILENAME_QUICK_STOCKUPDATE, '', 'NONSSL') . '" class="menuBoxContentLink">' . BOX_CATALOG_QUICK_STOCKUPDATE . '</a><br>' .
 }

the last "}" is line 31

I have tried changing the last

'</a><br>'.

to look like this instead:

'</a>'

with no change in result.

This must be something so simple I'm going to smack myself but I can't seem to grasp it. Any help appreciated. This Contribution will be handy for me if I can get it running.

 

Thanks!

Share this post


Link to post
Share on other sites

I have installed both the quick stock updater and the separate price per customer both work fine however the quick stock updater only lists the retail price not the trade price

 

any ideas how i can make it show both?

 

if not i have to go into each product to check the price

 

Please! someone... anyone........dont make me beg!

Share this post


Link to post
Share on other sites

Hi all

 

when you have 0 of number of Order of the default language of your web

then no show the categories drop-menu to select the categories to changed

The solution of changed the number in /admin/quick_stockupdate.php in the line 112: ".... AND cd.language_id = 1")" the 1 to 0 no work,

if you have Order:1 an you "..language_id = 1")" ..." yes,

and with other number too

but only with 0 no works.

 

 

any know how to resolve this?

 

thanks for this great contributions

Share this post


Link to post
Share on other sites

Getting an error when i hit Update

 

Warning: Variable passed to each() is not an array or object in /~path~/quick_stockupdate.php on line 90

 

Lines 90 Through 94

  while (list($key, $items) = each($stock_update)) {
  // update the quantity in stock
  $sql = "UPDATE products SET products_quantity = '".$items['stock']."', products_model = '".$items['model']."', products_price = '".$items['price']."', products_weight = '".$items['weight']."' WHERE products_id = $key";
  $update = tep_db_query($sql);
  $stock_i++;

 

Help ^.^;;

Share this post


Link to post
Share on other sites
Is there anyway of modifying this great contrib to add a column to include the sort order if we have product sort order installed?

 

Does anyone know how?

 

If you want to sort it differently than it is now, do the following:

 

/admin/quick_stockupdate.php

Find:

	  
$sql2 = tep_db_query("SELECT p.products_model, p.products_id, p. products_quantity, p.products_status, p.products_weight, p.products_price, pd.products_name from products p, products_to_categories ptc, products_description pd where p.products_id = ptc.products_id and p.products_id = pd.products_id and language_id = $languages_id and ptc.categories_id = '" . $HTTP_POST_VARS['cat_id'] . "' order by pd.products_name");

 

And change the end (ie. change order by pd.products_name) to order by any value that you wish, for example if you wish to make it sort my product's id, then change it to look like this:

$sql2 = tep_db_query("SELECT p.products_model, p.products_id, p. products_quantity, p.products_status, p.products_weight, p.products_price, pd.products_name from products p, products_to_categories ptc, products_description pd where p.products_id = ptc.products_id and p.products_id = pd.products_id and language_id = $languages_id and ptc.categories_id = '" . $HTTP_POST_VARS['cat_id'] . "' order by p.products_id");

Share this post


Link to post
Share on other sites

I am planning on using this contrib however I also use the SPPC contrib and would like to add 1 extra column for my dealer pricing.

 

Is there anyone who could point me in the right direction as to what I would need to add to the sql query????

 

Thanks

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

×