Enabling Product Page and Shopping Cart

Depending on your business model, you can display products that are available for purchasing.

Setting up the product page involves the following tasks:

Assigning Product Page

You must add the ONBSE1.Products Visualforce page to your site to expose the product list and shopping cart functionality.

  1. Open the Site Details of your site.

    Type Sites in the Quick Find box, or navigate to User Interface > Sites and Domains > Sites. In the Sites list, click the label of the site to open its details.

  2. In the Site Visualforce Pages section, click Edit.

  3. Add the ONBSE1.Products page.
  4. Click Save.

Adjusting Product Page Labels

The Visualforce pages packaged with the JustOn Self-Service Extension make use of custom labels. The custom labels can contain up to 1000 characters and can include HTML markup.

You can overwrite the custom labels to adjust them to the needs of your business use cases.

Note

To modify custom labels, you must enable the Translation Workbench. For details, see Enable and Disable the Translation Workbench in the Salesforce Help.

The product page uses the following custom labels:

  • Products
  • MasterItems
  • MasterItemTeaser
  • add
  • MasterItemFinePrint
  • Cart
  • CartTeaser
  • remove
  • checkout
  • CartFinePrint

To modify them:

  1. In Setup, open the Custom Labels list.

    In Salesforce Lightning, navigate to User Interface > Custom Labels.

    In Salesforce Classic, navigate to Create > Custom Labels.

  2. Click the name of the label you want to modify.

    To better find the relevant labels, create a filter for the namespace ONBSE1.

  3. Click New Local Translations/Overrides.

  4. Select the target language and specify the text as required.
  5. Click Save.

Info

For help about modifying custom labels, see Create and Edit Custom Labels in the Salesforce Help.

Note

Set the locale in the global settings in order to select the intended translation.

Defining Master Item Fields

You can define the fields of the master item that are to be displayed on the products page. To this end, use the global setting Master Item Fields:

  1. In Setup, open Custom Settings.

    In Salesforce Lightning, navigate to Custom Code > Custom Settings.

    In Salesforce Classic, navigate to Develop > Custom Settings.

  2. Click Manage in the row of Global Settings.

  3. Click Edit in the row of Default.
  4. In Master Item Fields, specify the fields to be shown on the product page.
  5. Click Save.

Info

If there is no setting specified, it defaults to ONB2__Title__c,ONB2__Description__c.

Setting Sort Order

You can define the display order of master items and master products. To do so, use the global settings Master Item Sort Order or Pricebook Entry Sort Order, respectively.

  1. In Setup, open Custom Settings.

    In Salesforce Lightning, navigate to Custom Code > Custom Settings.

    In Salesforce Classic, navigate to Develop > Custom Settings.

  2. Click Manage in the row of Global Settings.

  3. Click Edit in the row of Default.
  4. In Master Item Sort Order or Pricebook Entry Sort Order, specify the SOQL order statement.
  5. Click Save.

Info

If there is no sort order defined, it defaults to the creation date.

Defining Shopping Cart Fields

You use the custom setting Cart to define which fields of an item are visible after the item has been added to the shopping cart.

Field Possible Values Description
Name string A unique name for the record.
Fieldname any item field The API name of the field of the ONB2__Item__c object to be displayed, like ONB2__Title__c.
Must be enabled in the Public Access Settings of the Force.com site.
Read Only (checkbox) true
false
Determines whether the field is editable or not.
Required (checkbox) true
false
If the field is set editable, this setting determines whether it is required or not.
Sequence positive integer A number that defines the display order of the cart fields.
Type any, including empty The field is only shown for items with that specific type.
You must add the field ON_ProductType__c to the Item object and the Product2 object if you use master products

Note

Create a Cart record for each field to be visible.

  1. In Setup, open Custom Settings.

    In Salesforce Lightning, navigate to Custom Code > Custom Settings.

    In Salesforce Classic, navigate to Develop > Custom Settings.

  2. Click Manage in the row of Cart.

  3. Click New.
  4. Specify the information as necessary.
  5. Click Save.

Info

If there are no cart fields defined, the system falls back to Title (read only) and Quantity (editable).