Skip Navigation

[Resolved] Trying to get product variant selections to display with list of ordered items

This support ticket is created 6 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 6 replies, has 2 voices.

Last updated by Minesh 6 years, 9 months ago.

Assisted by: Minesh.

Author
Posts
#611982
Screen Shot 2018-02-01 at 2.42.50 PM.png

Tell us what you are trying to do?

I followed your documentation for How to display WooCommerce Orders on the front-end and it's working great. However, some of our products are variable products where the customer chooses a value. For example, we offer an additional sauce and then the user chooses which sauce they would like. I'm trying to get these variables to display along with the product that was ordered. I've attached a screenshot so you can see how it's been created in woocommmerce.

Is there any documentation that you are following?

https://toolset.com/learn/create-an-ecommerce-wordpress-site/displaying-more-information-from-woocommerce/how-to-display-woocommerce-orders-on-the-front-end/

Is there a similar example that we can see?

Not really, however I'm not totally sure.

What is the link to your site?

pantrytest.site

#612068

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - variation are stored in database with special format. This may needs some debugging that how the data stored in database for orders for variable products.

Is it possible for you to send me access detail and setup on order with variable produce so that I can check if its possible or not.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I would additionally need your permission to de- and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important. If you agree to this, please use the form fields I have enabled below to provide temporary access details (wp-admin and FTP).

I have set the next reply to private which means only you and I have access to it.

#612637

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thank you for sharing access details but unfortunately the shared access details are not working.

Could you please check access details once and send me working access details.

#612891

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Thanks for access details, its working now.

Could you please share the link where you try to display the order information and what information you would like to display with views.

#613618

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Ok - I checked and the way to display your order quantity and attribute values is you need to write custom shortcode that will return this values as the order items are stroed with table "wp_woocommerce_order_items" and order related meta stored with the database table "wp_woocommerce_order_itemmeta".

What you should try is pass your order product ids to your custom shortcode you build and based on those product Ids fetch all related order information from database table "wp_woocommerce_order_itemmeta".

Following link may help you:
=> https://stackoverflow.com/a/40715347

#619799

Hi Minesh,

THanks again. I'm still not having any luck with this. I don't think i really understand because when I'm trying to create a view that would display this info, the "wp_woocommerce_order_itemmeta" is not available. I'm using the following resource as a guide:

https://toolset.com/learn/create-an-ecommerce-wordpress-site/displaying-more-information-from-woocommerce/how-to-display-woocommerce-orders-on-the-front-end/

I've been trying to follow the instructions for the ordered products, but I don't see item meta available. Can you please let me know how I can create the shortcode you mentinoed?

Thank you

#619979

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Well - I think you didnt understand what I said in my previous reply:


What you should try is pass your order product ids to your custom shortcode you build and based on those product Ids fetch all related order information from database table "wp_woocommerce_order_itemmeta".

The "wp_woocommerce_order_itemmeta" will not be available as you need to write your own custom shortcode and fetch values. You need to query the tables "wp_woocommerce_order_items" and order related meta stored with the database table "wp_woocommerce_order_itemmeta".

If you do not know how to write the custom shortcode - please follow the following guides:
=> hidden link
=> https://codex.wordpress.org/Shortcode_API

As this needs to write custom shortcode which eventually is part of custom programming which is beyond the scope of our support policy. If you need custom programming for your project, please feel free to contact our certified partners:
=> https://toolset.com/contractors/