Cart Server

The Cart Server web service provides several Web methods for interacting with shopping carts.

For SOLO Server Shared URL, this can be reached at https://secure.softwarekey.com/solo/webservices/cartserver.asmx

Please contact us if you need assistance determining the correct URL.

The cartserver.asmx page offers the following Web methods:

AddCartItem

Adds an item to a cart.

Input

Parameter Data Type Required/Optional Description
cartID int Required The cart ID to which the item is to be added.
prodOptionID int Required The Product Option ID to add to the cart.
quantity int Required The quantity of the item to add .
upgradingFrom int Optional If upgrading from an existing License ID, the License ID being upgraded from. Pass in 0 (zero) if not upgrading.
returnPage string Optional The URL of the page to return the customer to when the Continue Shopping button on the cart is clicked. Pass in an empty string for no return page. If an empty string is passed, the URL will revert to the Continue Shopping URL specified in the Cart Options.

Output

The result dataset contains the following parameters:

Parameter Data Type Description
result int
  • If the result is greater than 0 (zero), the result represents the new CartItemID.
  • If the result equals 0 (zero), this indicates a general failure to update the database as expected.
  • If the result is less than 0 (zero), the result represents a generated error code. The error codes and their associated meanings are as follows:
    • -1: The prodOptionID passed in is invalid.
    • -2: The Product or Product Option is disabled.
    • -3: There is no merchant account associated with the cart.
    • -4: The Product Option is a Payment Plan item and the merchant account disallows storing credit card information; therefore, the item cannot be added to the cart.
    • -5: Unhandled quantity check failure. If you encounter this error, please open a support ticket and a member of our Technical Support staff will respond to your query as promptly as possible with further details.
    • -6: The specified quantity is greater than the maximum allowable quantity for the option.
    • -7: The specified quantity is less than the minimum allowable quantity for the option.
    • -8: The Product Option is out of stock and does not allow back ordering (for options with Real Time Inventory Tracking enabled).

CreateCart

Creates a new cart.

Input

Parameter Data Type Required/Optional Description
authorID int Required The Author ID for which the cart is to be created.
mallID int Optional The Mall ID under which the cart is to be created (for advanced SOLO Server installations only). Pass in 0 (zero) if there is no Mall ID.
distributorID int Optional The Distributor ID associated with the cart. Pass in 0 (zero) if there is no Distributor ID.
source string Optional The source to be associated with the cart. Pass in an empty string if there is no source.
promoCode string Optional The Promo Code to be associated with the cart. Pass an empty string if there is no Promo Code.
originalQS string Optional The initial query string to be associated with the cart. Pass in an empty string if there is no original query string.
isSingle bool Required Pass in True to create a cart in single order mode; otherwise, pass in False.
returnPage string Optional The URL of the page to which the customer will be returned upon clicking the Continue Shopping button on the cart. Pass in an empty string if there is no return page. In this case, the URL will revert to the Continue Shopping URL specified in the Cart Options.
ipAddress string Required The IP address of the customer for whom the cart is being created.

Output

The result dataset contains the following parameters:

Parameter Data Type Description
cartID int The new Cart ID. If a general failure occurred during creation of the cart, this value will be set to 0 (zero).

LockCart

Locks a cart, preventing the user from making any modifications.

Input

Parameter Data Type Required/Optional Description
cartID int Required The CartID to lock.

UpdateCartCustomerID

Updates the CustomerID on a cart.

Input

Parameter Data Type Required/Optional Description
cartID int Required The CartID to update.
customerID int Required The CustomerID to associate with the cart.

UpdateCartShipping

Updates the shipping details associated with the cart.

Input

Parameter Data Type Required/Optional Description
cartID int Required The CartID to update.
shortName string Required The Short Name of the shipping option to associate with the cart. This is case-sensitive.
company string Required The shipping company. Pass in an empty string if there is no company name to specify.
firstName string Required The shipping first name.
lastName string Required The shipping last name.
address1 string Required The shipping address line 1.
address2 string Optional The shipping address line 2. Pass in an empty string for no address line 2.
city string Required The shipping city.
stateProvince string Required The shipping state/province. For US and Canadian addresses, this should be validated to be a valid state/province code. See State Codes and Country Strings as well as Client Validation Script for details on validation.
postalCode string Required The shipping postal code. For US and Canadian addresses, this should be validated to be a valid postal code. See State Codes and Country Strings as well as Client Validation Script for details on validation.
country string Required The shipping country. This should be a valid SOLO Server country string. See State Codes and Country Strings as well as Client Validation Script for details on validation.

To clear the shipping details from a cart, pass in empty string to all of the string inputs.