1

I'm using this to check if there is anything in the cart, but it throws an error on the front end. Is there a different ay to do this?

{exp:store:cart} {if items}Go to Order Form{/if} {/exp:store:cart}

The error: Message: Array to string conversion Filename: libraries/Functions.php Line Number: 2584

2 Answers 2

1

Just needed to use {items}{/items}.

1

You can also use {no_items} to check if the cart is empty:

{exp:store:cart}

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

    Your cart: {order_qty} items - {order_total}

{/exp:store:cart}
2
  • Thanks Ian, any idea how to show if a cart is not empty? May 30, 2013 at 11:16
  • Yep, you just place everything outside the {if no_items} tag pair as normal. So the {exp:store:cart} tag pair is your not empty condition in the example above.
    – Ian Young
    May 30, 2013 at 12:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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