Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Quickly Update Product Stock


homewetbar

Recommended Posts

  • Replies 185
  • Created
  • Last Reply

Top Posters In This Topic

Thanks for trying to help, the server uses already 60secs timeout.

I have my hosting company to look at it.

 

That's probably the best. Whenever I come across a strange problem I call my host and they check error logs that I can't access. Then they either tell me what and how to fix it or they do it for me.

 

Good luck ;)

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

Hello all,

 

Just thought I'd pass on a 'bug fix' I found the other day when fiddling about with this great contrib. It's not really a bug, but some people may find the following useful.

 

If, like me, you have a shop which doesn't have Manufacturers, the corresponding Manufacturers drop down list will be blank/Null. If you're running STRICT mode on MySQL, quick_stock will report that it has updated the item(s) (i.e. the stock number), but not actually run the script.

 

As far as I can work out MySql in Strict Mode doesn't like running an SQL statement with a NULL or empty value for the Manufacturer field. I added the following code

if ($items['manufacturer'] == '') {$items['manufacturer']=0;}

 

before the $sql variable is defined (somewhere round about line 377)

 

Of course, the other alternative is to have a dummy manufacturer.

 

Cheers

Link to comment
Share on other sites

  • 2 weeks later...
Hello all,

 

Just thought I'd pass on a 'bug fix' I found the other day when fiddling about with this great contrib. It's not really a bug, but some people may find the following useful.

 

If, like me, you have a shop which doesn't have Manufacturers, the corresponding Manufacturers drop down list will be blank/Null. If you're running STRICT mode on MySQL, quick_stock will report that it has updated the item(s) (i.e. the stock number), but not actually run the script.

 

As far as I can work out MySql in Strict Mode doesn't like running an SQL statement with a NULL or empty value for the Manufacturer field. I added the following code

if ($items['manufacturer'] == '') {$items['manufacturer']=0;}

 

before the $sql variable is defined (somewhere round about line 377)

 

Of course, the other alternative is to have a dummy manufacturer.

 

Cheers

 

 

Thanks for the bug fix, I'll look into it. BTW, I have release a new version 3.8. but your bugfix is not in yet. Will put it in the next release

 

Cheers

Azrin

Edited by azrin_aris
Link to comment
Share on other sites

Found a bug

I'm using this configuration for Currency Localization :

Decimal point : ,

Thousand point : .

 

When I update the price, the price went wrong. for example original price was 10000 it shows 10,000 in quick updater.

I update the stock, leave the price as it is. when i check the store, the price is 10, back to the updater, yup it's a 10.

I dont know a thing about php. To work this out i set the decimal and thousand point back to default.

 

Thx for this Azrin, its great.

 

 

Hi Ferdi, please test the new release. I think i got it fixed.

 

thanks for pointing this out.

 

Cheers

Azrin

Link to comment
Share on other sites

Hi (agian),

 

Just been testing it out. It seems to only want to update selective products, some items it refuses to change, but with others. no problems at all.

 

No clue why.

 

 

Hi Mike,

 

The reason why it is not updating is because there are errors in the sql statements that are not properly capture (sorry :( ) please try the v3.8 and let me know if you still have the same problem

 

Cheers

 

Azrin

Link to comment
Share on other sites

Hi,

 

Great Mod firstly :D

 

Is there any chance of getting a column which has the prices including taxes? or just have a toggle option so we can select which prices we want to see.

 

Cheers,

Mike

 

 

Hi Mike,

 

Can you please explain more about this feature?

 

Cheers

Azrin

Link to comment
Share on other sites

So far with my testing all is working great.

I can sort by Manufacturers or Categories, change the weight, price, qty and status of products quickly.

I can change the status of my products to show "On Backorder" simply by subtracting the QTY (In Stock = 3 / New Stock = -3). I have the function of the show sold out contribution setup so when stock qty reaches zero it shows On Backorder, when I change the status to not-active it removes the product from the catalog view.

 

The Active/Inactive is suppose to take the items in/out of the store. To set Back Order or Sold out, set Qtty to 0. :)

 

 

The only thing I changed was the sort order from product name to product model.

I don't really have a need for the feature of being able to change the model number or category from the page. But it might come in handy in the future if I need to re-organize my site.

 

I'm working on this feature - so we can sort on any colum :D

 

 

I like how it displays the product ID. Would it be difficult to add the category ID next to it?

 

I've added this feature but with a bit of twist - hover you mouse over the selection box and it will show you the category :). Let me know if I got this wrong

 

I have a couple of weeks free time untill 24 of May.... yay!!!

Link to comment
Share on other sites

The Active/Inactive is suppose to take the items in/out of the store. To set Back Order or Sold out, set Qtty to 0. :)

Oop's, that's kind of how I meant I do it. Qty = 0 = Back Order, Status = Inactive = Not listed in catalog. :blush:

 

I'm working on this feature - so we can sort on any colum :D

That would be nice. Right now I'm happy with sorting by the model number, it works LOL.

 

