Most Powerful Open Source ERP

How To Use ERP5 Commerce System

How To showing how to makes implement shopping functionality on top of ERP5 Web Sites.
  • Last Update:2016-02-09
  • Version:001
  • Language:en

Table of Contents

ERP5 Commerce is online cookie based e-commerce application which makes it possible to implement online shop functionality on top of ERP5 Web Sites.

Table of Contents

How to install it ?

The following business template needs to be installed: erp5_commerce

After successfully installation you will have to restart your Zope instance because in its core ERP5Commerce application uses own additional Cache Factory which is initialized only at Zope startups (see a href="http://www.erp5.org/HowToUseTheCacheTool">How to use the CacheTool)

How to configure it?

Configuring an online sale application can very much vary but in general there are few questions you may need to answer before you start implementation:

  • Which is the default currency used in shop?
  • To set default shop currency see method SaleOrder_getShoppingCartDefaultCurrency. This currency is going to be used all over the site.

  • What kind of tax schema is the shop going to use?
  • Applicable taxes are calculated based on location of shop and customer so for example taxes for shop based in France and customer outside of EU are different than taxes for EU citizen. Please see Person_getApplicableTaxList

  • How to calculate shipping based on customer location?
  • Shipping may or not be required based on shopping cart content. For example selling online services doesn't require shipping. Please see method SaleOrder_isShippingRequired which is the hook script and adjust it to your needs.

  • How to (if) apply discounts to customer?
  • Discount may or may not be applicable to a customer based on different factors like buy history or whatever. To implementing specific shop behavior you may need to customize script Person_getApplicableDiscountList

Sellable resources and shipping service

Every resource in ERP5 which has a price and a currency defined on supply lines or on the product is sellable through standard Resource_viewAsShop view available in web mode. For now it's needed that prices of resources are in the same currency that the default currency used in the shop.

Every resource (i.e product) which has product_line equal to ""shipping"" is considers as a shipping service. XXX this have to be easier to configure.

Integration with ERP5 Web

To integrate ERP5Commerce based shopping cart into your ERP5 Web Site you may need to add a new field to your site's layout that will render page template SaleOrder_viewShoppingCartWidgetRenderer which shows current customer shopping cart content.

For more information please see see How to use ERP5 Web

Online payment

Supporting online payment is out of scope of this HowTo.

Usually an online payment is supported by external service provider and integrated into ERP5Commerce by inserting some predefined HTML code delivered by provider. For an way to integrate it into your shop please see SaleOrder_viewAsWebConfirm

Implementing your own security

Here is a short requirements one must take care to keep when designing security for ERP5Commerce based shop

  • Anonymous users and registered customers must be able to view product_module and contained products
  • Only registered customers can checkout their shopping cart
  • Only registered customers can access sale_order_module and view their own Sale Orders (they have role of Owner by default)

It's a must when customizing your user registration form that you make sure you have customer's full postal/delivery address.

Notes

  • ERP5Commerce is form based ERP5 application which heavily uses specific renderer into forms. When designing the user interface it's a good idea not to touch the forms itself but rather change the respective renderer.
  • To implement session like behavior ERP5 Commerce uses cookies on client side. This means that cookies must be enabled in browser in order to work properly.

Related Articles