1

Is it possible to retrieve the list of products in the orders or payment template tag, e.g. like in the checkout tag {items}?

After successful payment we display a summery page using the {exp:store:orders} or {exp:store:payment}, along with the orders summery we would like to display a list of the items related to that order (like in the control-panel).

We tried something like:

{exp:store:payment order_hash={last_segment}
    Your order ID: {order_id}
    ...
    {items}
        {exp:channel:entries entry_id="{entry_id}"}
            {title}
        {/exp:channel:entries}
    {/items}
{/exp:store}

But unlike within the {exp:channel:checkout} tag this does not work.

Do we need to use a manual query?

Thank you, Daniel

1

The {items} tag does work with the {exp:store:orders} and {exp:store:payment} tags, but a little different than in the {exp:store:checkout} tag. Simply do not use a nested {exp:channel:entries} tags.

So this works:

{exp:store:payment order_hash={last_segment}
    Your order ID: {order_id}
    ...
    {items}
        {title}
    {/items}
{/exp:store:payment}

All variabes are available like in the checkout tag, e.g. {item_qty},{item_total} etc.

  • You only need to use a nested {exp:channel:entries} tag when you are trying to get custom fields data into your cart, checkout, payment or orders data. For example if you wanted to show an image thumb from a custom field you would need to nest the channel entries tag in the orders tag. – Justin Long Jul 11 '14 at 13:38
  • You would probably be better off using the {exp:store:orders} tag over the payment tag if you are displaying the orders summary, but either way the closing tag should be either {/exp:store:orders} or {/exp:store:payments} not {exp:store} as in your template. – Justin Long Jul 11 '14 at 13:41
  • true, was a typo, added "payment" so that the closing tag matches the opening tag. – user1514 Jul 14 '14 at 19:22
  • {exp:store:payment order_hash={last_segment} should also be {exp:store:payment order_hash="{last_segment}"} – Justin Long Jul 14 '14 at 23: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.