List Cdiscount cart items
Automatically list Cdiscount cart items on cdiscount.com. List the items in the Cdiscount.com cart: for each line its line id, sku, offer id, name, seller, quantity, unit price and line price, plus the article count and the total in euros. An empty cart returns count 0, total 0 and no lines. Works as a guest: the cart lives with the browser.
Inputs
None
Output
count requiredNumber of articles (sum of quantities).
lines requiredtotal requiredCart total in euros as Cdiscount computes it; 0 for an empty cart.
FAQ
Remove from Cdiscount cart
Remove a Cdiscount.com product from the cart, whatever its quantity (every line of that sku, or only the line of one offer_id), and return the cart after. A product not in the cart returns removed false and changes nothing. Works as a guest: the cart lives with the browser.
Add to Cdiscount cart
Add 1 to 10 units of a Cdiscount.com product to the cart, from its sku, from the offer the product page shows or from a given seller's offer (offer_id from Get Cdiscount product offers), and return the cart after the add. Works as a guest: the cart lives with the browser. Nothing is paid or ordered. An unknown sku or an offer_id the product does not have is refused with a clear message.
Get Cdiscount product offers
List every seller's offer for one Cdiscount.com product by its sku, cheapest first, one page at a time: offer id (pass it to Add to Cdiscount cart), seller with id, rating, sales count and ships-from country, price and struck-through list price in euros, condition and minimum quantity. Read further pages while has_next_page is true. An unknown sku fails with an error that says so.
