VoordeMensen
  • Documentatie & support
  • Dashboard
    • Algemeen
    • Bestellingen
      • Overzichtspagina's
      • Detailpagina
    • Evenementen
      • Evenementen bewerken
      • Overige pagina's
    • Prijzen
    • Locaties
    • Bezoekers
    • Rapportages
      • Report Builder
    • E-mail
      • Automatische mails
      • Campagnes
      • Selecties
      • Systeemberichten
      • Templates
      • Verzendlog
    • Instellingen
      • Algemeen
      • Betaalmethoden
      • Pop-ups
      • Tekst & Taal
      • Webshop
    • Vormgeving
      • CSS
      • Ticket PDF's
      • Wallet
      • Templates
    • Koppelingen
      • API-keys
      • Close
      • Tracking / Analytics
      • Webhooks
      • Yesplan
  • Kassamodule (Nolita)
    • Kaarten verkopen
    • Reserveringen
    • BOCA printer
  • iOS app (Doorblitch)
    • Scannen
    • Bezoekerslijst
    • Kaarten verkopen
  • API & Integrations
    • Introduction
    • WordPress plugin
    • Manual integration
      • Cart & Counter
      • Customize classes
    • Google Data Studio
      • Data Studio Support
    • API public endpoints
      • Events
      • Ticket types
      • Cart
      • Payment
      • Order
  • Email-template
Powered by GitBook
On this page
  1. API & Integrations
  2. Manual integration

Cart & Counter

PreviousManual integrationNextCustomize classes

Last updated 3 years ago

There are two ways to manually get the numbers of items in a basket.

  1. The preferred way would be to make an AJAX call to and loop over the elements to count the numberoftickets key Example HTML: Tickets in your basket: <span id="basket"></span> Example Jquery Javascript:

    $.get( "https://tickets.voordemensen.nl/api/demo/cart/52c5acccccb852328deb1345b1ee9672", function( data ) {  
        numberoftickets=0;
        data.forEach(function(data) {
            if(!isNaN(data.numberoftickets)) numberoftickets=numberoftickets+data.numberoftickets;
        });
        $( "#basket" ).html(numberoftickets);  
    });
    

  2. Or request the plain number by making a call to https://tickets.voordemensen.nl/client_name/event/cartnr?murmur=cartid This call will return a plain number you can display anywhere.

the API public endpoint for cart