The token module is now required by E-Commerce core.
Modules added to the system are:
ec_anon (anonymous purchasing) - Developed by Sammy Spets
ec_mail (mail handler module) - Developed by Sammy Spets
invoice (Back office system to create transactions for customers) - Developed by Gordon Heydon
ec_recurring (recurring products subsystem) - Developed by Sammy Spets
ec_roles (role assignments) - Developed by Sammy Spets
ec_useracc (user account provision) - Developed by Sammy Spets
eurobill (payment module for eurobill gateway) - Developed by Sammy Spets
E-commerce has had its internals revamped in two areas: recurring products and
mail templates. Of particular note are the following feature enhancements:
- Create, update and delete product expiry schedules through a purpose-built schedule management interface. This is independent of the products they are assigned to.
- Active purchases using an updated schedule are updated with the new schedule automatically. E.g a customer buys a product that expires in a month and you choose to change it to two months for everyone that purchased it. Update the schedule to two months and all active purchases will be extended to two months automatically.
- An expiry schedule can not be deleted if it is attached with an unexpired purchase (either active or renewed).
- Products are set to be recurring (have expiry date) by selecting an expiry schedule in the product attributes.
- Send emails reminding customers that a previous purchase is expiring.
- Any number of reminder emails can be added to an expiry schedule.
- Each reminder email can be scheduled individually throughout the system.
- The expiration of accounts is performed automatically through the cron hook. Set it up to run at 5am system time.
- Roles can be given to and removed from customer accounts when payment is received.
- Roles can be given to and removed from customer accounts when a product expires.
- A user account can be created when payment is received.
- A user acccount can be blocked when a product expires.
- A free product that creates a user account has a mandatory email confirmation step before the account is accessible. Cleaning of accounts that aren't confirmed is automated through the cron hook.
- Email templates are now edited through a centralized interface.
- Tokens (used to be called variables) available for a given mail are given on a page linked through the mail editing interface.
- Store mails (such as Ask Customer and Cancel Transaction) display an interface where all tokens are substituted. Through this interface a user can add more tokens and click the Preview button to perform the substitution.
Here are some extra bits of information about how the implementation has changed. This list is intended for developers as a quick reference of what will need to be changed in their custom modules.
Anonymous purchasing (ec_anon)
Variable 'store_auth_cust' (set from admin/store/settings) has been deprecated in favour of ec_anon_policy. To map the old values to the new constants:
store_auth_cust == 0: ECANON_POLICY_OPTIONAL
store_auth_cust == 1: ECANON_POLICY_NEVER
- The default anonymous purchasing policy has been changed to ECANON_POLICY_OPTIONAL allowing both anonymous customer and account holder purchases.
- IMPORTANT: The ec_anon module is required for all ecommerce installations!
- Anonymous customers can NOT buy recurring products that don't create accounts.
- Variable 'store_auth_cust' (set from admin/store/settings) has been deprecated in favour of ec_anon_policy. To map the old values to the new constants:
Recurring subsystem (ec_recurring) since original alpha release.
- Renamed tables ec_recurring_schedule to ec_recurring_expiration and ec_recurring to ec_recurring_schedule. This was done to reflect their contents better.
- The ec_roles table has been changed to have a field for removing roles at purchase time. The field names have been renamed to buy_add, buy_del, exp_add, exp_del.
- User account provision module (ec_useracc) since original alpha release.
- hook_useraccapi() operation 'account created on payment' renamed to 'account activated'.
- store_email_form() has now been deprecated and replaced with ec_mail_selection_form() and ec_mail_send_varmail_form(). Any modules calling store_email_form() will need to be changed to call one of the other two functions.
- store_email_text() and its associated hook are now deprecated and replaced by ec_mail's implementation. Modules implementing mails now need to use hook_mail_types() and hook_mail_reset().
- hook_store_email_alter() has been removed from use in both 4.7 and 5.0 as hook_mail_alter() in Drupal 5 core replaces it.
- Email sending in the store admin interface has been revamped and it's now possible to see a preview of the mail and add new variables (supported by that mail type) to the mail.
- Email template admin has become centralised through the ec_mail module. Settings pages now have a selection list of mails suitable for each mail. This new system can be extended much more easily to support translations of each mail so multilingual sites can send mails in a user's native tongue. This is planned as a future addition to the system.
- Mail tokens (previously called variables) are now centralised and consistent throughout E-commerce.
- Added code to ensure ec_mail and ec_anon are installed before store can be installed or updated.
- Added store_transaction_mail_form(). This function is a wrapper for ec_mail_send_varmail_form() and makes display of a form (like ask customer form) a two line affair. Those mail forms now allow you to preview the mail! Along with that you can add tokens to the mail (variables) and click the preview button to have them filled.
- Added store.deps.inc, which contains dependency checking code so module_install() functions can reuse the code.
- Recurring product fields (is_recurring, price_interval, price_unit, price_cycle and auto_charge) have been removed from ec_transaction_product.
- Add store_recalc_transactions() which will completely rebuild all the changes based on todays specials and charges.
- Changed mail handling from store_email_* to ec_mail functions.
- Added code to ensure ec_mail is installed before coupon can be installed or updated.
- Changed mail handling from store_email_* to ec_mail functions.
- Added code to ensure ec_mail is installed before shipping can be installed or updated.
- #100740 - The cheapest charge for shipping will always be choosen.
- Recurring email and role settings have been removed.
- Product renewal code has been removed.
- #102021 - Change so the add to cart will not store both form_id, and form_token against the product.
- Recurring product fields (is_recurring, price_interval, price_unit, price_cycle and auto_charge) have been removed.
- Add Context to product_adjust_price()
- Add Context to product_get_specials()
- Add to productapi new 'cart_form' op to allow products to add aditional fields to cart/view
- node->is_recurring TRUE if the product is recurring (this has been kept from the old system so legacy code still operates).
- node->schedule is the schedule array.
- node->schedule['reminders'] is the reminders array.
- node->expiry_schedule is the entry for that product from ec_recurring_expiration. This is only set in hook_recurringapi().
- node->roles is the roles array.
- node->useracc is the user accounts array.
- node->allow_blocked_buyer is set to TRUE if a blocked user can purchase the product.
- Remove support for versions of CiviCRM less than 1.6
- Change the use of the template. Template.tpl does now doesn't need to be copied/linked to CiviCRM templates dir.
- Added EuroBill payment gateway support. This will provide access to direct-debit for certain EU countries and credit card payments for others.
- Products flagged with a EuroBill ID can no longer be added to the cart. Instead the user is redirected straight to the EuroBill gateway.
- Broken bots that follow links outside sites will cause phantom transactions to appear in the system. People that commissioned the module creation requested that the Subscribe now link go directly to EuroBill rather than the user entering their email address beforehand to prevent the spam transactions.