Home – New Forums Tech talk Woo Commerce – Sale tag issue

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #988131
    Blknite
    Member
    • Total posts: 43
    Up
    0
    ::

    Hi guys ,

    I am building an online site using wp and woo commerce plugin , dont know what and how it happened but suddenly for some reason all the product pics are showing a “sale” tag even if they are not on sale . I google and found following and implemented that but since than sale tag is gone but now I can not even get it for actual “on sale” items.

    Would appreciate some help here plz.

    1. In my child theme’s functions.php files I added the following:
    remove_action( ‘woocommerce_before_shop_loop_item_title’, ‘woocommerce_show_product_loop_sale_flash’, 10 );

    2. In my child theme’s style.css file:
    body.woocommerce span.onsale, body.woocommerce-page span.onsale {
    display: none;
    }
    .woocommerce span.onsale, .woocommerce-page span.onsale {
    display:none;
    }

    #1165781
    James
    Participant
    • Total posts: 268
    Up
    0
    ::

    Hi namz,

    By using display:none in the CSS it will unfortunately block the sale tags completely. The code you have added basically turns off and hides sale tags for all products.

    If you want to have some sale tags showing, you will unfortunately have to remove the code you added.

    We then need to get to the bottom of why the sale tags are currently showing for all products.

    Did you do a bulk import? Sometimes settings are assumed when you import products without a setting for certain variables.

    Or maybe you have got a sale price added for the products? You only need to input the full price in WooCommerce otherwise a sale is assumed.

    #1165782
    Blknite
    Member
    • Total posts: 43
    Up
    0
    ::
    James Rayers, post: 191980 wrote:
    Hi namz,

    By using display:none in the CSS it will unfortunately block the sale tags completely. The code you have added basically turns off and hides sale tags for all products.

    If you want to have some sale tags showing, you will unfortunately have to remove the code you added.

    We then need to get to the bottom of why the sale tags are currently showing for all products.

    Did you do a bulk import? Sometimes settings are assumed when you import products without a setting for certain variables.

    Or maybe you have got a sale price added for the products? You only need to input the full price in WooCommerce otherwise a sale is assumed.

    Thanks James .
    No products were not loaded in bulk , I added them one by one.

    Also I am leaving sale tag empty for non sale items , I just have regular price in there.

    #1165783
    MatthewKeath
    Member
    • Total posts: 3,184
    Up
    0
    ::
    namz, post: 191981 wrote:
    Thanks James .
    No products were not loaded in bulk , I added them one by one.

    Also I am leaving sale tag empty for non sale items , I just have regular price in there.Do you get this sorted?

    #1165784
    Blknite
    Member
    • Total posts: 43
    Up
    0
    ::
    MatthewKeath, post: 192048 wrote:
    Do you get this sorted?
    Yes , All my products are set as variable products and somehow regular price was copied on sale price as well for each and every product/variation. I just removed the sale price and it worked.
Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.