Minesh
Supporter
Languages:
English (English )
Timezone:
Asia/Kolkata (GMT+05:30)
Can you please check now: hidden link
I've created the following view "list-all-orders" that query the orders:
=> hidden link;
And created the following view "list-products-belongs-order" that query the products belongs to order:
=> hidden link
And added the view "list-products-belongs-order" within the Loop editor of "list-all-orders" as given under:
<td> [wpv-view name="list-products-belongs-order" ids="[wpv-ordered-product-ids]"] </td>
Where:
- [wpv-ordered-product-ids] will return the ordered product IDs.
More info:
=> https://toolset.com/documentation/user-guides/views/views-shortcodes/#wpv-ordered-product-ids
I can see its works as expected, you can format the view's loop editor to output the things as per your requirement.
Hi Minesh,
but what about my shortcode and views - it has vice versa logic - I need to show:
- View "sht-adm_orders-prod_list" - shows all products & than breackdown by all orders "sht-adm_orders-list" which needs to be filtered by 'prodid' shortcode attribute [get_orders_by_product_id]
What you did - it is the view logic - All orders & breackdown by Products per orders
I've tested again the View "sht-adm_orders-prod_list" (list of. Products) and subsidary view "sht-adm_orders-list" (list of orders with product in it) - I've switched to constant , Order ID = 5697
The result of View was completely wrong - it shows all the products has order # 5697 . That is totally wrong, because the order #5697 is only for product ID 5313.
That means there is a bug in filtering Views. I expect to see
Product ID 5313 & related order 5697
Product ID XXXX & 'No items found' for related orders.
Solution provided vice versa I've asked