es_ther
Forum Replies Created
-
Forum: Plugins
In reply to: [Widget Logic] product category and taxonomyhas_term(‘your category slug’,’product_cat’)
worked for me.
Forum: Themes and Templates
In reply to: [Storefront] Storefront Product Tab DisplayI need the horizon tab for storefront, too. I found out the mobile version shows tabs horizontal. Anyone can help CSS coding?
If I understood correctly, Huppi88 meant a post, not a page.
A post is blocked, but if you try to go the category of a post, somehow the archive shows everything – title and contents of blocked posts.
https://yoursite.com/category/post => blocked
https://yoursite.com/category/ => shows contents of blocked postsI could work around by creating a page instead of a post. A page is not connected to a mandatory category. If you block a page, can’t access without loggin in.
Forum: Plugins
In reply to: [WooCommerce Extended Coupon Features FREE] Show coupon on shop pageIt’s not perfect but I figured out somehow.
First, add meta in product post, say ‘nam_coupon_code’ and put value, ‘100off’ etc.
Then change the function as below.add_filter( ‘woocommerce_get_price_html’, ‘show_coupon_amount_shop’, 10, 2 );
function show_coupon_amount_shop( $price, $product ) {
/*…. whatever for price format reg price or saleprice….*/
/* Show Coupon – use product meta: nam_coupon_code – still not perfect */
$coupon_exist = get_post_meta( $product->post->ID, ‘nam_coupon_code’, true );
if ($coupon_exist && $price == $saleprice) {
$price = ‘<del>’ . $saleprice . ‘</del>’;
}
else if($coupon_exist && $price != $saleprice) {
$price = ‘<del>’ . $price . ‘</del>’;
}
return $price;
}There is a glitch showing before coupon price at the buy button, but it’s OK for now. I hope it helps anyone looking for a similar job.
Forum: Plugins
In reply to: [WooCommerce Extended Coupon Features FREE] Show coupon on shop pageMy coupon has an amount and products for the coupon. No rules for shipping, qty, etc. The coupon amount will be applied for some products. I tried to find code examples without a luck.
add_filter( ‘woocommerce_get_price_html’, ‘show_coupon_amount_shop’, 10, 2 );
function omniwp_credit_dollars_price( $price, $product ) {
…find if coupon exist…
…change price format…
}
I just need to know there is a coupon for a product. Any help?