Please look at the page here:
hidden link
We are trying to emulate the page located here:
hidden link
The only thing we're missing is the field on the original page that shows:
Title: Individual Member
This field pulls the Ordered Product Title from the store order. I'm not seeing a field that will do that in Toolset. I currently have the field defined as
[wpv-woo-product-meta]
But that's only producing a blank space. I also tried the field called Ordered Products, but that only produces numerical output, which I assume is the ID # for the product.
Hi,
Thank you for contacting us and I'd be happy to assist.
The Toolset offers a "wpv-ordered-product-ids" shortcode which returns the comma-separated list of products that are included in the order:
https://toolset.com/documentation/programmer-reference/views/views-shortcodes/
[wpv-ordered-product-ids]
You can use this shortcode in a custom registered shortcode that gets those product IDs and then show their titles with links, separated by commas.
add_shortcode('get_ordered_product_titles', 'get_ordered_product_titles_func');
function get_ordered_product_titles_func() {
$product_ids = do_shortcode('[wpv-ordered-product-ids]');
if(!empty($product_ids)) {
$output = array();
$product_ids_arr = explode(',', $product_ids);
foreach ($product_ids_arr as $product_ids_arr_item) {
$output[] = do_shortcode('[wpv-post-link item="'.$product_ids_arr_item.'"]');
}
return implode(', ', $output);
}
}
The above code snippet can be included through either Toolset's custom code feature ( ref: https://toolset.com/documentation/adding-custom-code/using-toolset-to-add-custom-code/ ) or through the active theme's "functions.php" file.
After that, you can use this newly registered custom shortcode in the view loop for the orders, like this:
[get_ordered_product_titles]
Note: The custom code examples from our forum are shared to get you started in the right direction. You're welcome to adjust them as needed and for more personalized customization assistance, you can consider hiring a professional from our list of recommended contractors:
https://toolset.com/contractors/
regards,
Waqar
That worked PERFECTLY on our test orders! Thanks a bunch! I'll let you know if anything seems wrong here when we start getting real orders with more products after making this site live, but I think this should work fine. I'll mark this as resolved. Thanks again. Outstanding help here.
My issue is resolved now. Thank you!