// Add custom Theme Functions here
//CODE LAY LUOT XEM
function getPostViews($postID){
$count_key = 'post_views_count';
$count = get_post_meta($postID, $count_key, true);
if($count==''){
delete_post_meta($postID, $count_key);
add_post_meta($postID, $count_key, '0');
return "01 lượt xem";
}
return $count.' lượt xem';
}
// CODE DEM LUOT XEM
function setPostViews($postID) {
$count_key = 'post_views_count';
$count = get_post_meta($postID, $count_key, true);
if($count==''){
$count = 0;
delete_post_meta($postID, $count_key);
add_post_meta($postID, $count_key, '0');
}else{
$count++;
update_post_meta($postID, $count_key, $count);
}
}
//CODE HIEN THI SO LUOT XEM BAI VIET TRONG DASHBOARDH
add_filter('manage_posts_columns', 'posts_column_views');
add_action('manage_posts_custom_column', 'posts_custom_column_views',5,2);
function posts_column_views($defaults){
$defaults['post_views'] = __('Views');
return $defaults;
}
function posts_custom_column_views($column_name, $id){
if($column_name === 'post_views'){
echo getPostViews(get_the_ID());
}
}
/*Sắp xếp lại thứ tự các field*/
add_filter("woocommerce_checkout_fields", "order_fields");
function order_fields($fields) {
//Shipping
$order_shipping = array(
"shipping_last_name",
"shipping_phone",
"shipping_address_1"
);
foreach($order_shipping as $field_shipping)
{
$ordered_fields2[$field_shipping] = $fields["shipping"][$field_shipping];
}
$fields["shipping"] = $ordered_fields2;
return $fields;
}
add_filter( 'woocommerce_checkout_fields' , 'custom_override_checkout_fields',99 );
function custom_override_checkout_fields( $fields ) {
unset($fields['billing']['billing_company']);
unset($fields['billing']['billing_first_name']);
unset($fields['billing']['billing_postcode']);
unset($fields['billing']['billing_country']);
unset($fields['billing']['billing_city']);
unset($fields['billing']['billing_state']);
unset($fields['billing']['billing_address_2']);
$fields['billing']['billing_last_name'] = array(
'label' => __('Họ và tên', 'devvn'),
'placeholder' => _x('Nhập đầy đủ họ và tên của bạn', 'placeholder', 'devvn'),
'required' => true,
'class' => array('form-row-wide'),
'clear' => true
);
$fields['billing']['billing_address_1']['placeholder'] = 'Ví dụ: Số xx Ngõ xx Phú Kiều, Bắc Từ Liêm, Hà Nội';
unset($fields['shipping']['shipping_company']);
unset($fields['shipping']['shipping_postcode']);
unset($fields['shipping']['shipping_country']);
unset($fields['shipping']['shipping_city']);
unset($fields['shipping']['shipping_state']);
unset($fields['shipping']['shipping_address_2']);
$fields['shipping']['shipping_phone'] = array(
'label' => __('Điện thoại', 'devvn'),
'placeholder' => _x('Số điện thoại người nhận hàng', 'placeholder', 'devvn'),
'required' => true,
'class' => array('form-row-wide'),
'clear' => true
);
$fields['shipping']['shipping_last_name'] = array(
'label' => __('Họ và tên', 'devvn'),
'placeholder' => _x('Nhập đầy đủ họ và tên của người nhận', 'placeholder', 'devvn'),
'required' => true,
'class' => array('form-row-wide'),
'clear' => true
);
$fields['shipping']['shipping_address_1']['placeholder'] = 'Ví dụ: Số xx Ngõ xx Phú Kiều, Bắc Từ Liêm, Hà Nội';
return $fields;
}
add_action( 'woocommerce_admin_order_data_after_shipping_address', 'my_custom_checkout_field_display_admin_order_meta', 10, 1 );
function my_custom_checkout_field_display_admin_order_meta($order){
echo '
'.__('Số ĐT người nhận').':
' . get_post_meta( $order->get_id(), '_shipping_phone', true ) . '
';
}
Nước khoáng có gas Vital - 24 chai - Nước khoáng
Skip to content
“Nước khoáng Lavie 500ml -24 chai” đã được thêm vào giỏ hàng.
Xem giỏ hàng
Nước khoáng có gas Vital – 24 chai
Ashli Vastardis –
I truly prize your work, Great post.
https://www.zoritolerimol.com
miminwd login –
Glad to be one of many visitors on this awful website : D.
https://miminwd.it.com/
Meetup账号购买 –
After examine a number of of the weblog posts on your website now, and I truly like your means of blogging. I bookmarked it to my bookmark website list and will likely be checking again soon. Pls try my website online as nicely and let me know what you think.
https://linkedin.im/goods/28.html
แชท MiraMi –
Hmm it seems like your blog ate my first comment (it was super long) so I guess I’ll just sum it up what I wrote and say, I’m thoroughly enjoying your blog. I as well am an aspiring blog writer but I’m still new to the whole thing. Do you have any tips for beginner blog writers? I’d definitely appreciate it.
https://vibragame.biz/th/
daftar cakra111 –
You really make it appear so easy along with your presentation but I in finding this topic to be really something which I feel I would never understand. It sort of feels too complicated and extremely broad for me. I am taking a look ahead in your subsequent put up, I’ll try to get the hang of it!
https://cakra111.com/
29 empire –
Very interesting topic, thanks for putting up.
https://www.thegrandsouthseakhaolak.com/accommodation.html
gelatin trick for weight loss –
When I originally commented I clicked the -Notify me when new comments are added- checkbox and now each time a comment is added I get four emails with the same comment. Is there any way you can remove me from that service? Thanks!
https://youtu.be/4lxyRBp_6ks
situs scatter hitam –
I think this web site holds some very excellent info for everyone :D. “Morality, like art, means a drawing a line someplace.” by Oscar Wilde.
https://www.belandnev.com/
fdertol mrtokev –
I truly enjoy reading on this site, it contains superb content.
https://www.fdertolmrtokev.com
scatter hitam –
I’m still learning from you, as I’m trying to achieve my goals. I absolutely love reading all that is written on your site.Keep the tips coming. I enjoyed it!
https://macanempire.com/
situs togel –
Hey! I know this is kinda off topic but I was wondering which blog platform are you using for this site? I’m getting sick and tired of WordPress because I’ve had issues with hackers and I’m looking at options for another platform. I would be awesome if you could point me in the direction of a good platform.
https://www.ancientfutureworship.com/
recruitment –
Hello there, simply changed into alert to your blog thru Google, and located that it’s truly informative. I’m going to watch out for brussels. I’ll appreciate in case you proceed this in future. Many people will be benefited out of your writing. Cheers!
https://oveersea.com/
bank guarantee provider –
Would you be all in favour of exchanging hyperlinks?
https://www.wonderlandgmbh.com
rajabotak –
I together with my buddies were actually viewing the great guides on your web blog and so all of a sudden came up with a horrible feeling I never expressed respect to you for those tips. Most of the boys are already absolutely warmed to read through them and have in effect in reality been tapping into them. We appreciate you truly being considerably kind and also for utilizing this sort of really good useful guides most people are really desirous to learn about. My honest apologies for not expressing gratitude to earlier.
https://www.cavecitychristian.com/index.cfm
slot 88 gacor –
It¦s truly a nice and useful piece of information. I am happy that you shared this helpful information with us. Please keep us up to date like this. Thank you for sharing.
https://www.oxfordjam.org.uk/
zaborna torilon –
I went over this internet site and I conceive you have a lot of excellent info , saved to favorites (:.
https://www.zabornatorilon.com/