I've added this feature but with a bit of twist - hover you mouse over the selection box and it will show you the category :) . Let me know if I got this wrong

Perfect! Thanks a million. ;)

 

I have a couple of weeks free time untill 24 of May.... yay!!!

Hope you get to enjoy some sunshine and fun, not just coding. B)

 

 

I just ran the uninstall SQL, ran the new install SQL (probably didn't need too).

Checked all files for updates, were none except replacing the admin files (quick_stockupdate.php, quick_stockupdate.css and english > quick_stockupdate.php).

 

I haven't tried updating any products yet, will work on that a bit later.

 

I'm experiencing what seems to be a couple of glitches.

 

When I select "Search by - Manufacturer", I get one product that shows automatically (first alphanumerical - AMT/608). Could live with that, no biggy.

 

But once I select a Manufacturer, the Category column is greyed out and can't be selected. Is that supposed to function that way?

 

I appreciate all the work and effort you're putting into this great contribution, BIG thanks Azrin :D

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

I'm experiencing what seems to be a couple of glitches.

 

When I select "Search by - Manufacturer", I get one product that shows automatically (first alphanumerical - AMT/608). Could live with that, no biggy.

 

I'll look into it, but I did not get the error though.

 

But once I select a Manufacturer, the Category column is greyed out and can't be selected. Is that supposed to function that way?

 

I had a problem when a same product is copied into multiple categories, it gives you some weird behavior. I've made some modification on the coming version.

 

I'm working on a new major upgrade and rename the mod to Quick Store Manager v 0.1.1. I had 2 modules working now - the Original Quick Stock Updater and a new Quick Price Updater. The Price update is very useful if you use SPPC. Do you want to test it for me?

 

There will be a total of 4 modules:

 

1. Stock Updater

- this is the original Quick Stock Updater

 

2. Price Updater

- quickly update SPPC pricing - price can be updated using the same selection criteria (finalizing the code :D)

 

3. Cost Updater

- this feature was requested sometime ago and I also need it now ;) - cost+shipping+tax+markup = retail price

4. Stock Reorder

- products are assigned to suppliers and reorder list si displayed. this will make easier to create purchase order to different supplier. But this would take some time as new database need to be created

Link to comment
Share on other sites

I'll look into it, but I did not get the error though.

Like I said, it's no big problem for me. I just thought it was kind of weird. :rolleyes:

 

 

 

I had a problem when a same product is copied into multiple categories, it gives you some weird behavior. I've made some modification on the coming version.

Humm, I don't have any products copied to any other categories. I thought it was kind of strange that in 3.7 each product categories drop down was selectable but now it's not. :huh:

 

The Price update is very useful if you use SPPC. Do you want to test it for me?

Ooch... I don't use SPPC. I'm also working with my live site... I know, a BIG NO, NO. :blush: But I've had problems recently with my PC and dumped Windows Server, XXAMP and a bunch of other database programs my professor had us install. Now I'm back to running normal again.

 

There will be a total of 4 modules:

 

1. Stock Updater

- this is the original Quick Stock Updater

 

2. Price Updater

- quickly update SPPC pricing - price can be updated using the same selection criteria (finalizing the code :D )

 

3. Cost Updater

- this feature was requested sometime ago and I also need it now ;) - cost+shipping+tax+markup = retail price

4. Stock Reorder

- products are assigned to suppliers and reorder list si displayed. this will make easier to create purchase order to different supplier. But this would take some time as new database need to be created

 

WOW sounds like you're real busy. I'm good with just the Quick Stock Updater. ;)

 

So far it's been simple to keep track of things (even in the store). My osC site doesn't subtract product quantities.

I use zero to equal back ordered (I don't have it and neither does any of my distributors).

One product in stock equals a discontinued product (which shows on the site). Example

My distributors have either an updated Access or Excel file for me weekly which shows current stock and MSRP.

I link them to my database and spreadsheet which calculates my cost and then adds percentage markup for my selling price.

All I need to do is use your Quick Stock Updater to make changes to price and availability.

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

not to worry Jim... I'm doing this for myself too ;)

 

Thanks... That's cool. Wish I new enough PHP to write my own mods.

- :: Jim :: -

- My Toolbox ~ Adobe Web Bundle, XAMPP & WinMerge | Install ~ osC v2.3.3.4 -

Link to comment
Share on other sites

  • 4 weeks later...

hi,

 

I just upgraded from 3.6 to 3.8.1 wonderful change!

 

Would it be possible to leave the default language other than English? For those who are using another language :)

 

Thank you very much for everything

Link to comment
Share on other sites

Hi,

 

This is a great contri, thanks!!

 

But I also have the same problem as mentioned below. Did you have time to look into it?

 

Also default langauge other then English would be great.

 

Thanks,

Martin.

 

 

Found a bug

I'm using this configuration for Currency Localization :

Decimal point : ,

Thousand point : .

 

When I update the price, the price went wrong. for example original price was 10000 it shows 10,000 in quick updater.

I update the stock, leave the price as it is. when i check the store, the price is 10, back to the updater, yup it's a 10.

