Forum Replies Created

Viewing 9 posts - 11 through 19 (of 19 total)
  • Author
    Posts
  • in reply to: Sales Badge Background Color #10559

    How to fix?

    in reply to: thumbnail disappeared after update the cart #5860

    yeah..it is work…tq

    in reply to: thumbnail disappeared after update the cart #5854
    This reply has been marked as private.
    in reply to: thumbnail disappeared after update the cart #5851

    please test in safari, safari got problem

    in reply to: view in columns and load more bug #5591
    This reply has been marked as private.
    This reply has been marked as private.
    in reply to: add "add to cart" button to homepage thumbnail #4342

    thanks… prefect! you are the best hehe

    in reply to: add "add to cart" button to homepage thumbnail #4339

    from ../single-product/add-to-cart/simple.php

    put what code into functions.php? how to do?

    in reply to: add "add to cart" button to homepage thumbnail #4337

    is it copy the exact code as below and paste there?

    <?php if ( ! defined( ‘ABSPATH’ ) ) {
    exit;
    }

    global $product;

    if ( ! $product->is_purchasable() ) {
    return;
    }

    $ajax_btn = get_option( ‘woocommerce_enable_ajax_add_to_cart_single’ );
    $redirect = get_option( ‘woocommerce_cart_redirect_after_add’ );

    echo wc_get_stock_html( $product );

    if ( $product->is_in_stock() ) : ?>

    <?php do_action( ‘woocommerce_before_add_to_cart_form’ ); ?>

    <form class=”cart” method=”post” enctype=’multipart/form-data’>
    <?php
    /**
    * @since 2.1.0.
    */
    do_action( ‘woocommerce_before_add_to_cart_button’ );

    /**
    * @since 3.0.0.
    */
    do_action( ‘woocommerce_before_add_to_cart_quantity’ );

    woocommerce_quantity_input( array(
    ‘min_value’ => apply_filters( ‘woocommerce_quantity_input_min’, $product->get_min_purchase_quantity(), $product ),
    ‘max_value’ => apply_filters( ‘woocommerce_quantity_input_max’, $product->get_max_purchase_quantity(), $product ),
    ‘input_value’ => isset( $_POST[‘quantity’] ) ? wc_stock_amount( $_POST[‘quantity’] ) : $product->get_min_purchase_quantity(),
    ) );

    /**
    * @since 3.0.0.
    */
    do_action( ‘woocommerce_after_add_to_cart_quantity’ );
    ?>

    <?php if ( $ajax_btn == ‘no’ || $redirect == ‘yes’ ) { ?>
    <button type=”submit” name=”add-to-cart” value=”<?php echo esc_attr( $product->get_id() ); ?>” class=”single_add_to_cart_button button alt”><?php echo esc_html( $product->single_add_to_cart_text() ); ?></button>
    <?php } else { ?>
    <input type=”hidden” name=”add-to-cart” value=”<?php echo esc_attr( $product->get_id() ); ?>” />

    <button type=”submit” name=”add-to-cart” class=”single_add_to_cart_button button alt”><?php echo esc_html( $product->single_add_to_cart_text() ); ?></button>
    <?php } ?>

    <?php
    /**
    * @since 2.1.0.
    */
    do_action( ‘woocommerce_after_add_to_cart_button’ );
    ?>
    </form>

    <?php do_action( ‘woocommerce_after_add_to_cart_form’ ); ?>

    <?php endif; ?>

Viewing 9 posts - 11 through 19 (of 19 total)