Forum Replies Created
-
AuthorPosts
-
How to fix?
yeah..it is work…tq
This reply has been marked as private.please test in safari, safari got problem
This reply has been marked as private.May 31, 2017 at 11:23 pm in reply to: custom sticky header cause canvas menu not working properly on safari #4832This reply has been marked as private.thanks… prefect! you are the best hehe
from ../single-product/add-to-cart/simple.php
put what code into functions.php? how to do?
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; ?>
-
AuthorPosts