MultivendorX
-
AuthorPosts
-
-
May 20, 2023 at 8:11 PM #192315l.ganParticipant
Hello team.
Thanks for the great plugin support.Please tell me how to get the details of suborders that are now with the status “Processing” and “on hold”:
Suborder number
(Product photo),
Product Name,
Delivery methodI need the client to see the suborders that he will receive in his personal account. If there are several suborders, then they would be displayed as separate elements.
Could you help me with this, thanks.
See photoadd_action( ‘woocommerce_account_content’, ‘сс_account_user_suborder_in_process’, 0);
function сс_account_user_suborder_in_process() {
??
} -
May 22, 2023 at 7:16 PM #192351MVX Support NinjaKeymaster
Hi,
First of all let me know where you want to add the details in frontend and also do you want to show this in the customer account. Let me know then we will help you out accordingly.Regards,
-
May 22, 2023 at 10:22 PM #192355l.ganParticipant
Hello
Thanks for your reply and help
Yes, I would like to show this in the client’s personal account when he is logged in. Please see photo. -
May 23, 2023 at 1:30 PM #192367MVX Support NinjaKeymaster
Hi,
Kindly add below code to your function.php of the active current theme.add_action( 'woocommerce_after_my_account', 'mvx_woocommerce_account_content_action' ); function mvx_woocommerce_account_content_action(){ $customer = wp_get_current_user(); // Get all customer orders $customer_orders = get_posts(array( 'numberposts' => -1, 'meta_key' => '_customer_user', 'orderby' => 'date', 'order' => 'DESC', 'meta_value' => get_current_user_id(), 'post_type' => wc_get_order_types(), 'post_status' => array('wc-processing', 'wc-onhold'), 'fields' => 'ids', )); if ($customer_orders) { foreach ($customer_orders as $customer_order) { $mvx_suborders = get_posts( array( 'post_parent' => $customer_order, 'posts_per_page' => -1, 'post_status' => array('wc-processing', 'wc-onhold'), 'post_type' => wc_get_order_types(), 'fields' => 'ids', )); if ($mvx_suborders) { foreach ($mvx_suborders as $mvx_suborder) { $order = wc_get_order($mvx_suborder); $order_id = $order->id; $shipping_method = $order->get_shipping_method(); // data to show echo $order_id . '<br>'; // // Get and Loop Over Order Items foreach ( $order->get_items() as $item_id => $item ) { $product_name = $item->get_name(); echo $product_name . '<br>'; $image_url = wp_get_attachment_image_src( get_post_thumbnail_id( $item->get_product_id() ), 'single-post-thumbnail' ); echo '<img src="'. $image_url[0] .'" width="40" height="40"/>'; } echo $shipping_method .'<br>'; } } } } }
Copycheckout the image – https://prnt.sc/Pimt6sZokSTy
** design as per your requirement.Regards,
-
May 24, 2023 at 10:47 AM #192390Sangita Support SquadKeymaster
Hi @l.gan We are happy to help you .
Also , it would be really great if you can give us 5/5 review here: https://wordpress.org/support/plugin/dc-woocommerce-multi-vendor/reviews/#new-post
This would motivate the team further to do their job more efficiently. -
May 24, 2023 at 4:45 PM #192413l.ganParticipantThis reply has been marked as private.
-
May 24, 2023 at 5:19 PM #192418NerdySupportExpert MoumitaKeymaster
@l.gan, thank you.
-
-
AuthorPosts
The topic ‘how to get the details of suborders status “Processing”’ is closed to new replies.