Author Topic: Updating number of items in stock automatically  (Read 5355 times)

WJM

  • Beginner
  • *
  • Posts: 13
Updating number of items in stock automatically
« on: September 16, 2010, 03:24:39 am »
I am wondering if Virtuemart is able to automatically update stock levels.

We are a computer reseller and have our own warehouse, but we also have access to our distributor's warehouse. Our distributor sends us daily updates on stocklevels, which we currently have to forward to our customers. However, because we run an online facility to purchase items online, we would like to list the items in stock online as well and update this on a daily basis.

I know Virtuemart has the ability to list the number of items that are in stock, but since we have over 1000 products on sale, updating stock levels manually every day becomes a very time-consuming task.

Can anyone please point me in the right direction of where I could find perhaps a plugin or is there something else out there that would better suit our needs? I am open to devlopers wanting to work with us to set this up.

Regards.

NigC

  • Beginner
  • *
  • Posts: 14
Re: Updating number of items in stock automatically
« Reply #1 on: September 16, 2010, 08:39:48 am »
I suggest you take a look at CSV Improved. I know it has the ability to import stock levels.

You will however still need to find a way to create a suitable CSV file for Product and Stock.

Here's a link: http://www.csvimproved.com/

If you prefer something more streamlined, I may well be able to help. Just yesterday (it's true), I wrote a piece of software to take stock levels from our internal system and upload them to our Virtuemart database. It runs automatically in the background. I also do private development work, so if you think this sounds good, send me a PM.

P.S. The software I wrote yesterday also sends an email to anyone subscribing to the "Notify Me" option for a product. This is necessary as manually updating the database will bypass the Virtuemart software. I don't know if CSV Improved will suffer from the same drawback.

Cheers
Nigel

WJM

  • Beginner
  • *
  • Posts: 13
Re: Updating number of items in stock automatically
« Reply #2 on: September 16, 2010, 09:01:12 am »
Nigel, you're a life saver! Going to check it out right now and will definitely keep your services in mind as it sounds that whatever software you wrote yesterday fits like a glove with what we want to achieve :D

NigC

  • Beginner
  • *
  • Posts: 14
Re: Updating number of items in stock automatically
« Reply #3 on: September 16, 2010, 09:05:43 am »
Glad I could help :)

You may have missed my edit above. So be sure to check the CSV Improved documentation to see if it will handle emails to those who have requested notifications of stock arrival (if you need this functionality).

Cheers
Nigel

WJM

  • Beginner
  • *
  • Posts: 13
Re: Updating number of items in stock automatically
« Reply #4 on: September 16, 2010, 10:13:34 am »
Nigel,

May I please use a little bit of your wisdom again?

I have successfully update the number of products in stock on a test item, however, at the front end the number available does not display.

Do you know how I get the items in stock displayed so that the end-user can see how many of this or that we've got left?

Regards.

NigC

  • Beginner
  • *
  • Posts: 14
Re: Updating number of items in stock automatically
« Reply #5 on: September 16, 2010, 10:37:20 am »
That should be fairly straightforward:

In the Virtuemart administration, go to Admin/Configuration and select the Site tab. Then tick the box labelled "Show the Number of Products?". That should do it :)

WJM

  • Beginner
  • *
  • Posts: 13
Re: Updating number of items in stock automatically
« Reply #6 on: September 16, 2010, 10:40:16 am »
Ah, I thought this referred to the number of products in a category. I shall try. Once again, thanks very much!

NigC

  • Beginner
  • *
  • Posts: 14
Re: Updating number of items in stock automatically
« Reply #7 on: September 16, 2010, 10:44:17 am »
Ooh, you might be right about that :-\

If that's not what you need. It might well be a case of modifying the template to show the stock. It's not something I've needed to do, so haven't looked into it. Fingers crossed :)

WJM

  • Beginner
  • *
  • Posts: 13
Re: Updating number of items in stock automatically
« Reply #8 on: September 16, 2010, 10:46:11 am »
Hi Nigel,

This isn't working for me unfortunately. Thanks for your posts though. I may need your help after all if Virtuemart cannot display the items in stock to the end-user

Oh boy, I need to modify the template? I guess it's one of the other things I will figure out. I will prepare for a frustrating day at the office tomorrow. Wish me luck! Thanks for your posts

NigC

  • Beginner
  • *
  • Posts: 14
Re: Updating number of items in stock automatically
« Reply #9 on: September 16, 2010, 10:56:15 am »
Shame :(

I did a quick forum search and found a few people asking the same question, but no replies :-\ That suggests it's certainly not a feature you can switch on. If I find some time later, I'll see if I can figure out how to add it into the template.....

NigC

  • Beginner
  • *
  • Posts: 14
Re: Updating number of items in stock automatically
« Reply #10 on: September 16, 2010, 15:34:03 pm »
Another dig into the forum produced this:

http://forum.virtuemart.net/index.php?topic=8840.0

The 2nd post describes how to amend the code to extract the stock figure and how to add it to the flypage template. I haven't tested it, but it looks like it should do the trick.

Good luck with it :)

WJM

  • Beginner
  • *
  • Posts: 13
Re: Updating number of items in stock automatically
« Reply #11 on: September 17, 2010, 03:00:03 am »
Nigel, thanks so much for helping me find a solution.

I'm afraid I have to admit that I got stuck at the first step though


"1) Open your administrator/components/com_phpshop/html/shop.browse.php file"

Where do I find this file?


NigC

  • Beginner
  • *
  • Posts: 14
Re: Updating number of items in stock automatically
« Reply #12 on: September 17, 2010, 08:39:25 am »
Do you have FTP access to your website files? Or some other method for uploading/downloading/editing your files? This is not something that can be done through your Virtuemart admin menu.

You will need to be able to access that file to be able to edit it. I strongly suggest you take a backup copy before touching it though, because one simple mistake could take down Virtuemart - or at least it's ability to display products.

But if you follow the instructions correctly, you should get the result you need.

One other thing: I also suggest you make a note of what you did. Because if you update your Virtuemart installation at a later date, you will most likely find the file you've edited will have been updated and you will lose the ability to display stock again.

Hope that helps and good luck :)

WJM

  • Beginner
  • *
  • Posts: 13
Re: Updating number of items in stock automatically
« Reply #13 on: September 17, 2010, 08:45:13 am »
My colleague had mentioned something about FTP access and was looking for it, so I suspected this might be the end of my ability to change Virtuemart...

The website maintenance has never been handed over to me properly, so I have no idea where and how to access files. I always just used the Joomla login for basic editing.

I will get to the bottom of this though! Thanks again :D

WJM

  • Beginner
  • *
  • Posts: 13
Re: Updating number of items in stock automatically
« Reply #14 on: September 17, 2010, 09:21:40 am »
I am very close to getting FTP access... This is all going to work out for me, I just know it! So where can I send my 'thank you for your help I really appreciate it' bottle of wine to??