Author Topic: Variable Restock Rates  (Read 3422 times)

Offline Steev

Variable Restock Rates
« on: April 12, 2007, 11:12:32 pm »
I have just uploaded Release Candidate 1 of my Variable Restock Rates mod for SMFShop to http://dev.dansoftaustralia.net/projects/varrestocks/.  I would appreciate any comments or suggestions you may have.

NOTE
While I have tested the code itself, and all appears to work, I have not yet tested the .xml files used to add the package automatically.  If you use these, make backups of affected files.

Affected Files
ShopAdmin.template.php
ShopAdmin.php
Shop.english.php
item_engine.php

New Files
dostock.php

readme.txt
This modification makes an additional method of restocking the SMFShop, allowing to automatically stock at a certain rate, up to a specified maximum value.  Each item in the shop can have it's own configured restock rate.

Changelog:
==================
Version 1.0 (RC1)
- Added the ability to reset stocking periods.
- Changed dostock.php so that it will reduce to max_stock even if stock_period hasn't arrived.
- Wrote an uninstall script that will remove database fields if run.

Version 0.1
- First version
- Added new database configuration to allow for automatic restocking.
- Added new file, dostock.php, which will do the automatic stocking.  Requires a cron job to run successfully.
- Altered administration files to show restock options.
- Altered item_engine.php to add restock variables.
- Added new elements to Shop.english.php.
- Default Values: 50 Max Stock, 50 Restock Rate, 1 Hour Intervals


Offline feeble

Re: Variable Restock Rates
« Reply #1 on: April 13, 2007, 07:07:01 am »
very nice, worked quite nicely

Offline Steev

Re: Variable Restock Rates
« Reply #2 on: April 13, 2007, 08:55:57 am »
Good to hear.  Did you install it as a package, or did you do the modifications manually?   I haven't had a chance to try the package installer on it yet; I'm intending on creating a junk install of SMF with the shop tonight to try it out on, but I'm curious. :)

Offline feeble

Re: Variable Restock Rates
« Reply #3 on: April 13, 2007, 07:16:00 pm »
Good to hear.  Did you install it as a package, or did you do the modifications manually?   I haven't had a chance to try the package installer on it yet; I'm intending on creating a junk install of SMF with the shop tonight to try it out on, but I'm curious. :)

manually

Offline Daniel15

Re: Variable Restock Rates
« Reply #4 on: April 14, 2007, 01:51:55 pm »
Quote
While I have tested the code itself, and all appears to work, I have not yet tested the .xml files used to add the package automatically.  If you use these, make backups of affected files.
I suggest you install a test SMF 1.1 + SMFShop 3.0 installation, and then use test_modification.php (included with SMF Package SDK) to test the install XML file

Offline Steev

Re: Variable Restock Rates
« Reply #5 on: April 15, 2007, 10:38:36 am »
Yeah, I've been working on setting up the forum/mod.  The forum is working fine, but for some reason I can't seem to get any mods installed on the new forum (keep getting errors about the directory not being writable, when it doesn't time out)....but I didn't know about test_modification.php.  Thanks for that advice. :)
« Last Edit: April 15, 2007, 10:42:41 am by Steev »