Web Content Display
Ecommerce Modules Documentation
Sammary
- Created: Wed, 04 Sep 2019
- latest Update: Mon, 30 Sep 2019
- By: Khaoula
Deliverables
Deliverable are:
ecommerce-modules.zip: The modules installation package.
This package contains :
- Latest Products modules for Unify theme
You can download the packages from our software catalog.
User documentation
This section will allow you to install and start using the modules in the Unify Ecommerce Theme. You can download the Theme from https://www.themeray.com/themes/ecommerce
Installation
Install the modules
They are tow method to install the customized modules for unify ecommerce portal:
- Copy the list of modules in the deploy folder under the Liferay portal:
- liferay.commerce.product.latest.web-1.0.0.jar
- Copy the same list of the modules in the osgi/modules folder and restart the Liferay server.
Configuration of the modules
Fix health check
The first step is to fix the issues in the health check section in ecommerce modules.
Go to the ecommerce / settings menu and click on the health check tab in the setting page.
Click on fix issue buttons on each item.Make catalog visible for guest
The first step is to create à Catalog Rules to manage the catalog’s visibility.
By default, all users are blacklisted: if no catalog rules are in place, then no users (except Site administrators) can see the catalog at all.
Follow these steps:
- Go to Site Menu → Commerce → Catalog Rules and click on the Add button.
- Give the rule a Name and enable the Active toggle. To make the entire catalog visible, select All products from the Type drop-down box. To limit the catalog’s visibility, select Categories.
- If you selected Categories, Click the Select button that appears and select the categories you want specified users to be able to see. Click Done.
- Click Save. A new tab, User Segments, appears at the top of the page.
- Click on User Segments and then click the Add button. Select the segment or segments to which this rule should apply. Click Add. In your case choose guest user segment.
If you specify more than one segment, the rule applies exclusively. Only users who belong to all the specified segments are included.
After that, you need to configure the Catalogue rules in the ecommerce setting page.
Go to Menu → Commerce → Settings and click on Catalog Rule tabs. Choose Catalog Rule Application Type: One or more catalog rules must be satisfied. And click on save button.
Payment Methods
Liferay Commerce offers one payment method—money order—that does not require the services of a third-party payment provider. Integration with payment providers is also possible, with three—PayPal, Mercanet, and Authorize.net—ready to go out of the box.
- PayPal
Follow these steps to let buyers pay with PayPal:
- Go to the PayPal Developer Dashboard and obtain a Client ID and Client Secret. You must open an account and create a PayPal REST API application.
- Back in Liferay Commerce, go to Site Menu → Commerce → Settings and click the Payment Methods tab.
- Click PayPal and fill in the following fields:
- Name: Give the payment method a name, or leave it as PayPal.
- Description: Text entered in this field appears on the screen where buyers a select a payment method.
- Icon: Hit Browse to upload or select an image to display along with the name and description.
- Priority: Set a priority to determine the order payment methods appear on a page. Lower numbers come first.
- Enter the Client ID and Client Secret into the appropriate fields. Then select a Mode (Sandbox for testing, Live for actual transactions), check the Active box, and click Save
- Money Order
While there are obvious downsides to money orders—starting with the time it takes to deliver payment through the mail—the payments are widely used in some circles, and not necessarily only by low-tech firms. Follow these steps to allow customers to pay by money order:
- Go to Site Menu → Commerce → Settings and click the Payment Methods tab.
- Click Money Order and fill in the following fields:
- Name: Give the payment method a name, or leave it as Money Order.
- Description: Text entered in this field appears on the screen where buyers select a payment method.
- Icon: Hit Browse to upload or select an image to display along with the name and description.
- Priority: Set a priority to determine the order payment methods appear on a page. Lower numbers come first.
- Message: Text entered here is displayed after the customer chooses the money order option. This text tell customers where to send the money order, provide a shipping time estimate, or the like.
- Set the Active toggle to yes and click Save.
- Mercanet:
Follow these steps to let buyers pay with Mercanet.
Because Mercanet accepts only the Euro, the store’s primary currency must be Euro. To change the primary currency,
- Go to the Control Panel → Commerce → Settings.
- Click Currencies.
- Click the 3-dot icon next to Euro.
- Click Set as Primary.
Once the store’s primary currency has been changed, Mercanet can now be used.
- Go to [Mercanet](https://documentation.mercanet.bnpparibas.net/index.php?titl e=Obtenir_sa_cl%C3%A9_secr%C3%A8te#) to obtain a Mercanet Merchant ID, Secret Key, and a Key Version.
- Click Site Menu → Commerce → Settings and choose the Payment Methods tab.
- Click Mercanet and fill in the following fields:
- Name: Give the payment method a name, or leave it as Mercanet.
- Description: Text entered in this field appears on the screen where buyers a select a payment method.
- Icon: Hit Browse to upload or select an image to display along with the name and description.
- Priority: Set a priority to determine the order payment methods appear on a page. Lower numbers come first.
- Set the Active toggle to yes and click Save.
- Click the Configuration tab.
- Enter the Merchant ID, Secret Key, and Key Version into the appropriate fields. Then select an Environment (Simulation or Test for testing, Production for actual transactions), and click Save.
- Authorize.Net:
Follow these steps to let buyers pay with Authorize.net.
- Go Authorize.net and obtain an API Login ID and a Transaction Key.
- Back in Liferay Commerce, go to Site Menu → Commerce → Settings and click the Payment Methods tab.
- Click Authorize.net and fill in the following fields:
- Name: Give the payment method a name, or leave it as Activate.net.
- Description: Text entered in this field appears on the screen where buyers a select a payment method.
- Icon: Hit Browse to upload or select an image to display along with the name and description.
- Priority: Set a priority to determine the order payment methods appear on a page. Lower numbers come first.
- Set the Active toggle to yes and click Save.
- Click the Configuration tab.
- Enter the API Login ID and Transaction Key into the appropriate fields. Then select an Environment (Sandbox for testing, Production for actual transactions), and the check the appropriate boxes for Display options and Security options.
- Click Save.
Payment Methods
When buyers place orders, they should be prompted to choose among a variety of shipping options. You can create as many shipping options as you like, but they all calculate shipping costs using one of three methods:
Flat Rate shipping applies the same price to every product in the catalog.
Variable Rate shipping uses a formula to calculate a unique rate for each order by weight, product price, or other factors.
Carrier shipping aligns your shipping processes closely with those of a shipping company. This can help ensure the prices you charge your customers closely match your actual shipping costs.
You can create many options for each method, but remember that every shipping option you create becomes available to ship every product in the catalog.
Buyers can choose a flat rate shipping option to ship any product. By creating multiple flat rate options, you can give customers choices of cost, speed, or security.
- Flat Rate Shipping
Flat rate shipping imposes the same cost on every product in the catalog. You can create exceptions, however, for individual products from the Shipping Extra Price field in the product’s Configuration tab.
Creating A Flat Rate Shipping Option
- Go to Site Menu → Commerce → Settings and click the Shipping Methods tab. Choose the Flat Rate method and then the Shipping Options tab.
- Click “+” Add and fill in the following fields:
- Name: Buyers see this name when selecting a shipping option.
- Description: Information about the option—delivery time, guarantees, insurance and the like—should go in this field.
- Amount: Set the method’s cost.
- Priority: Sets the option display order. Lower numbers come first.
- Click Save. To create more than one option, repeat steps 2 and 3 as needed.
- Click the Details tab and check the Active box. Click Save.
The Details tab also contains fields for changing the name and description of the flat rate shipping method. This may be useful for reference, but the text is not automatically displayed to customers. You can also set a priority that orders flat rate shipping options relative to options of other methods.
- Variable Rate Shipping:
Variable rate shipping calculates shipping costs using three factors: the order’s weight, its subtotal (cost before shipping and taxes), and any fixed price you impose. You choose the priority of each factor.
You can create multiple different shipping options with variable rates. For example, you might create a “Standard Ground” option with a relatively low cost per unit of weight, as well as a “Two-Day Air” option that calculates costs in the same way but results in a higher price.
Creating A Variable Rate Shipping Option
Variable-rate shipping costs are determined by the following formula: `shipping costs = [fixed price] + ([order total weight] x [rate unit weight price])
([order subtotal] x [rate percentage])`.
Follow these steps:
- Go to Site Menu → Commerce → Settings and click the Shipping Method tab. Choose the Variable Rate method and then the Shipping Options tab.
- Click “+” Add and fill in the following fields:
- Name: Buyers see this name when selecting a shipping option.
- Description: Information about the option—delivery time, guarantees, insurance and the like—should go in this field.
- Priority: Sets the option display order. Lower numbers come first.
- Click Save. Then click the Shipping Option Settings tab.
- Click “+” Add and fill in the following fields:
- Shipping Option: Select the shipping option for this setting. The first time through, select the option you named in step 2.
- Warehouse: Select a warehouse if this method should apply only to shipments from one location. Leave blank to use this method for all warehouses.
- Country, Region, Zip: Make an entry if this shipping method should be restricted to destinations within the area you define.
- Weight From, Weight To: Enter a weight range for orders that can use this option.
- Fixed Price: An entry in this field sets an effective minimum price and contributes the fixed component of the shipping cost formula. It can be left blank.
- Rate Unit Weight Price: An entry in this field imposes a cost per unit of weight. It can be left blank.
- Rate Percentage: An entry in this field imposes a shipping cost based on a percentage of the order subtotal. It can be left blank.
- Click Save. To create more than one option, return to the Shipping Options tab and repeat steps 2 through 4.
- Click the Details tab and check the Active box. Click Save.
The Details tab also contains fields for changing the name and description of the flat rate shipping method type. They may be useful for reference, but the text is not automatically displayed to buyers. You can also set a priority, which orders variable rate shipping methods relative to other types.
Catalog Management
The Liferay Commerce catalog is at the heart of any store site, storing and organizing its core content. It lists the products the store offers, and stores the information and relations necessary to organize and display them. The catalog tracks not only what items are for sale, but also inventory levels, product variants, and category assignments. It also organizes product files, such as images and user manuals, and contains pricing information.
To view the catalog, go to Site Menu → Commerce → Catalog. Its contents are displayed under the Products tab.
The first step is to create a category for the product:
Product Categories
- Creating Categories:
To create vocabularies, categories and subcategories, go to Site Menu → Categorization → Categories.
Note: Categories nest hierarchically. While this allows multiple categories to be grouped together and handled as a single unit, it also makes it difficult for administrators to see the entire vocabulary. To view all categories at once, go to Control Panel → Configuration → System Settings → Assets and select Flattened Tree from the drop-down menu in Asset Categories Web. Then return to Site Menu → Content → Categories.
- Adding And Removing Products From Categories
Follow these steps:
- Go to the catalog, select a product, and open its Categorization tab.
- Click on the Select button under the label for the appropriate vocabulary, and in the pop-up that appears the check the box next to each category that applies.
- Click Save.
A product can be removed from a category the same way by unchecking the boxes in step 2. Alternatively, several products can be removed at once using the category application:
- Find the category you want at Site Menu → Categorization → Categories. Then click Options → Edit, and select the Products tab.
- Check the box next to each product you want to remove from the category.
- Click Remove.
- Category Display Page
You may want to associate more than just products with your categories. The category display page creates a relationship between a category, a specified page, and a URL for that page. This relationship helps display and organizes content or applications related to that category, as changes made to the category are reflected on the page automatically. A typical use case uses the page to display category content for customers.
Follow these steps to create a category display page:
- Create a page.
- Find the category you want to associate with the page in Site Menu → Categorization → Categories. Then click Options → Edit, and select the Category Display Page tab.
- Click Choose and select the page you just created.
- Enter a Friendly URL.
- Click Done to close the pop-up and then click Save.
This process creates a relationship between the category and a blank page. At any point, you can populate the page with whatever content or applications suit your purposes.
- Images
Uploading images and associating them with product categories lets you designate a generic category page that automatically displays images and products for whatever category a buyer wants. These images can be updated by publishing a new category image. For more details on setting up a generic category page to display content dynamically, see Category Detail Page.
Follow these steps to assign images to a category:
- Find the category you want at Site Menu → Content → Categories. Then click Options → Edit, and select the images tab.
- Click on the “+“ button. You can either upload an image or choose one from the Documents and Media Repository.
- Click Save.
Products
The catalog supports three product types: simple, grouped and virtual.
Simple Product: any physical product for which inventory is tracked. Almost any physical item can be a simple product.
Grouped Product: two or more products from the catalog, packaged together to be sold as a single item. Grouped products are not tracked in inventory—instead, the catalog tracks all of the products contained in the group individually. A grouped product can contain simple products, other grouped products, or virtual products.
Virtual Products: A virtual product is any non-physical product. Typically, a virtual product’s inventory is not tracked. This may mean that the product is downloaded rather than shipped, as in the case of a music file or an electronic publication. Other virtual products might be services, warranties, or other goods.
- Creating A Product
Follow these steps to create a product:
- From the catalog’s Products tab, click on the “+” button at the top-right of the screen and then select a product type: simple, grouped or virtual.
- Next, enter basic product information into the Add Product form (see below for details).
Once the Add Product form is complete to your satisfaction, click the Publish button to add the product to the catalog. The product tab bar appears at the top of the screen (and can be reached again at any time by navigating to the catalog and selecting a product). The first tab, Details, is populated with your responses from the Add Product form.
- Enter additional information specific to the product type you selected in step 1.
For a Simple Product, there is no additional information to enter. When you create a simple product, the standard product tab bar is displayed, starting with a Details tab where you can edit entries from the Add Product form.
For a Grouped Product you must specify the products that it will contain. A grouped product has an extra tab—Grouped—in its product tab bar. From that tab, click on the “+” button in the upper-right to select any number of products. Once products have been added to the group, they can be edited individually (options → Edit) to set a quantity and a priority (priority establishes the order in which items are displayed—lower numbers come first).
Figure 1: The features that make a grouped product unique can be conveniently found in the *Grouped* tab.
A Virtual Product also has an extra tab—Virtual—in its product tab bar. The Virtual tab contains the following fields which should be filled in if applicable:
URL/Select File: If your virtual product is stored at a web address, enter the URL here. Alternatively, click Select to upload a local file or select one that was uploaded previously.
Activation Status: Select the stage in the order process at which the product becomes available for download.
Duration: Enter the number of days after purchase in which customers will have access to the file. A value of 0 sets no limit.
Max Usages: Set the number of times a customer can download the file. A value of 0 sets no limit.
Sample: Upload or enter a URL for a sample file to provide to prospective buyers. The Use Sample box must be checked for customers to see the sample.
Terms of Use: Either enter a Terms of Use document directly into the integrated editor, or select a document previously uploaded to Web Content.
- Add Product Form
The Add Product form contains the following fields:
Title: Name your product. This is the only required field.
Short Description: Enter an abstract of the product’s full description if you must display brief version. Text entered here could be displayed where the product appears in thumbnail form or in search results—anywhere space is limited.
Full Description: This text can appear on the product page. The integrated text editor provides a number of formatting options that appear when text is selected, and clicking on the Add button that appears when the editor is in focus provides additional options. For more flexibility, click on the Code View (</>) button on the right to edit the html directly.
Friendly URL: This is the URL for the product page. It auto-fills but can be changed. If you create a product display page, you establish a relationship between the product, the page, and the URL entered in this field.
Meta Title, Meta Keywords, Meta Description: Descriptors entered in these fields can help search engines locate your products.
Schedule: Products can be displayed to customers for a preset window of time. If you don’t want to bother with scheduling, make sure the Never Expire box is checked. Unchecking the Published box will remove the product from customers’ view.Options
An option is a product feature that a buyer can select or specify. An option could prompt a buyer to choose between T-shirts of different colors, building materials of different dimensions, or engines of different displacements.
To create an option, you must first create an option template and then a set of option values. You must also apply the template to a product.
An Option Template describes the kind of variation that the option defines. If the buyer should be prompted to choose between product variants of different sizes, then the template would be defined as Size.
An Option Value refers to a specific selection a buyer can choose. For example, an option template called Size can be assigned the option values Small, Medium, and Large.
Note: not every option requires option values. Values allow buyers to choose from among preset variants. Values are not required for options that are open-ended: for instance, the buyer can be prompted to enter custom text to be printed or engraved on the product, or asked to provide schematics of a custom product for fabrication or 3D-printing.
You can select whether an option template requires values when you set its field type (see below).
An option template can be applied to any product in the catalog. This makes it easy to apply frequently-used options to a large number of products. Once applied, however, the link between template and product is severed: template changes don’t affect the product, and product changes don’t affect the template. This allows each product’s options to be customized, and it ensures that those customizations aren’t unintentionally changed by future template changes.
- Creating An Option Template:
Follow these steps to create a new option template:
- Go to Site Menu → Commerce → Catalog and click on the Options tab. This displays a list of existing templates on the left of the page and the Option Template Detail form on the right.
- Then click “+”, fill in the following fields from the Option Template Detail form, and click Save.
- Title: Give the template a name, such as size or color.
- Description: This text can be displayed on the product page.
- Field Type: Select from the following different ways to display options to customers:
- Select from List: Displays option values in a drop-down box.
- Single Selection: Displays option values with a radio button next to each. Since radio buttons cannot be deselected, only use this field type for options where a selection is required.
- Date: Prompts buyers to select a specific date—applicable for services, deliveries, and the like. It does not take option values.
- Boolean Question: Displays a checkbox next to the option template. It does not does not take option values. It is useful where an option is a simple binary, such as “gift-wrap”.
- Multiple Selection: Displays a checkbox next to each option value. This allows more than one value to be selected for a single template—useful for offering a choice among add-ons or accessories.
- Numeric: Displays a field where a number can be entered, for entering custom dimensions or the like. It does not take option values.
Use in faceted navigation: enable to allow search results to be filtered for this option.
Required: forces customers to make a selection before purchasing products that use this option.
SKU Contributor: a SKU contributor can be assigned a unique price and other attributes for each variant via SKUs. If enabled, the option must have an SKU in order to be sold.
Key: A unique identifier for referring to this option programmatically. As this field is filled automatically, most users can safely leave it alone.
Once an option has been created and saved, it is displayed in the list on the left side of the screen.
- Creating Option Values:
Depending on the Field Type you specified when you created your template, you may need to create values for your option.
Follow these steps:
- Go to the catalog and select the Options tab. Find the template you want to create values for and click on the values button next to its title.
- Click the “+” button and fill in the following fields in the Option Value Detail form.
- Click Save. Repeat steps 2 and 3 to create additional values.
Title: Give the value a name.
Priority: Values are displayed on a page in order of priority. Lower numbers come first.
Key: A key is a unique identifier for referring to this value programmatically. This field is filled automatically, so most users can safely leave it alone.
These values apply to every product where the template is applied. You can override these values for individual products when you apply the template to a product.
- Adding Custom Option Field Types
The field types used by Option Templates (see Creating an Option Template, above) are the same as those used by the Forms application. To create custom field types, see Form Field Types.
Once a custom form field type has been created, follow these steps to activate it as an Option Field Type:
- Go to Control Panel → Configuration → System Settings → Catalog → Product Options.
- Click the “+” button and enter the new field type’s Key in the field that appears.
- Click Save. Your Field Type is now available for use by Option Templates.
Specifications
A specification stores a single piece of product information. A product’s dimensions, color, weight, capacity, or almost any other attribute can be recorded as a specification. Specifications make it easy to present product information and simplify the process of comparing similar products.
Figure 1: Specifications are most visible on product display pages.
To organize specifications and make them easy to display and maintain, the data are structured into three components: groups, labels and values.
A Specification Group is a container for specifications. Several specifications with common characteristics can be organized into a group
A Specification Label names a specification.
A Specification Value provides product-specific information.
- Specification Groups:
Follow these steps to create a specification group:
- Go to Site Menu → Commerce → Catalog, open the Specifications tab and then the Specification Groups sub-tab.
- Then click the “+” button and fill in the following fields:
Title: Give the group a name. Typically a group’s title will indicate what its labels have in common.
Description: If necessary, explain the group more fully.
Priority: Priority establishes the order to display the specification groups. Smallest numbers go first.
Key: A unique identifier for referring to this group programmatically. As this field is filled automatically, most users can safely leave it alone.
Once the form is complete, click Save.
- Specification Labels:
Follow these steps to create a specification label:
- Go to Site Menu → Commerce → Catalog, open the Specifications tab and then the Specification Labels sub-tab.
- Click on the “+” button and fill in the following fields:
Title: Give the label a name that describes the values that may be assigned to it.
Description: If necessary, explain the label more fully.
Use in faceted navigation: Check this box to make search results filterable for this specification.
Specification Group: Pick the group to which this label belongs. This is optional and can be overridden at the product level where specification values are defined (see below for details).
Click Save. The label has been created, but assigning a value to it must be done on the product level.
- Specification Values:
Specification values are more limited in scope than groups and labels. Groups and labels are scoped to the catalog, which means that once they are created, they can be assigned to any product in the catalog. Values, however, are scoped to the product, and have no impact anywhere but on the product to which they are assigned.
To create a specification label, you must first assign a label to a product.
- Go to Site Menu → Catalog, select a product, and click on the Specifications tab.
- Click on the Add button and select from the list of specification labels that is displayed. Click Add to close the pop-up. This assigns the selected labels to the product.
Next, edit the label to give it a value.
- Click on the Options button next to the new label and hit Edit.
- Enter a value. For example, if your label is Material, then the value should describe what the product is made of: polymer, ceramic, or stainless steel.
- Set the priority and hit Save.