ĐĂNG TIN
logo
Online:
Visits: 1,686,943,740
Stories: 8,387,788
Profile image
0
0
Tác giả: fcwordpress
Trang tin cá nhân | Bài đã đăng
Lượt xem

Hiện tại:
1h trước: 1
24h trước: 1
Tổng số: 49
Hướng dẫn custom woocommerce – phần 5
Sunday, January 24, 2016 2:03
% of readers think this story is Fact. Add your two cents.


Mời anh chị xem video Hướng dẫn custom woocommerce – phần 5


Một số code liên quan tới phần 5:

  • Tạo widget best selling products
 'Best selling products'); $control_ops = array('width' => 300, 'height' => 300); parent::WP_Widget(false,$name='Best selling products',$widget_ops,$control_ops); } function form($instance){ global $wpdb; //Defaults $instance = wp_parse_args( (array) $instance, array('title'=>'','numbershow'=>'') ); $title = htmlspecialchars($instance['title']); $numbershow = htmlspecialchars($instance['numbershow']); ?> 

'product', 'meta_key' => 'total_sales', 'orderby' => 'meta_value_num', 'order' => 'DESC', 'posts_per_page' => $numbershow, 'post_status' => 'publish' ); $wp_query = new WP_Query( $args ); if ( $wp_query->have_posts() ) : while ( $wp_query->have_posts() ) : $wp_query->the_post(); ?>

%s', esc_url( $product->add_to_cart_url() ), $product->id, esc_attr( $product->product_type ), 'Mua ngay' ); echo $add_to_cart_link; ?>

Tin nổi bật trong ngày
Tin mới nhất

Register

Newsletter

Email this story
If you really want to disable all recommended stories, click on OK button. After that, you will be redirect to your options page.