Stock plugin almost there

Rickard

No avatar

2005-10-11 23:19

I've hacked QC 0.3.1 to include product stock, but I need directions how to convert it to a stock plugin.

I looked at a few plugins but I get confused because in some you put files in both a plugin directory and in the normal file structure of QC. In some you need to patch a couple of files by hand. I need a best practise example.

---

Below is a brief list of my changes:

/actions_admin/products.php
. added a few lines

/core/orders-admin.php
. saveOrderStatus() modified
. cancelStock() new function

/core/orders-ff.php
. dbAddBasketProduct() modified

/core/orders.php
. listBasket() modified
. saveOrder() modified
. updateStock() new function

/core/products_ff.php
. dbListProducts() modified
. dbListProductStock() new function
. dbListProductsSearch() modified
. dbListProductsCategory() modified
. dbThrowProduct() modified
. dbAddProduct() modified
. dbChangeProduct() modified

/core/products.php
. listProducts() modified
. throwProductsData() modified
. throwProduct() modified

/lang/en.php
. added a few lines

/templates/admin/products_form.tpl
. added a few lines

/templates/admin/products_list.tpl
. added a few lines


Cheers/ Rickard

brainfreeze

No avatar

2005-10-12 08:57

Hee Richard,

can you dispay all files and contents or make them download able?
You can also mail them to me... brainfreeze@zonnet.nl

I am not a programmer but perhaps I can help

Sanne

to do or not to do

Floyds

No avatar

2005-10-12 21:25

treewood or wizzud can you help ??

Dutch Quick Cart Support

treewood (OpenSolution)

Avatar: treewood

2005-10-13 07:29

rickard - you should create plugin and put it in plugins/ directory ... check wizzud attributes plugin and you will see how he create this plugin

witaj.net

kendra

No avatar

2005-10-14 10:57

Richard are you from pun?

Floyds

No avatar

2005-10-24 14:03

is this plugin already done, because I want to use it !!...

Dutch Quick Cart Support

Rickard

No avatar

2005-10-26 00:45

I finally made a first version of the stock plugin.

Floyds if you want to test it I can send you a copy for test purposes.

Radd

No avatar

2005-10-26 10:24

Rickard, I also would like to test it!

thanks

Great product

Floyds

No avatar

2005-10-27 14:04

Rickard,

Yes please i'll test it for ya..


e-mail: floyds@chello.nl or info@quickcart.nl

Dutch Quick Cart Support

rubdub

No avatar

2005-10-28 11:48

Hi Rickard
Well done, can I test it too please.
test at mildones.co.uk

Soundman

No avatar

2005-10-31 20:00

Hi, do you have a copy for mee to?

e-mail: viggo@skaalvik.com

I need a stock control to this.

Thanks.

Rickard

No avatar

2005-11-04 00:24

Hi all,
Below is a link to the stock plugin. Use it, test it and please let me know if you find any errors.

It is tested on a pure Quick.Cart V0.3.1 installation.

treewood (OpenSolution)

Avatar: treewood

2005-11-04 07:22

i have some warnings:
- never please never do replacement functions. now you replace: saveOrder, listBasket, dbAddBasketProduct, throwProduct, dbThrowProduct, dbChangeProduct ... and many other basic and important functions. this create problem that this plugin will not run with other plugins
- i have 10 units of my 1 product. 1 people add this 10 units to basket and never finish order. what will happen with this 10 units. it will be still reserved ... ?
- i suggest to save stock in other file like db/products_stock.php ... not in the db/products.php file

Rickard

No avatar

2005-11-04 23:15

Great! Finally some guidelines how to write plug-ins.
- OK. Replacement functions is a problem but only if more than one plug-in uses it. is this what you mean treewood?
- Adding 10 units to basket does not mean that you reserve them. They are reserved when you finish your order. If stock has decreased below 10 during your time browsing around in the web shop you will get the new lower number of units in stock when you finish the order. I don't think this is a big issue though.
- ok

cheers ;-)

treewood (OpenSolution)

Avatar: treewood

2005-11-05 09:22

rickard
- most people install more then only one plugin
- then what if first one add to basket 10 units of product (we have in stock 10 units) and browse other products and second one add to basket 10 units of the same product. what will plugin do when them finish orders? i think better is reserve product when someone add it to basket but problem is that how to retrieve products from unfinished orders

witaj.net

Digital Backups

No avatar

2005-11-06 02:52

So treewood, are you saying this plugin wont work with other plugins, like those from Wizzud because he used
"replacement function" ? If so, how can that problem be resolved.

Personally I can deal with the problems of "What If" two people order at the same time.

PS: Great work you guys have done with QuickCart ! !

Shadowed

No avatar

2006-10-29 13:14

Nice work, but is there a corrected plugin for stock control ?

Shadowed

davidc1

No avatar

2006-11-01 18:18

would be interested too !!!

This plugin doesnt work with productattributes !

Back to top
about us | contact