Variable Products
-
Hi there,
We currently use Storefront with WooCommerce and our client has mentioned to us that the stock quantity when setting on a variable product does not work correctly, for example, two variables being Red (6 in stock) & Green (4 in stock) would both show 10 in stock even when a different variable is chosen. It should say Red (6 in stock) and then when green is chosen, (4 in stock) should show up.
I’ve tested this on a website without storefront and it works as needed.
Is there a simple piece of code that I could add?
Cheers
-
Hi there,
Thanks for reaching out!
I just ran a quick test with Storefront and WC active (just to rule out any bugs), and everything is functioning as expected. Variable products should and do only show the in stock quantity for that variation. Perhaps in your case, something else is causing a conflict?
Would you mind copying and pasting your System Status Report into this thread so that we can check for any red flags there? You can find this by going to WooCommerce > Status > System Status > Get System Report in your WP-Admin dashboard.
Thanks!
Hi Laceyrod
Thanks for the quick response.
Here’s the system report (hidden home/site URL);
### WordPress Environment ### Home URL: Site URL: WC Version: 3.5.0 Log Directory Writable: ? WP Version: ? 4.9.9 - There is a newer version of WordPress available (5.0.3) WP Multisite: – WP Memory Limit: 1 GB WP Debug Mode: – WP Cron: ? Language: en_GB External object cache: – ### Server Environment ### Server Info: Apache/2.4.29 (Unix) mod_hive/6.25 OpenSSL/1.0.1e-fips mod_fastcgi/2.4.6 PHP Version: 5.6.39 - We recommend using PHP version 7.2 or above for greater performance and security. How to update your PHP version PHP Post Max Size: 256 MB PHP Time Limit: 600 PHP Max Input Vars: 1000 cURL Version: 7.59.0 OpenSSL/1.0.2q SUHOSIN Installed: – MySQL Version: 5.6.36-82.1-log Max Upload Size: 256 MB Default Timezone is UTC: ? fsockopen/cURL: ? SoapClient: ? DOMDocument: ? GZip: ? Multibyte String: ? Remote Post: ? Remote Get: ? ### Database ### WC Database Version: 3.5.0 WC Database Prefix: wp_ MaxMind GeoIP Database: ? Total Database Size: 33.94MB Database Data Size: 28.53MB Database Index Size: 5.41MB wp_woocommerce_sessions: Data: 0.03MB + Index: 0.02MB wp_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB wp_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB wp_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.05MB wp_woocommerce_order_items: Data: 0.06MB + Index: 0.02MB wp_woocommerce_order_itemmeta: Data: 0.30MB + Index: 0.30MB wp_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB wp_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.05MB wp_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB wp_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB wp_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB wp_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB wp_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB wp_woocommerce_log: Data: 0.02MB + Index: 0.02MB wp_aryo_activity_log: Data: 0.13MB + Index: 0.00MB wp_commentmeta: Data: 0.02MB + Index: 0.03MB wp_comments: Data: 0.22MB + Index: 0.25MB wp_links: Data: 0.02MB + Index: 0.02MB wp_options: Data: 6.42MB + Index: 0.13MB wp_postmeta: Data: 6.50MB + Index: 2.92MB wp_posts: Data: 1.52MB + Index: 0.27MB wp_responsive_menu: Data: 0.05MB + Index: 0.00MB wp_snippets: Data: 0.02MB + Index: 0.00MB wp_termmeta: Data: 0.08MB + Index: 0.09MB wp_terms: Data: 0.05MB + Index: 0.03MB wp_term_relationships: Data: 0.25MB + Index: 0.13MB wp_term_taxonomy: Data: 0.05MB + Index: 0.03MB wp_usermeta: Data: 2.33MB + Index: 0.14MB wp_users: Data: 0.02MB + Index: 0.05MB wp_wc_download_log: Data: 0.02MB + Index: 0.03MB wp_wc_webhooks: Data: 0.02MB + Index: 0.02MB wp_wfblockediplog: Data: 0.02MB + Index: 0.00MB wp_wfblocks7: Data: 0.02MB + Index: 0.05MB wp_wfconfig: Data: 0.42MB + Index: 0.00MB wp_wfcrawlers: Data: 0.02MB + Index: 0.00MB wp_wffilechanges: Data: 0.02MB + Index: 0.00MB wp_wffilemods: Data: 5.52MB + Index: 0.00MB wp_wfhits: Data: 1.02MB + Index: 0.22MB wp_wfhoover: Data: 0.16MB + Index: 0.02MB wp_wfissues: Data: 0.02MB + Index: 0.06MB wp_wfknownfilelist: Data: 2.52MB + Index: 0.00MB wp_wflivetraffichuman: Data: 0.02MB + Index: 0.02MB wp_wflocs: Data: 0.02MB + Index: 0.00MB wp_wflogins: Data: 0.02MB + Index: 0.03MB wp_wfnotifications: Data: 0.02MB + Index: 0.00MB wp_wfpendingissues: Data: 0.02MB + Index: 0.06MB wp_wfreversecache: Data: 0.02MB + Index: 0.00MB wp_wfsnipcache: Data: 0.02MB + Index: 0.05MB wp_wfstatus: Data: 0.13MB + Index: 0.09MB wp_wftrafficrates: Data: 0.02MB + Index: 0.00MB wp_wpgdprc_consents: Data: 0.02MB + Index: 0.00MB wp_yoast_seo_links: Data: 0.02MB + Index: 0.02MB wp_yoast_seo_meta: Data: 0.13MB + Index: 0.00MB ### Post Type Counts ### attachment: 823 fl-builder-template: 2 ml-slide: 21 ml-slider: 2 nav_menu_item: 58 oembed_cache: 1 page: 13 post: 30 product: 346 product_variation: 69 revision: 301 shop_coupon: 9 shop_order: 52 wpcf7_contact_form: 1 ### Security ### Secure connection (HTTPS): ? Your store is not using HTTPS. Learn more about HTTPS and SSL Certificates. Hide errors from visitors: ? ### Active Plugins (34) ### ManageWP - Worker: by ManageWP – 4.6.3 Advanced Access Manager: by Vasyl Martyniuk <[email protected]> – 5.6 Antispam Bee: by pluginkollektiv – 2.9.0 Activity Log: by Activity Log Team – 2.5.1 Beaver Builder Plugin (Agency Version): by The Beaver Builder Team – 1.9 Code Snippets: by Shea Bunge – 2.12.0 Contact Form 7 Honeypot: by Nocean – 1.13 Contact Form 7: by Takayuki Miyoshi – 5.0.5 Duplicate Post: by Enrico Battocchi – 3.2.2 Export Users to CSV: by Matt Cromwell – 1.1.1 WordPress File Monitor: by nicolly – 1.0.8 Jetpack by WordPress.com: by Automattic – 6.7 MetaSlider: by Team Updraft – 3.10.0 Responsive Menu: by Peter Featherstone – 3.1.17 Search By SKU - for Woocommerce: by Matthew Lawson – 0.6.1 – Not tested with the active version of WooCommerce Simple Custom Post Order: by Colorlib – 2.3.5 Smart WooCommerce Search: by YummyWP – 1.5.3 – Not tested with the active version of WooCommerce Easy Updates Manager: by Easy Updates Manager Team – 8.0.2 Theme Customisations: by WooThemes – 1.0.0 Compress JPEG & PNG images: by TinyPNG – 3.1.0 User Switching: by John Blackbourn & contributors – 1.4.0 Video User Manuals: by Video User Manuals Pty Ltd – 2.5.7.2 What The File: by Never5 – 1.5.4 Woo Extra Product Options: by ThemeHiGH – 1.3.2 WooCommerce Catalog Visibility Options: by Lucas Stark – 3.0.1 – 3.2.2 is available – Not tested with the active version of WooCommerce WooCommerce Colors: by WooThemes – 1.0.7 – Not tested with the active version of WooCommerce WooCommerce: by Automattic – 3.5.0 Wordfence Security: by Wordfence – 7.1.17 Yoast SEO: by Team Yoast – 9.1 WP File Manager: by mndpsingh287 – 3.2 WP GDPR Compliance: by Van Ons – 1.4.3 WP Google Fonts: by Noah Kagan – v3.1.4 WP Rollback: by WordImpress – 1.5.1 WPide: by Simon @ WPsites – 2.4.0 ### Settings ### API Enabled: ? Force SSL: – Currency: GBP (£) Currency Position: left Thousand Separator: , Decimal Separator: . Number of Decimals: 2 Taxonomies: Product Types: external (external) grouped (grouped) simple (simple) variable (variable) 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 ### Shop base: #10 - /shop/ Basket: #11 - /basket/ Checkout: #12 - /checkout/ My account: #13 - /my-account/ Terms and conditions: #370 - /terms-conditions/ ### Theme ### Name: Galleria Version: 2.1.0 – 2.2.17 is available Author URL: https://woothemes.com Child Theme: ? Parent Theme Name: Storefront Parent Theme Version: 2.2.4 – 2.4.2 is available Parent Theme Author URL: https://woocommerce.com/ WooCommerce Support: ? ### Templates ### Overrides: galleria/woocommerce/emails/customer-on-hold-order.php version 2.5.0 is out of date. The core version is 3.5.0 Outdated Templates: ?
- This reply was modified 5 years, 9 months ago by Jan Dembowski.
- This reply was modified 5 years, 9 months ago by Jan Dembowski.
Thanks!
I would recommend starting with making sure everything is up-to-date. I’m seeing from your report that WP, WooCommerce, and your theme are all outdated versions. Do you mind backing up the site and making sure these are current to see if that resolves the issue?
If updating doesn’t help, then we may need to have you further test for conflicts: https://docs.woocommerce.com/document/woocommerce-self-service-guide/
Looking forward to your reply.
Hi Laceyrod,
After updating all plugins, themes and WP itself I managed to catch the culprit which was a small piece of custom code that was overwriting the stock variation output.
The issue is now fixed.
Thanks for your help.
- The topic ‘Variable Products’ is closed to new replies.