• Resolved tomasbal

    (@tomasbal)


    Hello,

    I’m using “[products colums=”3″ per_page=”50″ on_sale=”true”]” shortcode for showing products that are on sale, but now it’s showing products that are not on sale (as you can see on the link provided).
    What could be the issue here?

    This is what I tried so far:
    1. I tried clearing cache;
    2. I tried changing something in the shortcode, for example, the columns parameter (as some of the people mentioned on groups), but no luck;
    3. I tried clearing Cloudflare cache;
    4. I checked the products that are showing don’t even have sale price.

    I really can’t find what is the issue here.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thomas Shellberg

    (@shellbeezy)

    Automattic Happiness Engineer

    Hey @tomasbal,

    Do you get the same error if using the WooCommerce “On Sale Products” Block? This is included in WooCommerce 3.7 or if the WooCommerce Blocks plugin is installed.

    https://wordpress.org/plugins/woo-gutenberg-products-block/

    Thread Starter tomasbal

    (@tomasbal)

    Hey @shellbeezy,

    I just tried it but I have a few problems when I enable 3 columns it is displaying only 2. Also, there is a maximum product, and I need to display around 30 products at once. Also, it completely ignores the theme design of products. Any other solution?

    Kind regards,
    Tomislav.

    Linda

    (@lindamork)

    Automattic Happiness Engineer

    Hi there,

    I believe what’s happening is the WordPress editor is replacing your quotation marks in your shortcode with curly ones. Since the curly variety isn’t recognized as code, your shortcode won’t work. I tried pasting your shortcode into a new block in the editor, even clicking to edit as HTML, but when I previewed it, the curly quotation marks were displayed. Once I replaced them, your shortcode worked like a charm. There’s also a typo in the word ‘columns’. 🙂

    Here’s a screenshot showing the curly quotes and where they need to be fixed along with the typo for ‘columns’.

    https://cld.wthms.co/KNRLbM

    Hope this helps!

    Thread Starter tomasbal

    (@tomasbal)

    Hey Linda!

    Thanks for pointing out that, but i replace the curly quotes and fixed the typo, but still it shows duplicates, you can see on the link bellow (you have to scroll down a little in order to see the products that are displayed as on sale, when in fact they are not:

    https://nomadmobility.mk/%d0%bf%d1%80%d0%be%d0%b8%d0%b7%d0%b2%d0%be%d0%b4%d0%b8-%d0%bd%d0%b0-%d0%b0%d0%ba%d1%86%d0%b8%d1%98%d0%b0/

    Kind regards,
    Tomislav

    Linda

    (@lindamork)

    Automattic Happiness Engineer

    Hi Tomislav,

    That is mighty strange! I can see there are a few random ski boots, skis and bindings that aren’t showing a sale price but are on that page. Are these products scheduled to go on sale or were they on sale previously?

    Can you include your shortcode again too? I thought you were aiming to have 50 items on a page but you’ve got far more than that?

    Linda

    (@lindamork)

    Automattic Happiness Engineer

    Hi there,

    We haven’t heard back from you in a while so I’m going to go ahead and mark this as Resolved. Please open a new ticket if you still need help.

    Hi all,

    I am facing the same issue. I have tried using a block but I still see products that are not on sale.

    https://www.cannabisdeals.co.uk/all-deals/

    These products have been on sale previously as per @lindamork question and it seems that they are somehow cached. I have disabled all caching modules from the website.

    Any ideas on how to resolve this?

    Thanks!

    Thread Starter tomasbal

    (@tomasbal)

    Hi Xamos,

    I have found that I had duplicated SKU’s in the database. So I think that the problem is that. You can check it with doing the following:

    1. Export the products ID and SKU (you can do that in woocommerce export section)
    2. Fire up excel and open the .csv file that woocommerce will generate for you.
    3. After you opened the file put filter on the SKU’s row for duplicates, and you will see if you are having the same issue as I did.

    Kind regards,
    Tomislav.

    Hi Tomislav,

    thank you for the reply. I have checked that and it does not seem to be the issue.

    I am using Wzone and the products do not have an SKU. They only have ID and this is unique.

    Cheers,
    Theo

    I have found that the problem is resolved by regenerating the “lookup tables”.

    Is there a way that I can schedule this process to run daily through “Scheduled actions”?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘On sale short-code show non-sale products.’ is closed to new replies.