Thêm đoạn code này vào nơi muốn load form mini cart trên website <?php global $woocommerce; ?> <a class=”cart-contents” href=”<?php echo $woocommerce->cart->get_cart_url(); ?>” title=”<?php _e(‘View your shopping cart’, ‘woothemes’); ?>”> <?php echo sprintf(_n(‘%d item’, ‘%d items’, $woocommerce->cart->cart_contents_count, ‘woothemes’), $woocommerce->cart->cart_contents_count);?> – <?php echo $woocommerce->cart->get_cart_total(); ?> </a> Thêm đoạn code này vào file functions.php add_filter(‘woocommerce_add_to_cart_fragments’, ‘woocommerce_header_add_to_cart_fragment’); function woocommerce_header_add_to_cart_fragment( ..
Archives : Tháng 10-2018
Code html <form action=”<?=home_url(); ?>/” autocomplete=”off” class=”col-12 col-sm-12 p-0 form-search-box” method=”get” accept-charset=”utf-8″> <input type=”hidden” name=”post_type” value=”product”> <input type=”text” name=”s” placeholder=”<?=__tr(‘search_entire_store_here’); ?>” class=”text-search”> <button type=”submit”><i class=”fa fa-search”></i></button> <div class=”result-search”></div> </form> Code php thêm vào file functions.php // ***Lấy link ajax mặc định của wordpress function link_ajax_template(){ ?> <script type=”text/javascript” charset=”utf-8″ > url_ajax='<?=admin_url(‘admin-ajax.php’); ?>’; </script> <?php } ..
Easy FancyBox WooCommerce Interactive Floating Cart Lite WooCommerce Cart &nb..
Phản hồi