Jump to content

Auto instock update Mod with extras


Recommended Posts

THIS DOWNLOAD HAS NOW BEEN FIXED AND UPADTED TO THE AUTHORS LATEST VERSION - Brooky :)

Name: instock_mod.zip

Version: 1.0

Author: Bill Whitmire

Short Description: Auto instock update Mod with extras

Long Description:

1. This will let you, in your add_product.php and edit_product.php enter in a in stock amount for that product.

2. When a customer is on the view_product.php page it will show a in stock

3. If the in stock in at 0 the add to cart button will display OUT OF STOCK and they cant click it.

4. If it is in stock and they try to add more to the quantity then what is in stock for that item on the view_cart.php page the in stock coloum will display the in stock amount in red for that product and the quantity will default to the in stock amount. So they cant order more then what you have.

5. When the go to check out after the click Check Out your in stock amount will subtract the quantity they purchased therfore updating automaticly

---------------------------

as of 03 08 2004 this mod is updated :

- BEFORE INSTALLING TAKE TIME TO READ THE README.txt !!! (included in the

zipfile)

- all typos are gone

- all install textfiles in this zip refer to UNMODIFIED ORIGINAL

CUBECART-FILES V2.00 or V2.01

- tested to be found bugfree

::::Nice::::

[Download File]

//**************************************

TOPIC CLOSED !

find the latest version here !

Edited by stijnj
Link to comment
Share on other sites

  • Replies 161
  • Created
  • Last Reply

Top Posters In This Topic

This hack works great but the instructions as posted have errors in them.

I don't remember off hand but there was a } missing in one of the instructions and a couple of missing ");

There's also a line that is commented out for some reason that should be uncommented so that the script works as it should.

Otherwise it works as advertised. I modifed the script to not reveal how many items I have in stock, but rather announce low quantities if I had less than 10 available. On the checkout screen I had it list "Yes" for Instock instead of the qty once again, but if they tried to order more than what I had available it would then give them the big red quantity.

Thanks Bill for a great mod!

Link to comment
Share on other sites

Guest tinusrinus

:) I'm having trouble too would you try to explain where to place them because i don't have any expirience at all with php programming.

So it's hard to find out for me.

Regards

Rob<<<<<<<<<<< :dizzy: ;)

Link to comment
Share on other sites

Hello all

Sorry for the mistakes,

Here are some changes

In the files that you dowloaded

open view_products.txt that first section remove the // Auto update mod Addition

Go Down To the 216 Line change andat the very bottom of the replace code

after </table>"; add this symbol }

So it look like this </table>";}

im still going throu the code to check for more errors :)

Tell me what pages are givig the errors and line numbers

Makes it easyer to find the errors

Once again sorry for the errors This is my first mod. :dizzy:

Bill AKA wildbill

Link to comment
Share on other sites

Guest imacman233

Otherwise it works as advertised. I modifed the script to not reveal how many items I have in stock, but rather announce low quantities if I had less than 10 available. On the checkout screen I had it list "Yes" for Instock instead of the qty once again, but if they tried to order more than what I had available it would then give them the big red quantity.

I would like to know what you changed in the code to accomplish this. This sounds like it would be a plus for my store.

Thanks.

Link to comment
Share on other sites

Hey

if you tell me the page you access and the error it gives with the line number i can tell you what the prob is

Remeber you have to create a new column called instock in you story_inventory table, for your database

wildbill

Link to comment
Share on other sites

Guest xyncro©

- To Bill -

regarding your instock_mod

i saw somewhere here in the forum that when the instock reaches let say 5 items the store will get an e-mail to 'fill up' more products, and when instock reaches 0 items the 'not in stock' button will automatically appear.

does this mod of yours have this function ??

Link to comment
Share on other sites

Hey xyncro©

The Instock Mod will only display "out of stock" when the product reaches 0.

Ther Email function im still working on :w00t:

Hope that will be up soon :^^:

Best Regards,

Bill aka wildbill

Link to comment
Share on other sites

Guest xyncro©

sh*t

i'm just getting a lot of jibberish when installing this mod :^^:

i don't even know where to start and fix it up B)

could it be that hktsonys instock_mod that i have installed is messing things up ?

:w00t: i guess i need to make a clean new install of cc !!

Link to comment
Share on other sites

