Hi,
I'm trying to implement hook_ec_txn_workflow in my own module, taking as example the implementation in ec_reciept module. So I see a constant EC_WORKFLOW_CANCELED is used there.
Searching further, I've found more functions in different core ecommerce modules, which use several similar constants: EC_WORKFLOW_RECEIVED, EC_WORKFLOW_INVOICED, EC_WORKFLOW_COMPLETED and more.
But I've failed to find any declaration to these constants. So I do wonder how the whole package could work correctly relying on undeclared constants?
I will appreciate any clue about the issue if I do miss something, or green light to declare these constants. :)
Thanks!
Comments
Comment #1
gordon commentedThese constants have actually been depreciated and are no longer used. However it seems that I had not removed all mentions of them.
I have done some more work, and removed more of these, but some still exist.
Gordon.
Comment #2
miraje commentedHi Gordon,
Thanks for your answer.
Here is the list of function where these constants yet exist:
ec_availability_txn_workflow (file: ec_availablity.module)
ec_receipt_ec_txn_workflow (file: ec_reciept.module)
_ec_store_widget_orders (file: ec_store.admin.inc)
_ec_store_cron (file: ec_store.inc)
Do I understand correctly, that the list returned by function ec_store_transaction_workflow (from ec_store.module) replaces these constants?
Comment #3
gordon commentedI have finished removing all the uses of the EC_WORKFLOW_* constants.
The main reason for this is that the workflow statuses are actually definable via parameters, and since the workflow is completely definable via rules so adding additional workflows makes expanding of your workflow much easier.
As I have said else when the new way of doing things for e-Commerce is that e-Commerce can be easily changed to fix into your business and not your business changing to work with e-Commerce.