• Resolved Heyme

    (@heyme)


    On https://www.petitplat.fr
    When editing a product, it will go into “sale mode” (depicting the sale icon over the photo), but there is no ‘add to cart’ button.
    I had a few products like this.
    Those all went out of stock at some point and I changed to “not manage stock”.
    I tried to do it on a blank (new) listing, same issues. Impossible to set up variables and the single product goes into “sale” mode.
    Needless to say, tried to empty cache and cookies, etc.
    it seems to be somehow linked to changing anything in the product data.
    I have bulk edited others listing to “not manage stock” and that worked well.
    But doing so in a single listing is causing the bug.

    It must have something to do with the ‘sale’ somehow, because I could fix it by setting up a sale price. Even when scheduling the sale in the future this fixed the problem.
    I have left this listing in the faulty state:
    https://www.petitplat.fr/shop/waffle-studspost-earrings-with-chocolate-and-banana/
    After editing this product by adding a sale price, and scheduled this in the future I had an add to cart button again.
    I wanted to take away the sale price, but am unable to do so now, taking out the sale price and saving does not work anymore. Now the sale icon is gone, but also the add to cart button is no longer there.
    Product is in stock, no stock management enabled, and shipping set up ok….

    https://www.ads-software.com/plugins/woocommerce/

Viewing 15 replies - 1 through 15 (of 26 total)
  • Your parent theme is at 1.0.3 but 2.0.1 is available. See the changelog:
    https://themegrill.com/themes/spacious-pro/
    That’s lots of fixes. I can’t say whether one is relevant but updating would be something to try.

    Thread Starter Heyme

    (@heyme)

    You have a point there, and certainly something on my to-do list.
    But I have a few other sites with similar set up (theme and plugins) which operate correctly, I cannot reproduce.
    I think re-installing WooCommerce would be a good option.
    Would you know if I can delete the currect WooCommerce install fully, and re-install, and keep current setup alive?

    I think updating the parent theme and anything else is the first step. Next I would deactivate other plugins to ensure there isn’t a plugin conflict. Then try a default theme to be able to rule out a theme issue.

    It should be possible to get a fresh WC download, unpack on your hard drive and ftp the files over those existing without a problem. But if you delete the old WC you would lose your WC settings and have to remake them. Either way your products are in the database and should be safe. Nevertheless, a trustworthy backup before starting would be prudent.

    Thread Starter Heyme

    (@heyme)

    Plugin de-activation done.
    Theme update not yet, but on similar site (jagnab.com) am running a similar config without the problem.
    All the rest is up to date.
    Checked the database, and in the postmeta table cleared the value for _sale_price. Now the article is on sale again… with just the regular price filled in, should not be.
    Have downloaded and FTP-ed clean WooCommerce files.
    Somehow, somewhere there is still a value saying this article is on sale, but I thought only the postmeta table is used to store product data, and there is no sale price entry.

    Thread Starter Heyme

    (@heyme)

    So.. finally. Copied the full site & database. Everything up to date.
    Disabled all plugins. Switched to Twenty Thirteen.

    Now I only have WP 4.1.1 running, and only active plugin is WooCommerce.
    When I list a new product, simple, no stock management, just enter a price, the article displays ‘On Sale’, and the buy button is not available. Going to roll back completely to last months’ backup next.

    Do you mean WP 4.1.1. 4.4.1 is the current version. WP 4.4.1, WC 2.4.12 and 2013 works, so if your setup doesn’t, one of those is installed incompletely or corrupted.

    Thread Starter Heyme

    (@heyme)

    Sorry, yes, 4.4.1. Newly downloaded and installed. All fresh.
    Also WC is newly installed, latest version.
    Hope restoring back-up will solve this finally.

    Thread Starter Heyme

    (@heyme)

    Unbelievable. Restored a backup from 24/10/2015, when there were absolutely no problems.
    Same problem shows up. New database.
    Server related? Hosting? Totally confused now.

    Thread Starter Heyme

    (@heyme)

    It keeps getting weirder.
    Did a clean install of wordpress.
    On a clean newly created dB.
    Only installed WC plugin.
    Listed 1 single product.
    It shows ‘on sale’ rightaway, and no buy button is available.

    https://petitplat.fr/wp/clean/product/first-test-cookies/

    Anybody know any server bahaviour which could cause this, this is just too weird.

    – does the product have a regular price
    – try: define(‘WP_DEBUG’, true); in wp-config.php and then look round for any error_log files.
    – anything in the server error log
    – what php version do you have, is it either very old or very new

    I have same problem as you Heyme and I have tried same solutions as you. Still no success. Woocommerce/WordPress need to look at this issue and fix it asap. My shopp is temporary closed because of this.

    A recap of the problem: “On sale” label shows upp, even though I don’t have any sale-price. Regular price is entered but not showing on page. Changes don’t apper after editing and saving product.. Everything goes back to what I had previous. VERY VERY frustrating. Please, anyone have a clue? Both WP and Woocommerce are up-to-date.

    Heyme’s last post doesn’t say what theme he used in his fresh setup.

    If you start from scratch with a new database and fresh downloads and using the default theme with WC the only plugin: this worked last time I tried it and I’m guessing it will work now – otherwise there would be more than this one thread about it. Then switch to your theme – if it doesn’t work now, it follows that you have a theme problem.

    Thread Starter Heyme

    (@heyme)

    Hey guys

    Still troubleshooting, but have some clues now.
    I’ve used Twenty-Sixteen on the fresh set up.
    Copied fully to another server. On sale still there, but.. when listing new all went fine.
    What I noticed:
    There are 2 entries in the metapost table with a product for price, one _price, other _regularprice
    With the faulty one (whenever editing or adding a product on the VPS) only the regularprice entry is filled, with the good one (when doing the exact same on the Shared hosting) both are filled, and everything is as should be.
    Further info on the version where things do not work:
    Apache version: 2.4.18
    PHP: 5.6.16
    MySQL: 5.6.27
    Where things do work is a shared hosting, but do not have info on versions there: https://europeanstreetteam.com/petit.com/shop/
    https://europeanstreetteam.com/petit.com/shop/

    I have the same problem! =(
    Adding a sale price shows the button but when I try to remove the sale price, it won’t save it empty. It only saves if I enter a sale price.

    Thread Starter Heyme

    (@heyme)

    Ayayay, more and more.. worrying..

    If you have access to the database you can manually add the _price entry in the wp_metapost table for the correct product ID temporarily as a quick and dirty fix.
    Or add a sale price as workaround. If you schedule the sale somewhere in the future it will still work, the sale label will disappear, and normal price and buy buttons will show up.

    I’m moving servers with the site above, which will fix it, but not the main issue. Suspecting PHP version, or maybe Suhosin server settings, but really have no clue. Think querries do not run long enough to reach all fields or something like that.

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘Product not available, showing 'sale', no 'add to cart button’ is closed to new replies.