Guest xyncro©

sh*t

i'm just getting a lot of jibberish when installing this mod :^^:

i don't even know where to start and fix it up B)

could it be that hktsonys instock_mod that i have installed is messing things up ?

:w00t: i guess i need to make a clean new install of cc !!

Link to comment
Share on other sites

Guest xyncro©

Uhhh !!

could i just upload my files to your mailbox so you could take a look at them

and edit what's needed ?????????

i will implement the changes first so you don't have to do that !!

thx in advance

Link to comment
Share on other sites

Guest xyncro©

....

The errors are gone but

i still have a problem with editing products

something is wrong because

i have a field in admin/products/edit where i can just enter what i like

and the result of this what i have written is displayed on the frontside along with the description

this is not right

it should either give me 'put in basket' or 'not instock' after changing in admin

Link to comment
Share on other sites

Hey

something is wrong because

i have a field in admin/products/edit where i can just enter what i like

and the result of this what i have written is displayed on the frontside along with the description

this is not right

it should either give me 'put in basket' or 'not instock' after changing in admin

I Dont Under Stand What You Mean

Give me a link to check this out or screen shot, that way I can address this easier

Thanks

wildbill

Link to comment
Share on other sites

....

The errors are gone but

i still have a problem with editing products

something is wrong because

i have a field in admin/products/edit where i can just enter what i like

and the result of this what i have written is displayed on the frontside along with the description

this is not right

it should either give me 'put in basket' or 'not instock' after changing in admin

I have mabye solved your problem if i have right that will say.

So my question to you are: Have you added a new column in the database? If not then do that and see if it works better then :(

The new column will be added in Store_inventory and is needed to be called instock

Hope it helps!

Link to comment
Share on other sites

Guest xyncro©

Hej !

I have store inventory installed since i installed hkstsonys instock_mod

when i check phpmyadmin i see, ' Instock char(3) No Null Standard Yes '

Link to comment
Share on other sites

Guest xyncro©

...

like i said i have a number displayed in the description field

it looks like this :100

(if my stock would be 100)

when buying up all in my stock this number changed so i asume that this 'number' should contain the text 'currently in stock' infront of the :

how do i change this ??

Link to comment
Share on other sites

Um.... help! :(

Installed Cubecart - no problems at all. Works great.

Installed Auto Instock Update mod and I can't get it to work.

When trying to add a product it gives me the following error;

Parse error: parse error, expecting `','' or `';'' in /u1/home/ellismod/public_html/store/admin/add_product.php on line 213

I've checked the code, and as far as I can tell, I've done everything correct so far as the instructions go.

Any ideas?

Link to comment
Share on other sites

Otherwise it works as advertised. I modifed the script to not reveal how many items I have in stock, but rather announce low quantities if I had less than 10 available. On the checkout screen I had it list "Yes" for Instock instead of the qty once again, but if they tried to order more than what I had available it would then give them the big red quantity.

I would like to know what you changed in the code to accomplish this. This sounds like it would be a plus for my store.

Thanks.

Likewise. It would be much better to announce 'in stock' or 'low quantity' without actually having it show exactly how many are available.

I'd be interested to know how this was done (since I'm a complete beginner :()

PS Solved my earlier problem by the way.

Link to comment
Share on other sites

Guest franck~

There are actually lots of syntax errors in this great MOD.

One is in secure.php, in the "Adjust Instock Amount" section

This line:

$sql_update = "update ".$prefix."store_inventory set instock='$new_ins' where product='$product';";


has an error at the end, the extra ;

It should be:


$sql_update = "update ".$prefix."store_inventory set instock='$new_ins' where product='$product'";




Then, in the same section instead of this:


$description = nl2br($description);

 // End Adjust Instock Amount

  

           foreach ($product_options as $assign_id)

  { 

// get data




A } is missing. It should be:




$description = nl2br($description);

 }

// End Adjust Instock Amount

  

           foreach ($product_options as $assign_id)

  { 

// get data

There are more in other files. I can try to make a list and post it here, but then it would be nice to update the file in the download section, because people are still downloading a MOD with errors in it.

Although it's a good and nice MOD.

Link to comment
Share on other sites

  • 2 weeks later...
Guest
This topic is now closed to further replies.



×
×
  • Create New...