Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[CONTRIBUTION] QuickStockUpdate v1.0 [ADMIN TOOL]


mattice

Recommended Posts

Quick Stock Update v1.0 [2.2-CVS - ALL CHECKOUTS]

 

This stand-alone tool will allow you to update the stock on an entire category at once (on a per product basis).

An optional checkbox will set the products status based on the stock quantity for that product.

(so it is compatible for those of you that use the status_id field for other purposes)

 

Category browsing is done through dropdown boxes for each root category.

(If there are products in the root category it will include a dropdown with all the categories.)

 

Just one file to upload, no changes needed to osCommerce files.

Optional parameter to set the max products per row.

 

screenshot:

qsu_screenshot.jpg

 

Download:

http://www.oscommerce.com/downloads.php/co...ons,768/type,3/

 

 

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

Hi Mattice,

 

First of all, this contribution is great!

Easy to implement, immediatly works.

 

Second, i did a little rebuilding to make your contribution fit in column_left.php. Added the header.php, and footer.php to make it a little more of osC-style.

 

Third, i translated the file for our administration, but what needs to be implemented for a future release is the link with a additional php in de languages directories.

 

If you're ok with it, i can implement these (small) features and pass the update to you, or directly to osC.

Let me know what you think.

'Time is a social construction to make the transitoriness manageable'

Link to comment
Share on other sites

Just to let everybody know:

Vin? and I have contacted eachother ('gezellig' as we Dutch say :))

and a new version will be released shortly, offering the Admin-integrated AND stand-alone files in a single package.

Both versions will feature further improvements.

 

Regards,

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

Hello,

 

Do you know if it's easy to adapt your contribution/idea for updating prices instead stock? Or maybe two or three fields (for exaple, stock, prices and description...)

 

See you later!

 

Joan

joan@delaterra.net

www.delaterra.net

organic food in Catalonia

Link to comment
Share on other sites

Yes, that would be easy. Just add or fetch the price field, won't be a problem. I might actually add the price field to the new version... good idea that. Damn... I will need to rename it to quickstockandpriceupdate now... ;)

 

You can basically add anything but the description needs a fairly big input field (multiple on multi language shops) so the advantage of this page layout will be pretty much useless then...

 

HTH

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

agreed... description is out of the question. Model-name, or tax-class perhaps...?

But the price is indeed a good and simple add-on...

 

And yes, why not call it 'quickupdate' :wink:

'Time is a social construction to make the transitoriness manageable'

Link to comment
Share on other sites

Yes, that would be easy. Just add or fetch the price field, won't be a problem. I might actually add the price field to the new version... good idea that. Damn... I will need to rename it to quickstockandpriceupdate now... ;)

 

You can basically add anything but the description needs a fairly big input field (multiple on multi language shops) so the advantage of this page layout will be pretty much useless then...

 

HTH

Mattice

 

Could you alert us when the quickstockandprice update will be on line?

 

Thanks a lot,

 

Joan

joan@delaterra.net

www.delaterra.net

organic food in Catalonia

Link to comment
Share on other sites

no prob. just click watch this thread (at the bottom of this page) and you'll be notified. (I'll post the new release on this thread)

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

hello mattice

as you can see some top categorie are reported in all cat but does not have their own menu....

 

can you please add a parameter in quick_xxxx to use the cPath parameter in the call link ?

 

For Joan here is an old answer of mattice :)

Hi Elari,

 

Thanks. I did not need that for myself but it is not hard:

 

change

 

$sql2 = tep_db_query("SELECT p.products_id, p. products_quantity, p.products_status, p.products_image, 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'] . "'");

 

to

$sql2 = tep_db_query("SELECT p.products_id, p. products_quantity, p.products_status, p.products_image, p.products_model, 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'] . "'");

 

Then change

 

echo '<input type="text" size="3" name="stock_update[' . $results['products_id'] . ']" value="' . $results['products_quantity'] . '">stock<br><i>';

 

to

 

echo '<input type="text" size="3" name="stock_update[' . $results['products_id'] . ']" value="' . $results['products_quantity'] . '">stock<br>' . $results['products_model'] . '<br>' . $results['products_price'] .'<br><i>';

 

(untested so try it)

Hope that helps,

Regards,

Mattice

Link to comment
Share on other sites

found a solution, not very nice but will work

 

add

if ($HTTP_GET_VARS['cat_id']) {

$HTTP_POST_VARS['cat_id'] = $HTTP_GET_VARS['cat_id'];

}

after

// see if there is a category ID:

 

this way you can call with a parameter like quicstock.php?cat_id=xx

where cat_id = your cID

This way you can add a button on right side of catalog when browsing category to call directly quicstockupdate for this category in a separate window....

Link to comment
Share on other sites

The tool works great, but if i want to place a product in a sub-category, like in |Xbox|Action|"The game" ? Cant see the option to place it right in there. Is there maden yet?

 

 

-Henrik

Link to comment
Share on other sites

The tool works great, but if i want to place a product in a sub-category, like in |Xbox|Action|"The game" ? Cant see the option to place it right in there. Is there maden yet?

 

 

-Henrik

 

It is only intended to do quick stock updates, not moving products around... ;)

 

Elari,

 

I like your idea to add a button to the categories.php like you described.

I will add that trick to the docs once I release the new version :D

 

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

did you see why it does not sort all top categories ??

 

I not sure if I understand what you mean exactly with that...? :?

 

Mattice

"Politics is the art of preventing people from taking part in affairs which properly concern them"

Link to comment
Share on other sites

  • 5 months later...

About quick_stockupdate.php (v1.1)

 

I tried to implement it, but when i first clicked it didn't show up a thing. only the title, and the bottom.

 

so i looked in the file and i saw the following string.

 

 

// 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");

 

---> notice the 1 (fixed)

 

 

So i changed it to: (and it's working)

// 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 =" . $languages_id);

 

 

(well, maybe it's useful)

Link to comment
Share on other sites

Another thing,.. no images....

---

 

 

In the script look for:

 

echo '<td align="center">' . tep_image(DIR_WS_CATALOG1 . DIR_WS_IMAGES . $results['products_image'], 'ID ' . $results['products_id'] . ': ' . $results['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br>';

 

---> Change DIR_WS_CATALOG1 to DIR_WS_CATALOG

(without the 1)

Link to comment
Share on other sites

"

Do you know if it's easy to adapt your contribution/idea for updating prices instead stock? Or maybe two or three fields (for exaple, stock, prices and description...) "

 

A french contribution transalted by me iun english calle : "Qucik update" allow u to change all the prices and the stock for all your product and is able to do it by categories ...

MS2

Link to comment
Share on other sites

  • 5 weeks later...
who can help me ?

 

noimages.jpg

 

work now!

 

In the script look for:

 

echo '<td align="center">' . tep_image(DIR_WS_CATALOG1 . DIR_WS_IMAGES . $results['products_image'], 'ID ' . $results['products_id'] . ': ' . $results['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT) . '<br>';

 

---> Change DIR_WS_CATALOG1 to DIR_WS_CATALOG

(without the 1)

hey ! i am new boy

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...