Helpcenter +918010117117 //cdn1.storehippo.com/s/573db3149f0d58741f0cc63b/ms.settings/5256837ccc4abf1d39000001/57614ef64256dc6851749879-480x480.png" support@storehippo.com https://www.facebook.com/StoreHippohttps://twitter.com/StoreHippohttps://www.linkedin.com/company/hippoinnovations/https://plus.google.com/+Storehippo/posts
B4,309-10 Spaze iTech Park, Sector 49, Sohna Road, 122001 Gurgaon India

ms.cart

This object contains the current cart information.

Note: If you want to refer to ms.cart widget, then, visit here.


Variables

ValueDescription
_idIt is the unique alphanumeric identifier for the cart. It is used to differentiate between carts and users. It is also used to call API.
available_optionsIt contains the list of available order options defined in a store. It is the instance of ms.order_options.
available_payment_methodsIt contains the list of available payment methods for the cart. It is available on front end as well as back end scope. It is not send to database. It is the instance of ms.payment_methods.
additional_chargesIt is an array of object containing details of additional charges.
available_shipping_methodsIt contains the list of available shipping method for the cart. It is available on front end as well as in back end scope. It is not send to database.
billing_addressThe billing address is associated with the payment method. This address is an optional field that will not be available on orders that do not require one. It has the following properties:
full_name: The full name of the person associated with the payment method.
address: The street address of the billing address.
city: The city of the billing address.
state: The state of the billing address.
country: The name of the country of the billing address.
zip: The zip or postal code of the billing address.
phone: The phone number at the billing address.
client_detailsThe object contains the detail of the client system. These details are gathered for navigator object of JavaScript.
coupon_codeIt contains the code applied by a user in order to avail any sort of discount.
currencyIt is the object containing name and conversion_rate of currency
currency_codeThis contain the conversion rate of the currency of the currency code.
currency_rate:'0.14'
discountsIt is an array of object containing details of cart level discounts.
{ "_id":"53b256e9b3af14aa15e451a5",
"saving_amount":50,
"coupon_code":"HIPPO" }
discounts_totalIt is the total value of cart level discount. It has numeric value.
email_idThis object contains the email id of customer.
item_countIt contains the total numbers of items which are added to cart.
itemsThis object contains an array of items which are added to the cart. Array contains item_id, name, alias, discounts and other details.
user_idThe object contains the total amount payable for placing the order on the cart.
totalThe object contains the total amount payable for placing order on the cart.
taxes_totalThe object contains the total tax amount charged on the cart.
total_weightThe object carries summation of the weight of all items in the cart.
shipping_methodIt contains the object of shipping method which is currently applied to cart object. This contains _id, name and price of shipping method.
payment_methodIt contains the object of payment gateway which is currently applied on cart object. This contains _id, name, type and settings of payment method.
available_shipping_chargesIt contains the list of available shipping charges applicable on the cart.
available_walletsIt contains the list of available wallets defined in a store.
discounts_percentageIt is the total value of cart level discount. It has percentage value.
ecouponIt contains the information about the coupon applied on the cart.
optionsIt contains the information about the order options applied on the cart.
shipping_addressThe shipping address is associated with the payment method. This address is mandatory. It has the following properties:
full_name: The full name of the person associated with the payment method.
address: The street address of the shipping address.
city: The city of the shipping address.
state: The state of the shipping address.
country: The name of the country of the shipping address.
zip: The zip or postal code of the shipping address.
phone: The phone number at the shipping address.
shipping_chargesIt is an array of object containing details of the shipping charges applied on the cart.
shipping_totalThis object contains the total shipping amount charged on the cart.
walletsIt is an array of object containing details of the wallets used for cart.
sub_totalIt contains the total amount of the cart before any shipping charges or taxes are applied on the cart.
taxesIt is an array of object containing details of cart level taxes.

Methods

ValueDescription
getUserCartThis API is used to get cart of the user. If any other cart is present, then the user cart and current cart is merged. This API is called when the user logs in or the user is getting registered. It picks the user id from the current session.
updateCartThe API is used to override the content of the existing cart.
getCartThe API is used to retrieve the cart with a valid unique identifier. If cart with given _id is present and valid, then same cart is returned else a new empty cart is returned.
updateQuantityThe API is used to add a product to an existing cart, and return the updated cart.
addItemThe method is used to add products to the current user cart. It requires product and product quantity as parameters.
removeItemThis method is used to remove products from the current user cart. It requires the product as parameter which you want to remove from the cart.
applyCouponThis method is used to apply the coupon to the current user cart. It requires coupon code as parameter which a user wants to apply on the cart.
removeCouponThis method is used to remove coupon from the current user cart.
updateAddressesThe method is used to update user billing and shipping address to the current user cart. It requires the billing and shipping address as parameters.
updateShippingMethodThe method is used to update shipping methods in the cart. It is helpful when the cart has more than one shipping method applicable. By default, the first shipping method is updated from the back end. This method requires method id as the parameter which the user wants to apply on the cart.
updatePaymentMethodThe method is used to update payment methods in the cart. It is only helpful when the cart have more than one payment methods is present. By default, the first payment method is applied on cart from the back end. This method requires payment method details as parameters.
placeOrderThis method is used to place an order. With a click, the order gets placed directly in case of cash on delivery payment method, and the user gets redirect to the payment gateway page in case of any online payment method.