Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Quickly Update Product Stock


homewetbar

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

Link to comment
Share on other sites

  • 3 weeks later...
  • Replies 185
  • Created
  • Last Reply

Top Posters In This Topic

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 :-"

Link to comment
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)

==========

Link to comment
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

Link to comment
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..

==========

Link to comment
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

Link to comment
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

Link to comment
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

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

  • 4 weeks later...

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!

==========

Link to comment
Share on other sites

  • 1 month later...

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

Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

  • 4 weeks later...
  • 4 weeks later...

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!

Link to comment
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!

Link to comment
Share on other sites

  • 2 weeks later...

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!

Link to comment
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

Link to comment
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 ^.^;;

Link to comment
Share on other sites

  • 6 months later...
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");

Link to comment
Share on other sites

  • 5 months later...

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...