Jigoshop minicart


Recently I was working on an e-Commerce WordPress theme and I needed to add a minicart on top. The e-Commerce plugin I used for that theme was jigoshop and they provide only a widget cart and a full page, so I came with a solution. The code is bellow:

<?php echo sprintf(_n('%d item - ', '%d items - ', jigoshop_cart::$cart_contents_count, 'avtdr'), jigoshop_cart::$cart_contents_count); echo jigoshop_cart::get_cart_total(); ?> <a href="<?php echo sprintf(jigoshop_cart::get_checkout_url()) ?>" class="button" ><?php _e('Checkout', 'avtdr') ?></a> <a href="<?php echo sprintf(jigoshop_cart::get_cart_url()) ?>" class="button" ><?php _e(' View Cart ', 'avtdr') ?>

9 thoughts on “Jigoshop minicart

  1. Dany says:

    I’m french,
    Where to copy the code ?
    Create new widget ??

    Thank you

    1. Alex Gurghis says:

      Add it in the place you want to have the minicart. In my case it’s in header.php

  2. Legend. Exactly what I was looking for. Thanks.

  3. Alba says:


    I’ve done a widget, adding this in functions.php:

    if ( function_exists(‘wp_register_sidebar_widget’) )
    wp_register_sidebar_widget(__(‘id’), “Name of the widget”, ‘name_of_the_method’);

    And then, the method:

    function name_of_the_method() {
    echo sprintf(_n(‘%d item – ‘, ‘%d items – ‘, jigoshop_cart::$cart_contents_count, ‘avtdr’), jigoshop_cart::$cart_contents_count);
    echo jigoshop_cart::get_cart_total();
    <a href="” class=”button” >
    <a href="” class=”button” >

  4. Samrat Khan says:

    Good… very good

  5. Jin says:

    Can you give me a descriptive explanation on how to do this?

  6. Jesse says:

    Awesome man, thanks!

    Is exactly what I needed to put the # of items in cart on page. Much appreciated

  7. Martin says:

    Alex, thank you. But i have some issues.

    I use WordPress with Pagelines and Jigoshop. I would like to insert your mini cart php in a widget. So I installed the »Executable PHP widget« and inserted there:


    The widget I draged in the Pagelines Universal Sidebar.

    The problem is that the counter just counts exactly when you add the same product, but when you add another product the cart_total is not correct, it shows to much money. The items are OK.

    Any idea?

    user: kraft
    pw: papermag

    Thank you


Leave a Reply

Your email address will not be published. Required fields are marked *