0

I have a Matrix field set up as a CartThrob options field and would like to list orders based on whether a certain option was part of the order.

Something like this:

    {exp:channel:entries
      channel='orders'
      disable="categories|category_fields|member_data|pagination"
      search:{order_items}{item:entry_id}{/order_items}="1088"
      }
      <tr>
        {order_items}
          <td>{item:entry_id}</td>
          <td>{item:title}</td>
        {/order_items}
        <td>{order_customer_full_name}</td>
        <td>{order_customer_email}</td>
      </tr>  
    {/exp:channel:entries}  

Is it possible to use options like that in the search parameter? It seems to be ignored.

2 Answers 2

1

You'll probably have weird EE template parsing order issues doing this. I think you'd need an outer loop to look it up, maybe with a custom query, and feed that to exp:channel:entries or similar.

0

Thanks Matt.

It seems what I was trying isn't possible but I have something similar working by using stash to set a list of orders with the item option as a stash variable. Than filtering it down based on that.

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.