---
schema_version: "1"
id: b687fa0bae217461d81f0f3fc83b73c9b8dfac8a32ade26517d5abf80ad78dfc
title: SiteGenesis Models and Views
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/cc/264-0-0/b2c_models_and_views.md
canonical_url: https://help.salesforce.com/s/articleView?id=cc.b2c_models_and_views.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: ef5e772938552fd3b0f525815f47034aec4102eea2195e6829ab83f311371a04
description: In B2C Commerce SiteGenesis, the controllers integrate into Models and Views. All scripts are Common JS modules with defined and documented exports to avoid polluting the global namespace.
products:
  - Commerce
  - B2C Commerce
release: "264"
---
# SiteGenesis Models and Views

In B2C Commerce SiteGenesis, the controllers integrate into Models and Views. All scripts are Common JS modules with defined and documented exports to avoid polluting the global namespace.

The controllers integrate into Models and Views. All scripts are Common JS modules with defined and documented exports to avoid polluting the global namespace.

**Model and View Modifications**

`**CartModel.js**`–Model for cart functionality. Creates a CartModel class with payment, shipping, and product helper methods.

- Adjust the `validatePaymentInstruments` function for use with validating Stripe or PayPal objects.

**`CartView.js`**–View used to render the cart. This view makes sure the coupons, shipments, and basket calculation are up to date before rendering the cart.

- Require the `paymentHelpers` script from `plug-in_commercepayments`
- To present express checkout on cart page, use it to create a payment request and supporting data