Support » Plugin: WooCommerce » Product available but does not allow purchase

  • Resolved Kezily

    (@kezily)


    Hello,

    Since I updated WooCommerce to the latest version, there is a stock error.

    The product has available in stock, but when added to the cart the following error message appears:

    “Sorry, we do not have enough ‘product name’ in stock to fulfill your order (1 available).”

    But this product has 3 in stock. Why is it showing that it has only 1 available if we have 3?

    Could someone help me solve it?

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Support Hannah S.

    (@fernashes)

    Automattic Happiness Engineer

    Hey there,

    Can you please check the stock threshold under WooCommerce > Settings > Products > Inventory – is the out of stock option set to 0?

    Stock settings
    Link to image: http://cld.wthms.co/EN0um6

    Also, if you set the stock display option to always show the stock, does it show the correct amount of stock when viewing the product?

    Hello @fernashes,

    Yes, out of stock option is set to 0 and it shows the correct amount of stock on single product.

    The problem is on the cart page.

    Plugin Support Hannah S.

    (@fernashes)

    Automattic Happiness Engineer

    Thanks for explaining!

    Can you please send me a link to a product where this is happening?

    Also, could you please share a copy of your site’s System Status? You can find it via WooCommerce > Status.
    Select “Get system report” and then “Copy for support”.  Once you’ve done that, paste it here in your response.

    Thank you @fernashes.

    My Hold Stock (minutes) option is set to blank. When I set to 1 minute and then change to blank again, the problem is fixed. So at the moment I do not have a product with this problem, but in a few days I know the error will happen again.

    ### WordPress Environment ###
    
    Home URL: https://mydomain.com.br
    Site URL: https://mydomain.com.br
    WC Version: 3.5.1
    Log Directory Writable: ✔
    WP Version: 4.9.8
    WP Multisite: –
    WP Memory Limit: 256 MB
    WP Debug Mode: –
    WP Cron: ✔
    Language: pt_BR
    External object cache: –
    
    ### Server Environment ###
    
    Server Info: Apache
    PHP Version: 7.1.23 - Nós recomendamos o uso do PHP versão 7.2 ou superior para maior performance e segurança. Como atualizar a versão do seu PHP
    PHP Post Max Size: 8 MB
    PHP Time Limit: 30
    PHP Max Input Vars: 1000
    cURL Version: 7.60.0
    OpenSSL/1.0.2k
    
    SUHOSIN Installed: –
    MySQL Version: 5.5.5-10.2.17-MariaDB
    Max Upload Size: 8 MB
    Default Timezone is UTC: ✔
    fsockopen/cURL: ✔
    SoapClient: ✔
    DOMDocument: ✔
    GZip: ✔
    Multibyte String: ✔
    Remote Post: ✔
    Remote Get: ✔
    
    ### Database ###
    
    WC Database Version: 3.5.1
    WC Database Prefix: wp_
    MaxMind GeoIP Database: ✔
    Tamanho total do banco de dados: 55.18MB
    Tamanho dos dados do banco de dados: 42.94MB
    Tamanho do índice do banco de dado: 12.24MB
    wp_woocommerce_sessions: Dados: 3.03MB + Índices: 0.06MB
    wp_woocommerce_api_keys: Dados: 0.02MB + Índices: 0.03MB
    wp_woocommerce_attribute_taxonomies: Dados: 0.02MB + Índices: 0.02MB
    wp_woocommerce_downloadable_product_permissions: Dados: 0.02MB + Índices: 0.05MB
    wp_woocommerce_order_items: Dados: 0.30MB + Índices: 0.11MB
    wp_woocommerce_order_itemmeta: Dados: 2.52MB + Índices: 3.02MB
    wp_woocommerce_tax_rates: Dados: 0.02MB + Índices: 0.06MB
    wp_woocommerce_tax_rate_locations: Dados: 0.02MB + Índices: 0.03MB
    wp_woocommerce_shipping_zones: Dados: 0.02MB + Índices: 0.00MB
    wp_woocommerce_shipping_zone_locations: Dados: 0.02MB + Índices: 0.03MB
    wp_woocommerce_shipping_zone_methods: Dados: 0.02MB + Índices: 0.00MB
    wp_woocommerce_payment_tokens: Dados: 0.02MB + Índices: 0.02MB
    wp_woocommerce_payment_tokenmeta: Dados: 0.02MB + Índices: 0.03MB
    wp_woocommerce_log: Dados: 0.02MB + Índices: 0.02MB
    $table: Dados: 0.00MB + Índices: 0.00MB
    wp_commentmeta: Dados: 0.02MB + Índices: 0.03MB
    wp_comments: Dados: 1.52MB + Índices: 0.58MB
    wp_giftvouchers_activity: Dados: 0.00MB + Índices: 0.00MB
    wp_giftvouchers_list: Dados: 0.00MB + Índices: 0.00MB
    wp_giftvouchers_setting: Dados: 0.00MB + Índices: 0.00MB
    wp_giftvouchers_template: Dados: 0.00MB + Índices: 0.00MB
    wp_links: Dados: 0.02MB + Índices: 0.02MB
    wp_mailpoet_custom_fields: Dados: 0.02MB + Índices: 0.02MB
    wp_mailpoet_forms: Dados: 0.02MB + Índices: 0.00MB
    wp_mailpoet_mapping_to_external_entities: Dados: 0.02MB + Índices: 0.02MB
    wp_mailpoet_newsletters: Dados: 0.02MB + Índices: 0.00MB
    wp_mailpoet_newsletter_links: Dados: 0.02MB + Índices: 0.00MB
    wp_mailpoet_newsletter_option: Dados: 0.02MB + Índices: 0.02MB
    wp_mailpoet_newsletter_option_fields: Dados: 0.02MB + Índices: 0.02MB
    wp_mailpoet_newsletter_posts: Dados: 0.02MB + Índices: 0.00MB
    wp_mailpoet_newsletter_segment: Dados: 0.02MB + Índices: 0.02MB
    wp_mailpoet_newsletter_templates: Dados: 0.31MB + Índices: 0.00MB
    wp_mailpoet_scheduled_tasks: Dados: 0.02MB + Índices: 0.00MB
    wp_mailpoet_scheduled_task_subscribers: Dados: 0.02MB + Índices: 0.00MB
    wp_mailpoet_segments: Dados: 0.02MB + Índices: 0.02MB
    wp_mailpoet_sending_queues: Dados: 0.02MB + Índices: 0.00MB
    wp_mailpoet_settings: Dados: 0.02MB + Índices: 0.02MB
    wp_mailpoet_statistics_clicks: Dados: 0.02MB + Índices: 0.05MB
    wp_mailpoet_statistics_forms: Dados: 0.02MB + Índices: 0.02MB
    wp_mailpoet_statistics_newsletters: Dados: 0.02MB + Índices: 0.02MB
    wp_mailpoet_statistics_opens: Dados: 0.02MB + Índices: 0.05MB
    wp_mailpoet_statistics_unsubscribes: Dados: 0.02MB + Índices: 0.05MB
    wp_mailpoet_subscribers: Dados: 0.02MB + Índices: 0.03MB
    wp_mailpoet_subscriber_custom_field: Dados: 0.02MB + Índices: 0.02MB
    wp_mailpoet_subscriber_segment: Dados: 0.02MB + Índices: 0.03MB
    wp_options: Dados: 2.09MB + Índices: 0.14MB
    wp_postmeta: Dados: 12.52MB + Índices: 5.94MB
    wp_posts: Dados: 1.52MB + Índices: 0.55MB
    wp_smush_dir_images: Dados: 0.00MB + Índices: 0.00MB
    wp_termmeta: Dados: 0.05MB + Índices: 0.03MB
    wp_terms: Dados: 0.02MB + Índices: 0.03MB
    wp_term_relationships: Dados: 0.22MB + Índices: 0.11MB
    wp_term_taxonomy: Dados: 0.02MB + Índices: 0.03MB
    wp_usermeta: Dados: 2.41MB + Índices: 0.69MB
    wp_users: Dados: 0.06MB + Índices: 0.05MB
    wp_wc_download_log: Dados: 0.00MB + Índices: 0.00MB
    wp_wc_webhooks: Dados: 0.00MB + Índices: 0.00MB
    wp_woel_woocommerce_order_emails_log: Dados: 0.00MB + Índices: 0.00MB
    wp_wpml_mails: Dados: 14.75MB + Índices: 0.05MB
    wp_wysija_campaign: Dados: 0.02MB + Índices: 0.00MB
    wp_wysija_campaign_list: Dados: 0.02MB + Índices: 0.00MB
    wp_wysija_custom_field: Dados: 0.02MB + Índices: 0.00MB
    wp_wysija_email: Dados: 0.47MB + Índices: 0.00MB
    wp_wysija_email_user_stat: Dados: 0.02MB + Índices: 0.00MB
    wp_wysija_email_user_url: Dados: 0.02MB + Índices: 0.00MB
    wp_wysija_form: Dados: 0.02MB + Índices: 0.00MB
    wp_wysija_list: Dados: 0.02MB + Índices: 0.00MB
    wp_wysija_queue: Dados: 0.02MB + Índices: 0.02MB
    wp_wysija_subscriber_ips: Dados: 0.00MB + Índices: 0.00MB
    wp_wysija_url: Dados: 0.02MB + Índices: 0.00MB
    wp_wysija_url_mail: Dados: 0.02MB + Índices: 0.00MB
    wp_wysija_user: Dados: 0.11MB + Índices: 0.06MB
    wp_wysija_user_field: Dados: 0.02MB + Índices: 0.00MB
    wp_wysija_user_history: Dados: 0.02MB + Índices: 0.00MB
    wp_wysija_user_list: Dados: 0.06MB + Índices: 0.00MB
    wp_yoast_seo_links: Dados: 0.00MB + Índices: 0.00MB
    wp_yoast_seo_meta: Dados: 0.02MB + Índices: 0.02MB
    
    ### Post Type Counts ###
    
    attachment: 1490
    depoimentos: 6
    mailpoet_page: 1
    nav_menu_item: 93
    page: 14
    post: 1
    product: 1032
    product_variation: 24
    revision: 102
    shop_coupon: 21
    shop_order: 383
    shop_order_refund: 8
    slides: 7
    spucpt: 1
    wpcf7_contact_form: 1
    wpgv_voucher_product: 1
    wysijap: 1
    yith-wcdppm-rule: 1
    
    ### Security ###
    
    Secure connection (HTTPS): ✔
    Hide errors from visitors: ✔
    
    ### Active Plugins (20) ###
    
    Autoptimize: por Frank Goossens (futtta) – 2.4.1
    Contact Form 7: por Takayuki Miyoshi – 5.0.5
    Easy WP SMTP: por wpecommerce
    alexanderfoxc – 1.3.7
    
    Boleto Facil - WooCommerce Gateway: por BoletoBancario.com – 1.2.1 – Não testado com a versão ativa do WooCommerce
    Desconto por Tipo de Pagamento: por WPCodelibrary – 3.5.0
    WooCommerce Correios: por Claudio Sanches – 3.7.1 – Não testado com a versão ativa do WooCommerce
    WooCommerce Extra Checkout Fields for Brazil: por Claudio Sanches – 3.6.1 – Não testado com a versão ativa do WooCommerce
    WooCommerce PagSeguro: por Claudio Sanches – 2.13.1 – Não testado com a versão ativa do WooCommerce
    WooCommerce: por Automattic – 3.5.1
    Yoast SEO: por Equipe da Yoast – 9.1
    MailPoet 2: por MailPoet – 2.10.2
    YITH WooCommerce Zoom Magnifier: por YITH – 1.3.5
    
    ### Settings ###
    
    API Enabled: ✔
    Force SSL: –
    Currency: BRL (R$)
    Currency Position: left
    Thousand Separator: .
    Decimal Separator: ,
    Number of Decimals: 2
    Taxonomies: Product Types: external (external)
    grouped (grouped)
    simple (simple)
    variable (variable)
    woosb (woosb)
    
    Taxonomies: Product Visibility: exclude-from-catalog (exclude-from-catalog)
    exclude-from-search (exclude-from-search)
    featured (featured)
    outofstock (outofstock)
    rated-1 (rated-1)
    rated-2 (rated-2)
    rated-3 (rated-3)
    rated-4 (rated-4)
    rated-5 (rated-5)
    
    ### WC Pages ###
    
    Base da loja: #6 - /todos-os-produtos/
    Carrinho: #7 - /carrinho/
    Finalizar compra: #8 - /finalizar-compra/
    Minha conta: #9 - /minha-conta/
    Termos e condições: ❌ Página não definida
    
    ### Theme ###
    
    Name: LiebePapier
    Version: 1.0
    Author URL: 
    Child Theme: ❌ – Recomendamos você utilizar um tema filho no caso de você estiver personalizando o WooCommerce em um tema ascendente. Veja como criar um tema filho
    WooCommerce Support: ✔
    
    ### Templates ###
    
    Overrides: mydomain/woocommerce/archive-product.php
    mydomain/woocommerce/cart/cart-totals.php
    mydomain/woocommerce/cart/cart.php
    mydomain/woocommerce/checkout/form-checkout.php
    mydomain/woocommerce/checkout/review-order.php
    mydomain/woocommerce/checkout/thankyou.php
    mydomain/woocommerce/content-product.php
    mydomain/woocommerce/content-single-product.php
    mydomain/woocommerce/emails/email-order-details.php
    mydomain/woocommerce/global/breadcrumb.php
    mydomain/woocommerce/global/quantity-input.php
    mydomain/woocommerce/myaccount/form-login.php
    mydomain/woocommerce/product-searchform.php
    mydomain/woocommerce/single-product/price.php
    mydomain/woocommerce/single-product/related.php
    mydomain/woocommerce/single-product/short-description.php
    mydomain/woocommerce/single-product/title.php
    mydomain/woocommerce/single-product.php
    

    We are having the same issue – have you found a solution?

    I have the same issue too. I created a topic earlier.

    Plugin Support Hannah S.

    (@fernashes)

    Automattic Happiness Engineer

    Thanks for that information, @kezily – can you please also share a link to a product where this is happening?

    @kegforce and @samvaliant – while the issues may look similar, it’s easier to troubleshoot them separately. Can you please create your own thread?

    Hello @fernashes,

    This product has 4 in stock, but in the cart informs that it has only 2: https://liebepapier.com.br/produto/hello-spring-4×6-journaling-cards

    Has anyone managed to solve it?

    Plugin Support Hannah S.

    (@fernashes)

    Automattic Happiness Engineer

    Thanks for sharing!

    So far, we know:

    * Product: https://wordpress.org/support/topic/product-available-but-does-not-allow-purchase/#post-10887546
    * Reports 4 in stock, but cart informs that there is only 2 in stock
    * Checked stock thresholds
    * My Hold Stock (minutes) option is set to blank. When I set to 1 minute and then change to blank again, the problem is fixed.

    At this point, all of the settings are correct. This is likely caused by a conflict with your theme or with another plugin.

    The best way to determine if the issue is being caused by a theme and/or plugin is to temporarily switch your theme to Storefront (https://woocommerce.com/products/storefront/) and disable all plugins except for WooCommerce. Finally, test to see if the issue is resolved by trying to add the product to the cart and checking to see if inventory is correct.

    If you’re not seeing the same problem after completing the conflict test, then you know the problem was with the plugins and/or theme you deactivated. To figure out which plugin is causing the problem, continue to the next step.5. Reactivate your other plugins one by one, testing after each, until you find the one causing conflict.

    —–

    Tools to help you troubleshoot:

    Meks Quick Plugin Disabler is a plugin you can install which will remember what plugins you currently have active so it’s easy to switch them back on. Link: https://wordpress.org/plugins/meks-quick-plugin-disabler/

    Health Check is a plugin that allows you to temporarily disable other plugins and switch themes for that session without impacting your users. Link: https://wordpress.org/plugins/health-check/

    You can clone your site to a staging environment and perform tests without modifying your live site or impacting customers. Many hosts provide staging facilities, so it’s worth checking in with them. It’s also possible to do it using the free WP Staging plugin. Link: https://wordpress.org/plugins/wp-staging/

    Thank you @fernashes, but I’ve already done these steps before opening a ticket here on the support. I already disabled all plugins (except WooCommerce) and activated Twenty Seventeen theme, but the error continued.

    The site can not have another theme as there is constant sales on the site.

    I’ll test the plugins you mentioned.

    Thank you

    Plugin Support Hannah S.

    (@fernashes)

    Automattic Happiness Engineer

    Hey there!

    I’m glad to hear you did that troubleshooting!

    I did originally mention creating a staging site – it’s often faster than waiting for a time when the site isn’t busy.

    • This reply was modified 4 months ago by  Hannah S..
    Plugin Support dougaitken

    (@dougaitken)

    Automattic Happiness Engineer

    Hey @kezily @kegforce @lex_carmo

    The “Sorry, we do not have enough…” error was a core WooCommerce bug.

    This was fixed in the 3.5.2 release of WooCommerce, please ensure you update WooCommerce safely and you will see this is fixed.

    As this is a fixed bug, I’m going to mark this as resolved – if you have any further questions or updating doesn’t fix the issue, you can start a new thread.

    Thanks,

    Thank you @dougaitken, I will update WooCommerce and do the tests again.

    Hi,

    Is this noted in the change log for WC 3.5.2 ?
    The closest info i can get is:

    Fix – Do not check for stock when not managing stock or have backorders enabled when paying through the order-pay page. #21849

    Thank you.

Viewing 15 replies - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.