Skip Navigation

[Resuelto] Problem with the loop to see the product rows in an order

This support ticket is created hace 5 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

Etiquetado: 

Este tema contiene 18 respuestas, tiene 4 mensajes.

Última actualización por Francisco Ramón Molina Busquiel hace 5 años.

Asistido por: Nigel.

Autor
Mensajes
#1369929

Juan
Supporter

Zona horaria: Europe/Madrid (GMT+01:00)

Hi Jose A. (I hope it is OK to refer to you this way, since your user here is providing a different profile name).

This is Juan, Toolset development team leader and the current maintainer for WooCommerce Views.

First of all, I would like to thank you for your feedback. We are always eager to get information about how our products are used, what we need to improve and extend, and whether it is easy or not to complete the task that you want done.

I have read the whole set of comments in this thread, and I would like to clarify some things about what WooCommerce Views, and the rest of Toolste related to this topic, do, what we do not, what we can take as feature suggestions, and what is out of the scope of the things that we do and we can or want to do.

This thread talks about the ability to display products included in a given WooCommerce order. As pointed out in some comments above, we have some documentation about how to do so. You get an order, you create a View lsiting products, and you feed this View with a filter that limits the results to the products included in that order, using a shortcode that, as its name states, provides the IDs of the products that are included in the current order.

All in all, it works fine. You do indeed get a list of products included in the order.

We know this is not the end of it. You probbaly want to display information from the product, which you can, and you probably want to display information about the product in reference to the order... which right now you can not. You can not display the quantity of a given product inside a given order, for example. You can not either separate variable products: the list will show only the main product, not the variations included.

This set of facts can establish some other facts:
- Yes, you can use Views and WooCommerce Views to list the products that belong to an order, and you can display data for those products.
- No, you can not display data for the product as an item inside the order, like the quantity of items of a product that are included in the order.
- No, variable products are not separated by variations, and they are included as the single, "parent" product holding them.

In short, what our documentation states is, as a matter of fact, right: you can indeed show the products of an order. We can take as feature requests the proper management of variabe products, or the lack of a mechanism to display data for products in relation to the given order, but those are missing functinality topics, not a broken one.

In any case, no such feature request would solve your own case. You have a third party plugin, Formidable Forms, that adds some fields to products, so you can place an order with the same product, but different "versions" of it, depending on the values of those fields.

Bue the product itself is the same. And hence, the product appears as one, once, in the Views listing.

What you are requesting is not that we separate products because they are WooCommerce variations, but because a third party plugin introduces "versions" or "flavours" for products by placing some fields into them.

I am sure that you understand that we can not and will not provide support for all the third party plugins out there that can blend with WooCommerce. If we were to go and improve this mechanism to list products in an order, we would pobably start by supporting native product variations, and not "versions" provided by third party plugins extending WooCommerce itself.

This is why our suporters pointed you to find some custom solution, either using a contractor or trying to build it yourself., I do think that providing support for "versions" introduced by a third party plugin so you can separate products included in an order by such fields is something that does not belong to WooCommerce Views, or to Views itself, and we are not going to be working on that path.

You already said that:
" use Formidable Forms, with this plugin the same product can have different characteristics, so in an order there can be several lines with the purchase of the same product but which has been purchased with different characteristics. Your loop is not well done, it does not loop through the different lines of a product, it loops through the different products, so if an order has 10 lines of the same product, only the first one is shown."

It is the same product,so we include it once in the list of products that belog to the order. View is not going to "loop through the different lines of a product" because it is supposed to return the product, not the lines of it that were created with a third party plugin. As this is what Views is supposed to do, and it does it, it is of course well done. It might not match what you want it to do after creating "rows" with a third party plugin, but that does not mean at all that the loop is wrong.

I hope this helps clarifying things on what we can do, what we can take as suggestions, and what is out of the scope of the solutions we can provide.

If you have any other suggestion, I would be more than happy to address or file it. If you have any other support request, I am also sure that Nigel will be eager to help you with it.

Regards.

#1370245

Hi Juan,

We are 2 people in the company, Francisco and me, Jose.
I do not expect you to take into account the different plugins that exist to introduce variations of features to the same product. Although this is very generic in real life.
I just commented that it would be very interesting and it would really be the right thing to include in Toolset a way to go through the lines of an order.
This would be an independent mechanism of the plugin that a user could use on their website and the good thing is that it would give the possibility of viewing an order in a more complete way.
This mechanism has nothing to do with third-party plugins, it would only be an exact mechanism to view the lines of an order. Now it is completely impossible to do this in a simple way.
Toolset is supposed to be made to facilitate interaction with wordpress data.
What is the use of displaying orders if order lines cannot be displayed? Don't you think?
What Toolset has now is so limited that it has very little utility.

If you want to put it as a new request or not is your decision, but the utility would be more than obvious.

Regards,
Jose A.

#1372333

Nigel
Supporter

Idiomas: Inglés (English ) Español (Español )

Zona horaria: Europe/London (GMT+00:00)

Hi Jose

The request has been received by the product manager, and they will decide on the implementation in the context of the competing development priorities. Naturally, if such a feature is developed it will be announced.

There is little more I can do here in this support thread, I think we can close.

#1372373

Thank you Nigel!