Jump to content
  • Checkout
  • Login
  • Get in touch


The e-commerce.

Query cart values


Recommended Posts

We've developed an application for eCommerce companies and are currently adding multiple shopping cart support. We need to query the basket items and customer delivery address for our app to work, and have noticed that sometimes these are split between 1 or 2 pages on various carts. Therefore we need to verify we can make it work with OS Commerce before starting development.


We need the following data to make our app work:

1) product IDs of items placed in basket by shopper

2) shipping address (sometimes its possible to enter billing address and specify that shipping is the same - please specify if this is the case) for the shopper

3) website delivery price: amount and currency


The first two items are often available from some kind of template/static API. The problem is sometimes that data may not be about an already completed order (most APIs provide access to that), but about the current user (registered with the website or not) making a purchase.


If not via API, these items could be scraped right from page content like link URLs (e.g. product ID from '<a href="remove_334353">remove item</a>') or fields in address form. For that, it must be possible to add a line of javascript into pages containing the data (i.e., cart or checkout). Is it possible?


Often several shipping options can be defined within an eCommerce system. If so, we need to also track which option the shopper chooses too. What cart/checkout step does this shipping selection choice take place? And what kind of selector widget is used for that?


Many thanks,


Link to comment
Share on other sites

There is no API, but these values can be scraped from the database after purchase, or directly as part of the purchase by interrogating the cart, order, shipping classes.

Thank you. We are interested in the latter option. Is there any documentation for cart, order and shipping classes?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...