menu

SiteGenesis / Server-side JS / Module: controllers/COShippingMultiple

Controller for the multishipping scenario. Multishipping involves more than one shipment, shipping address, and/or shipping method per order.

Source:

Members

(static) AddEditAddressJSON

Edits addresses and updates the customer address book and the session address book. Renders a JSON message indicating success or failure.

Source:
See:

(static) EditAddresses

Renders a form dialog to edit an address.

Source:
See:

(static) EditForm

Form handler for multishipping form. Handles cancel, save, and selectAddress actions.

Source:
See:

(static) MultiShippingAddresses

Form handler for multishipping form. Handles the save action.

Source:
See:

(static) MultiShippingMethods

Form handler for multishipping form. Handles the save action.

Source:
See:

(static) Start

Starting point for multishipping scenario.

Source:
See:

(static) StartShipments

The second step of multishipping: renders a page for each shipment, providing a shipping method selection per shipment.

Source:
See:

Methods

(inner) addEditAddress() → {object}

Creates a new transient address. Attempts to copy address information from the multishipping form to the transient address. Updates the customer address book. Updates the session address book. If address information cannot be saved to the transient address, returns a JSON object containing success and error information.

Source:
Returns:

JSON object indicating success, error and/or address information.

Type
object

(inner) addEditAddressJSON()

Calls the addEditAddress function and renders a JSON message with information about the address and the success of the edit.

Source:

(inner) editAddresses()

Renders a form dialog to edit an address. The dialog is opened by an Ajax request and renders templates, which trigger a JavaScript event. The calling page of this dialog is responsible for handling these events.

Source:

(inner) editForm()

Form handler for the multishipping form. Handles the following actions:

  • cancel - calls the start function.
  • save - calls the addEditAddress function. If it returns an error, renders the editaddresses template.
  • selectAddress - clears the multishipping form and calls the editAddress function.
Source:

(inner) initAddressForms()

Initializes the forms for the multiaddress selection.

Source:

(inner) multiShippingAddresses()

Form handler for multishipping form. Handles the save action. Updates the cart calculation, creates shipments and renders the multishippingaddress template.

Source:

(inner) multiShippingMethods()

Form handler for the multishipping form. Handles the save action. Sets the shipping method for each shipment and copies it to the shipmentForm. If the copy fails, it renders the multishippingshipments template. If it succeeds, it calls the COBilling controller Start function.

Source:

(inner) start()

Starting point for multishipping scenario. Renders a page providing address selection for each product line item.

Source:

(inner) startShipments()

The second step of multishipping: renders a page for each shipment, providing a shipping method selection per shipment. If a basket exists, renders the multishippingshipments template. If no basket exists, calls the Cart controller Show function.

Source: