Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

231
Vistas
Use a div element as a second WooCommerce add to cart button

I'm building a WooCommerce webshop with Oxygen builder. Now I've got my product pages and all set up and functional, but I'd like to have a second element (a DIV with the fa-cart-plus icon in it) as an additional "Add to cart" button.

Now I've found the following:

global $woocommerce;
$woocommerce->cart->add_to_cart( $product_id, 1 );

but I have no idea how to call this from an onclick event. It feels a bit like having all the ingredients but not knowing how to turn them into a cake. Is there anyone here who can help?

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda