Compiere can easily link to third party web stores, and also provides self-service and web store functionality. In addition to the web store functionality of viewing and buying products, Compiere provided comprehensive account management functionality. In addition to address management, the customer or vendor can view their orders, invoices, shipments / receipts and payments, pay any open order/invoice or create pre-payments as well as enter/manage (customer service) request.
To set up the web store, you need to configure the mail server (Compiere also supports TLS) and the credit card processor (support PayFlowPro out of the box and can be easily extended to support Authorize.net or any other payment processor). We also recommend you set-up Apache as a front-end server for ease of security management security and access.
For ease of customization, the Compiere web store uses Java Server Page (jsp) technology designed to work easily with any browser. The first level of customizations are cascading style sheets (css). Prepackaged are three style-sheets: gardenworld.css, compiere.css, standard.css, but you could also reference any external style sheet. This is done in the web store definition window in the application. There you also determine what functionality to expose (like Request for Quotation, Requests, ..) and what logo to display. Here are also some additional options to add text or links in different predefined regions of the web store layout.
The next level of customization would be to modify the the jsp files. Some reasons for this type of customization would be to change the content and sequence of the individual fields. Example: show the available quantity of a product or to show a flag "in stock". To do this, you would use the compiereWebStoreBase.war file in the /lib directory in the Compiere home.
The deployment of the web store is done during setup. When executing RUN_setup, the compiereWebStoreBase.war file is then combined with the appropriate code file and the compiereWebStore.xml file to the compiereWebStore.ear file and automatically deployed to the application server.
Compiere support multiple tenants. So how can you create multiple web stores for a single Compiere instance?
The key here is the context. The default context is /wstore - the context is defined in the window Web Store. Using mapping in Apache you would then map the different (virtual) URLs to the application server context. Example: you have 3 tenants and in the respective web store records you give them the context /wstore1, /wstore2, /wstore3 - in Apache, you then map www.customer1.com/wstore to /wstore1- www.customer2.com/wstore to /wstore2 - etc. (instead of wstore you could use any context, e.g. /store).
The next step is to create the ear files for the tenants. Use the following process:
0) for all tenants, create the records in the window Web Store and set the context for the different tenants
1) Optionally modify the the user interface, css, etc, in the file compiereWebStoreBase.war
2) Change the context in the file compiereWebStore.xml (this will become the application.xml file of the ear file)
3) Execute RUN_setup - this creates a compiereWebStore.ear file - rename that, e.g. to compiereWebStore1.ear
For the next tenant
1) Optionally modify the the user interface, css, etc, in the file compiereWebStoreBase.war
2) Change the context in the file compiereWebStore.xml (this will become the application.xml file of the ear file)
3) Execute RUN_setup - this creates a compiereWebStore.ear file - rename that, e.g. to compiereWebStore3.ear
After you created the ear files for all tenants:
1) In the deployment directory (/Compiere2/jboss/server/compiere/deploy) delete the last web store file created (compiereWebStore.ear)
2) Copy the specific ear files compiereWebStore1.ear, compiereWebStore2.ear from the /lib directory into the deployment directory
Alternatively, you could leave the default name (compiereWebStore.ear) for the last tenant, so that if someone executes RUN_setup you would not have to delete the automatically copied ear file (f you don't delete it, the deployment will fail at JBoss startup).