Since I was planning to have "You have # items in the cart". Is it possible to get the number of items in the cart?

I tried to do something like this:


You have {if no_items}0{if:else}{items}{/if} item(s) in the cart 


You need {order_qty}.


    {if no_items}Your cart is empty.{/if}

    You have {order_qty} item(s) in the cart.



  • ahh thanks. I tried with {item_qty} and I guess I got confused.
    – mirko
    Mar 29 '13 at 19:25
  • The Store guys have thought of most things so there's usually a tag to cover most situations. :) Don't forget to mark this answer up if it helped. :)
    – Ian
    Mar 29 '13 at 19:35
  • Just fixed your code up a little bit - the {if no_items} tag works the same way as {if no_results}, if it is true then nothing else will be displayed. Mar 30 '13 at 7:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.