Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


WHMCS Stock Editor Script
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

WHMCS Stock Editor Script

SpencerSpencer Member
edited May 2013 in General

I got tired of editing stock by hand so I made my own, here it is!

With Web Interface http://pastebin.com/raw.php?i=DfxTmsup
CLI Only http://pastebin.com/raw.php?i=KNDdNcAC

What do I have to do to use it??!?!
- Upload the file to your webserver name it whateveryouwant.php
- Edit the file and change the following variables to fit your situation

$host="127.0.0.0"; //MySQL Host name

$username="root"; // Mysql username
$password=""; // Mysql password
$db_name="whmcs"; // Database name

-Visit the URL and in the text box labeled "Start Product ID" put the start product ID, and on the text box labeled "End Product ID" put the end product ID. In the Stock Amount put the stock amount that you want in. Then click submit. If it worked without any errors it will tell you.

DONT BE AN IDIOT, PASSWORD PROTECT THIS FILE OR DISABLE IT WHEN NOT IN USE

Too use the CLI only version
-Download it and name it whateveryouwant.php
-type

/usr/bin/php whateveryouwant.php startproductid endproductid stocklevel

Then you are good to go!

Comments

  • jarjar Patron Provider, Top Host, Veteran

    One "oops" away from a big problem ;)

    Could just make it accept variables over CLI and not make it executable from the outside at any point.

  • SpencerSpencer Member

    @jarland said: Could just make it accept variables over CLI and not make it executable from the outside at any point.

    Good idea! I added another version that is just CLI

  • zaxattkzaxattk Member

    @Spencer a personal touch in this:
    http://pastebin.com/raw.php?i=Rnsn38da

    Added a small login system reading the info from an array on the file.

  • SpencerSpencer Member

    @zaxattk said: Added a small login system reading the info from an array on the file.

    Very nice, I plan on adding it to the WHMCS admin area only, but that would take longer to do, so its on my list.

  • DewlanceVPSDewlanceVPS Member, Patron Provider

    Any screenshot is available or live demo?

  • trewqtrewq Administrator, Patron Provider

    @DewlanceVPS are you serious? Look at the HTML... it's just an unformatted form....

  • DewlanceVPSDewlanceVPS Member, Patron Provider
    edited May 2013

    @trewq said: are you serious?

    hmmm..

Sign In or Register to comment.