WordPress x aMember Shopping Cart information

Discussion in 'aMember Pro v.4' started by adrianogaleno, May 2, 2013.

  1. adrianogaleno

    adrianogaleno Member

    Joined:
    Jun 26, 2007
    Messages:
    34
    Hello, I'm trying to show some aMember Shopping Cart information on my WordPress Theme with the following code:

    <?php
    require_once 'server/paht/to/amember/library/Am/Lite.php';
    require_once 'server/paht/to/amember/bootstrap.php';
    ?>
    ...
    <?php
    $cart = Am_Di::getInstance()->session->cart;
    if($cart && $cart->getItems()){
    echo 'Your cart has ' . count($cart->getItems()) . ' item(s)';
    }
    ?>
    ... and I'm getting the error below:
    Script Error
    An internal error happened in the script,
    Can you please help or point me in the right direction? Thank you!
  2. adrianogaleno

    adrianogaleno Member

    Joined:
    Jun 26, 2007
    Messages:
    34
    Any suggestion?

Share This Page