Today I tested the e-commerce package. I had a custom node, and I found that it is very easy to upgrade it to be a product. It's not absolutely necessary 'cos anything can be a product but I wanted a seemless integration -- just a few fields added to my node edit form and that's it.
- changed all my _load, _form, _view, _insert, _update, _delete functions by adding a _ before the function name and calling these from hook_nodeapi. I changed the node type for existing nodes to product. I found one inconsistency: you need to use db_fetch_array instead of db_fetch_object in load. In _mymodule_form you need to delete body and related form_tips, you want to return your special things only.
- copy-pasted the contents of tangible.module and changed
mymodule_productapialso changed the
availability_functions. I have submitted a patch so any module can display availability messages.
Yes, that's it! Very easy, thanks to Matt Westgate and the very modular Drupal e-commerce package.
I opened a Paypal Developer Account, registered some test accounts. When logged in to your profile account, you probably want to switch on IPN and set it to my.drupal.site.com/paypal/ipn .
Commenting on this Story is closed.