I dont know a thing about php. To work this out i set the decimal and thousand point back to default.

 

Thx for this Azrin, its great.

Link to comment
Share on other sites

  • 4 weeks later...
Hi,

 

This is a great contri, thanks!!

 

But I also have the same problem as mentioned below. Did you have time to look into it?

 

Also default langauge other then English would be great.

 

Thanks,

Martin.

 

QUOTE (hanoman77 @ Feb 22 2009, 11:03 PM) *

Found a bug

I'm using this configuration for Currency Localization :

Decimal point : ,

Thousand point : .

 

When I update the price, the price went wrong. for example original price was 10000 it shows 10,000 in quick updater.

I update the stock, leave the price as it is. when i check the store, the price is 10, back to the updater, yup it's a 10.

I dont know a thing about php. To work this out i set the decimal and thousand point back to default.

 

Thx for this Azrin, its great.

 

Test this:

 

eliminate format_number and unformat_number into admin/quick_stockupdate.php

 

replace:

 

	   <td class="dataTableContent" align="center"><input type="text" size="<?php echo QUICK_STOCK_PRICESIZE ?>" name="stock_update[<?php	 echo $results['products_id'] ?>][price]" value="<?php echo number_format($results['products_price'],QUICK_STOCK_PRICEDEC,'.',','); ?>" onChange="<?php echo $doChange?>" onBlur="<?php echo $doValidate_flt?>"></td>

 

by:

<td class="dataTableContent" align="center"><input type="text" size="<?php echo QUICK_STOCK_PRICESIZE ?>" name="stock_update[<?php	 echo $results['products_id'] ?>][price]" value="<?php echo $results['products_price'] ?>" onChange="<?php echo $doChange?>" onBlur="<?php echo $doValidate_flt?>"></td>

 

AND

 

replace:

  $items_price = number_unformat($items['price']);

by:

 $items_price = $items['price'];

 

For my work fine. Rights for you?

Link to comment
Share on other sites

hi,

 

I just upgraded from 3.6 to 3.8.1 wonderful change!

 

Would it be possible to leave the default language other than English? For those who are using another language :)

 

Thank you very much for everything

 

 

Hi,

 

This is a great contri, thanks!!

 

But I also have the same problem as mentioned below. Did you have time to look into it?

 

Also default langauge other then English would be great.

 

Thanks,

Martin.

In my case (only english and spanish) changing this:

	while (list($key, $value) = each ($languages_list)) {
	if($lang_id==$key){
	  $result .= '<option value="' . $key . '" selected="selected">' . $value . '</option>';
	} else {
	  $result .= '<option value="' . $key . '">' . $value . '</option>';
	}	}

by

	while (list($key, $value) = each ($languages_list)) {
	if($lang_id==$key){
	  $result .= '<option value="' . $key . '">' . $value . '</option>';
	} else {
	  $result .= '<option value="' . $key . '" selected="selected">' . $value . '</option>';
	}	}

Spanish appears by default :)

 

Thanks for that contrib!!

Link to comment
Share on other sites

  • 1 month later...

Hi,

I have problem with this cont. :huh: The product list isn't display and also when I click "update" or I select category, I back to admin panel and I have to login <_< <_< , after that nothing change <_< .

 

 

Please can you help me... :blush:

Edited by jolie102003
Link to comment
Share on other sites

  • 2 weeks later...

I'm lovin' this contribution, thanks so much!!

This is the right tool for updating products quickly.

 

But I have a problem with the price update:

When I enter a category, the products will be listed.

The price is listed with 8 decimal places, which is what I need and want to have.

The correct price of a product is for example "1.00840336".

Now, I want to change the price for example to "1.26050420", so I entered that numbers to the price field.

As soon as I left the field with tab, the price is rounded with 2 decimal places and displayed "1.26".

But I still need 8 decimal places.

So, my first problem is, how to disable the function to round the price and keep 8 decimal places.

 

Now my second problem:

When I press the update button, the former shown price with "1.26" is updated in the database and shows up with "126.00".

So I think, here is an error with the "," or "." and the complete size of digits, the field is able to handle.

 

IMHO, the code line, responsible for that, is this one:

<td class="dataTableContent" align="right"><input type="text" size="<?php echo QUICK_STOCK_PRICESIZE ?>" style="text-align: right;" name="stock_update[<?php	 echo $results['products_id'] ?>][price]" value="<?php echo number_format($results['products_price'],QUICK_STOCK_PRICEDEC,'.',','); ?>" onChange="<?php echo $doChange?>" onBlur="<?php echo $doValidate_flt?>"></td>

But I don't understand the full line of code, so I don't know what to change.

 

 

Hope I have given you enough information and hope, that someone of you experts can help me with these 2 problems.

Thanks for any help,

Regards

Andreas

 

PS: on my local system I have exact the same problem with the login as Jolie102003, so I'm look forward in solving that problem too.

The login appears as soon as a category is chosen, but the page appears with default settings after login again and again.

Edited by Andreas2003
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...