- This topic has 12 replies, 3 voices, and was last updated 5 years ago by
Leo.
-
AuthorPosts
-
June 5, 2021 at 5:12 pm #1811775
Pedro
Hola,
Me gustaría añadir un elemento de bloque después de la descripción del producto y antes de los productos relacionados en la página de producto de WooCommerce.
Aquí un ejemplo de dónde me gustaría colocar este elemento: https://mega.nz/file/D8EhCI5I#dKOFgugXQCNfK2isXAw7pmCQx8b6YLS76b3l7pR3h1s
Podrían decirme qué configuración debo usar para que aparezca en esta sección?
June 8, 2021 at 7:48 am #1814845Pedro
Hola??
June 8, 2021 at 10:42 am #1815259Leo
StaffCustomer SupportHi Pedro,
Sorry for the late reply! Not sure why we didn’t get a notification for this topic.
The single product page template is handled by WooCommerce itself and you can see all the hooks here:
https://www.businessbloomer.com/woocommerce-visual-hook-guide-single-product-page/June 8, 2021 at 10:56 am #1815287Pedro
Hola Leo,
Ya conozco ese sitio, de ahí me estoy guiando.
Pude insertar ese Elemento después de la descripción del producto y antes de los productos relacionados.
Aquí puedes verlo: https://raybasics.co/camisetas/camiseta-basica-cuello-redondo/
El problema es, que el Elemento parece agregarse después del contenido de las pestañas.
Solo quiero que se agregue después del contenido de la pestaña “Descripción”, no de todas las pestañas.
¿Podrías ayudarme con esto?
¡Gracias!
June 8, 2021 at 3:01 pm #1815453Leo
StaffCustomer SupportI’m not sure if there are any hooks exist within each tab unfortunately.
This is something you will need to check with WooCommerce’ support team.
June 8, 2021 at 3:05 pm #1815456Pedro
Y no hay forma que con GenerateBlocks yo pueda insertar ese contenido dentro de la descripción del producto?
Realmente lo que quiero hacer es justo después de la descripción, añadir una sección con características del producto con iconos.
Algo así: https://northweek.com/products/gradiant-bright-blue-ice-blue-polarized-1
June 8, 2021 at 4:46 pm #1815503Leo
StaffCustomer SupportGB is not the problem here.
The issue here is that you want the content to only appear in the Description tab and there isn’t a hook there as far as I’m aware of.
If WooCommerce has a hook there, then you can use GB to add the content.
June 8, 2021 at 5:53 pm #1815524Pedro
Hola Leo,
Contacté al soporte de WooCommerce como sugeriste, y me compartieron este enlace:
Intenté usar el hook the_content, sin embargo, lo que ocurre es que el Elemento reemplaza a la descripción del producto.
¿Podrías ayudarme con esto por favor?
¡Gracias!
June 8, 2021 at 7:38 pm #1815581Elvin
StaffCustomer SupportHi Pedro,
Can you share the code you’re using with us?
The code on your link is basically a filter. It’s filtering the default content output by concatenating a custom field to it.
Perhaps your code doesn’t concatenate the custom field you’re trying to add but instead, is replacing the actual $content variable it outputs.
This line on the code:
return $content . '<b>Disclaimer:</b> ' . $product_disclaimer;Is basically merging the default
$contentplus the string “Disclaimer” which is set to bold, and$product_disclaimervariable which holds the value of theget_field()declared on it.June 10, 2021 at 9:09 am #1817741Pedro
Hola Elvin,
Por favor revisa la conversación anterior.
No estoy usando ningún código. Lo que estoy haciendo es crear un nuevo “Elemento de Bloque”.
El que deseo insertar después del contenido de la “Descripción de producto” y antes de los “Productos relacionados”.
Lo hago así, porque deseo agregar una sección de características con iconos, que solo puedo agregar con bloques de GenerateBlocks.
El enlace de mi último mensaje fue un recurso que el soporte de WooCommerce me compartió, que quizás pueda ayudarme.
Les pido por favor me colaboren con esto.
¡Muchas gracias!
June 10, 2021 at 9:23 am #1817753Leo
StaffCustomer SupportHi Pedro,
Unfortunately this isn’t something we can help with in the support forum here as it’s still a WooCommerce question.
side the product description tab.If not then it’s not possible to use a block element there.
I don’t believe
woocommerce_product_description_tabis a hook but it’s something you will need to follow up with WooCommerce’ support team.
http://hookr.io/functions/woocommerce_product_description_tab/Or you can test by using a custom hook in a hook element and add
woocommerce_product_description_taband see if it outputs anything.Thanks for your understanding.
June 10, 2021 at 10:45 am #1817825Pedro
Hola Leo,
Como indicaste,
woocommerce_product_description_tabno es un hook.¿Hay alguna forma de agregar un elemento de GB que no sea con hooks?
Ya que realmente lo que deseo, es crear una nueva sección con iconos justo después del contenido de la descripción.
Y ya que GB no puede usarse en el editor de WooCommerce, pensé que la mejor forma de hacerlo era con Elementos.
June 10, 2021 at 11:07 am #1817839Leo
StaffCustomer SupportUnfortunately it’s not possible to use GB without a hook at the moment.
-
AuthorPosts
- You must be logged in to reply to this topic.