Repository Forums Support WooCommerce Extended Coupon Features PRO CUPON AUTOMATICO EN DESCRIPCION DE PRODUCTO

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #19638
    PABLO ARROYO
    Participant

    HOLA, COMO PUEDO HACER PARA QUE UN CUPON AUTOMATICO, EJEMPLO CADA 20 CAJAS LLEVAS 1 GRATIS, PUEDA SALIR ESTA OFERTA EN LA DESCRIPCION DEL PRODUCTO. QUE EL CLIENTE VEA EL PRODUCTO EN LA TIENDA Y SEPA QUE TIENE UNA PROMOCION.
    NECESITO SE VEA O VISUALICE ESTE CUPON, Y NO TAN SOLO CUANDO SE CUMPLE LA CONDICION DE CANTIDAD O VALOR MINIMO.
    MUCHAS GRACIAS SI ES POSIBLE ME AYUDEN

    #19639
    Soft79
    Keymaster

    Hola,

    nuestro plugin no tiene funcionalidad para hacer eso automaticamente. Lo que puedes hacer es poner este información en la descripción del producto. Un desarollador podría usar algúna acción como woocommerce_before_add_to_cart_form para injectar html en la página. Ve https://byteweb.es/trucos-para-woocommerce/ para mas información.

    Un ejemplo:

    
    add_action(
        'woocommerce_before_add_to_cart_form', 
        function() {
            $product = wc_get_product( get_the_ID() );
            
            if ( ! in_array( $product->get_id(), [ 111, 222, 333 ] ) ) return; //Id's de los productos donde tiene que aparecer el mensaje
    
            echo '<p><strong>Compra 20 y llévate uno gratis</strong></p>';
        }
    );
    
    
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.