We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43092
    • 11 Posts
    I have been trying to count and display number of items added to the cart in miniShop. Could someone help me out with this?

    I am relatively new to MODx and miniShop.

    Cheers, Luke
      • 42046
      • 436 Posts
      MiniShop 1 or 2?
        • 43092
        • 11 Posts
        MiniShop 1 (1.9.5)

        Quote from: absent42 at Apr 04, 2013, 04:55 PM
        MiniShop 1 or 2?
          • 37105
          • 194 Posts
          Just use
          [[+count]]
          in your chunk for the cart.
            Codeplaza Webdesign: for professional websites at low cost
            • 43092
            • 11 Posts
            I managed to get the counter with a custom snippet:

            <?php
            $miniShop = $modx->getService('minishop','miniShop',$modx->getOption('core_path').'components/minishop/model/minishop/',array());
            if (!($miniShop instanceof miniShop)) return 'Class not found!';
            $tmp = $miniShop->getCartStatus();
            print( "(" . $tmp['count'] . ")" );


            Quote from: luke.grad at Apr 04, 2013, 04:40 PM
            I have been trying to count and display number of items added to the cart in miniShop. Could someone help me out with this?

            I am relatively new to MODx and miniShop.

            Cheers, Luke