Skip Navigation

[Resuelto] Display SKU for variable products

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:
How to display SKU for variable products

Solution:
You can use [wpv-woo-product-meta] shortcode to display related variation content.

You can find the proposed solution with the following reply:
=> https://toolset.com/forums/topic/display-sku-for-variable-products/#post-576810

Relevant Documentation:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-woo-product-meta

This support ticket is created hace 7 años, 1 mes. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Este tema contiene 6 respuestas, tiene 2 mensajes.

Última actualización por Pat hace 7 años, 1 mes.

Asistido por: Minesh.

Autor
Mensajes
#576773

Pat

Hello,

I'm using WC + Toolset and Toolset Starter theme.
I need to display the SKUs of all products, including variations. This means when I'm on the product page, I have some variations and need to display dynamically the SKU of the variation when a specific variation is selected.
Currently, I have defined _sku as and external field for Toolset and have integrated the shortcode [wpv-post-field name='_sku'] in my product template.
The only thing which is displayed is the SKU of the generic product, but the SKU of the variable products are never displayed.
Is there something special to do for this ?
Regards
Pat

#576795

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - Toolset does not filter the WooCommerce SKUs, so I suggest you should first check with minimum installation without Toolset plugins and with default theme.

I created test site and with variable product I've added SKU and tried to display just besides the product title and its working.
=> enlace oculto

I suspect the product SKU is not setup or variable product is not configured correctly.

More info:
=> https://docs.woocommerce.com/document/variable-product/#draft_check_box_list_0
=> https://docs.woocommerce.com/document/managing-products/#general-section

#576799

Pat
toolset2.jpg
toolset1.jpg

Hi Minesh,

Thanks for your support.
I'm not sure but when I go to your test site, the SKU does not change when I try to navigate with the different varaitions?
The upper part with the title is always the same : Woman top boots === SKU-1
For info, I have attached 2 screenshot with different options.
The image changes dynamically (it's also the case onmy site) but not the SKU !
Let me know
Regards
Pat

#576810

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Ok - I think I get now what you mean.

Now, I've added the shortcode [wpv-woo-product-meta] just besides teh title and I can see now when you change the variation it displays the correct associated SKU with that variation:
=> https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-woo-product-meta

You can check here:
=> enlace oculto

So, you should use shortcode [wpv-woo-product-meta] to display the associated SKU to product variations.

#576883

Pat

Minesh,

Far much better now !
Last point, with your shortcode, the display is :
UGS : product reference
Is there a way to suppress the UGS : text ?
Regards
Pat

#576884

Minesh
Supporter

Idiomas: Inglés (English )

Zona horaria: Asia/Kolkata (GMT+05:30)

Well - as I shared the shortcode Doc with you:
=> https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-woo-product-meta

Shortcode [wpv-woo-product-meta] will display the following thing:

Product SKU
Categories
Tags

We do not have any filter there, so whatever info you would like to hide, you should use simple CSS or JS code to hide it.

#576885

Pat

Hi Minesh,

Understood. Thanks.
Perhaps for the future, it could be good to have a mecanism like [wpv-woo-product-meta meta="sku"] that gives only the product sku ... and the same for the other info included in themeta.
Regards
Pat