Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variations filter not working properly when multiple product attributes used #16104

Closed
heints opened this issue Jul 13, 2017 · 2 comments

Comments

@heints
Copy link

commented Jul 13, 2017

Prerequisites

  • I have searched for similar issues in both open and closed tickets and cannot find a duplicate
  • The issue still exists against the latest master branch of WooCommerce
  • This is not a usage question (Those should be directed to the community, unless this is a question about a premium plugin in which you should use the helpdesk for official extensions or contact the author of 3rd party extensions)
  • I have attempted to find the simplest possible steps to reproduce the issue
  • I have included a failing test as a pull request (Optional)

Steps to reproduce the issue

  1. Have woocomerce 3.1.0 or 3.1.1
  2. Add at least two attributes to a product (like size - 9, 10, 11, 12 and girth - S, M, L, XL)
  3. Create multiple variations to the same product for sizes, but leave some of the girth options out, for example, create a variation of size 12, but only allow XL
  4. In the shop fronted, after selecting the product with size 12, the shop still allows to select the other girth sizes.

Expected behavior and actual behavior

When I follow those steps, I see variations of a product that do not match the settings in the backed.

I was expecting it to work like prior to the upgrade to -> 3.1.x, where the "non existing" variations are filtered out, and not shown. Now we just get a warning, that this combination does not exist!

Environment

` ### WordPress Environment ###

Home URL: https://www.hobukeskus.ee
Site URL: https://www.hobukeskus.ee
WC Version: 3.1.1
Log Directory Writable: ✔
WP Version: 4.8
WP Multisite: –
WP Memory Limit: 512 MB
WP Debug Mode: –
WP Cron: ✔
Language: et

Server Environment

Server Info: Apache / ZoneOS
PHP Version: 5.6.30
PHP Post Max Size: 2 GB
PHP Time Limit: 30
PHP Max Input Vars: 20000
cURL Version: 7.51.0
OpenSSL/1.0.2l

SUHOSIN Installed: –
Max Upload Size: 2 GB
Default Timezone is UTC: ✔
fsockopen/cURL: ✔
SoapClient: ✔
DOMDocument: ✔
GZip: ✔
Multibyte String: ✔
Remote Post: ✔
Remote Get: ✔

Database

WC Database Version: 3.1.1
WC Database Prefix: m6el_
woocommerce_sessions: ✔
woocommerce_api_keys: ✔
woocommerce_attribute_taxonomies: ✔
woocommerce_downloadable_product_permissions: ✔
woocommerce_order_items: ✔
woocommerce_order_itemmeta: ✔
woocommerce_tax_rates: ✔
woocommerce_tax_rate_locations: ✔
woocommerce_shipping_zones: ✔
woocommerce_shipping_zone_locations: ✔
woocommerce_shipping_zone_methods: ✔
woocommerce_payment_tokens: ✔
woocommerce_payment_tokenmeta: ✔

Security

Secure connection (HTTPS): ✔
Hide errors from visitors: ✔

Active Plugins (32)

Google XML Sitemaps: - Arne Brachhold – 4.0.8
Easy HTTPS (SSL) Redirection: - Tips and Tricks HQ – 1.6
Joomla2WP Migrated Users Authentication Plugin: - lucky62 – 1.0.1
Limit Login Attempts: - Johan Eenfeldt – 1.7.1
PRyC WP/WooCommerce: Edit all orders: - PRyC – 1.0.4
Redis Object Cache: - Till Krüss – 1.3.5
Slider Revolution: - ThemePunch – 5.4.1
Mobile Redirect: - Ozette Plugins – 1.7
User Login Log: - weblizar – 2.2.2
W3 Total Cache: - Frederick Townes – 0.9.5.4
Woocomerce Brands Pro: - Proword – 4.2.0
WooCommerce Colors: - WooThemes – 1.0.6
Woocommerce E-Abi Postoffice plugin: - Matis Halmann
Aktsiamaailm LLC – 1.23

WooCommerce Google Analytics Integration: - WooCommerce – 1.4.3
WooCommerce Liisi gateway: - Veebipoed and Liisi – 0.1.0
Woocommerce SEB bank Estonia: - Matis Halmann
Aktsiamaailm LLC – 1.5

Woocommerce Swedbank Estonia: - Matis Halmann
Aktsiamaailm LLC – 1.5

WooCommerce PDF Invoice: - RightPress – 3.1.6
WooCommerce Product Filter: - Farhad Ahmadi – 2.3.4
WooCommerce Sequential Order Numbers Pro: - SkyVerge – 1.11.0
E-Abi DPD Shipping method plugin: - Matis Halmann
Aktsiamaailm LLC – 1.0

E-Abi Woocommerce Omniva Autosend method plugin: - Matis Halmann
Aktsiamaailm LLC – 1.1

E-Abi Omniva Shipping method plugin: - Matis Halmann
Aktsiamaailm LLC – 1.3

Woocommerce Omniva Estonia: - Matis Halmann
Aktsiamaailm LLC – 1.4

Woocommerce Omniva Postkontor Estonia: - Matis Halmann
Aktsiamaailm LLC – 1.3

E-Abi Woocommerce Itella Shipping method plugin: - Matis Halmann
Aktsiamaailm LLC – 1.13

WooCommerce Order Status & Actions Manager: - Actuality Extensions – 2.2.2
WooCommerce: - Automattic – 3.1.1
WP-Mail-SMTP: - Callum Macdonald – 0.10.1
WP Robots Txt: - Christopher Davis – 1.1
WP Smush: - WPMU DEV – 2.7.1
YITH Essential Kit for WooCommerce #1: - YIThemes – 1.4.8

Settings

API Enabled: ✔
Force SSL: ✔
Currency: EUR (€)
Currency Position: right_space
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: #7 - /shop/
Ostukorv: #8 - /cart/
Kassa: #9 - /checkout/
My account: #10 - /my-account/

Theme

Name: Tyrion
Version: 1.8.0
Author URL: http://yithemes.com/
Child Theme: – If you are modifying WooCommerce on a parent theme that you did not build personally we recommend using a child theme. See: How to create a child theme
WooCommerce Support: ✔

Templates

Overrides: tyrion/woocommerce/archive-product.php
tyrion/woocommerce/cart/cart-empty.php version 2.0.0 is out of date. The core version is 3.1.0
tyrion/woocommerce/cart/cart-shipping.php version 2.5.0 is out of date. The core version is 3.1.0
tyrion/woocommerce/cart/cart-totals.php
tyrion/woocommerce/cart/cart.php version 3.0.3 is out of date. The core version is 3.1.0
tyrion/woocommerce/cart/mini-cart.php version 2.5.0 is out of date. The core version is 3.1.0
tyrion/woocommerce/checkout/form-checkout.php
tyrion/woocommerce/checkout/form-login.php
tyrion/woocommerce/checkout/form-shipping.php version 3.0.0 is out of date. The core version is 3.0.9
tyrion/woocommerce/checkout/payment.php
tyrion/woocommerce/checkout/review-order.php
tyrion/woocommerce/content-product.php
tyrion/woocommerce/content-product_cat.php
tyrion/woocommerce/content-single-product.php
tyrion/woocommerce/emails/admin-new-order.php version 2.0.0 is out of date. The core version is 2.5.0
tyrion/woocommerce/emails/email-footer.php version 2.0.0 is out of date. The core version is 2.3.0
tyrion/woocommerce/emails/email-header.php version 2.3.0 is out of date. The core version is 2.4.0
tyrion/woocommerce/global/breadcrumb.php
tyrion/woocommerce/global/sidebar.php
tyrion/woocommerce/global/wrapper-end.php
tyrion/woocommerce/global/wrapper-start.php
tyrion/woocommerce/loop/add-to-cart.php
tyrion/woocommerce/loop/loop-end.php
tyrion/woocommerce/loop/loop-start.php
tyrion/woocommerce/loop/pagination.php
tyrion/woocommerce/loop/sale-flash.php
tyrion/woocommerce/single-product/add-to-cart/external.php
tyrion/woocommerce/single-product/add-to-cart/grouped.php version 3.0.3 is out of date. The core version is 3.0.7
tyrion/woocommerce/single-product/add-to-cart/simple.php
tyrion/woocommerce/single-product/meta.php
tyrion/woocommerce/single-product/price.php
tyrion/woocommerce/single-product/product-attributes.php version 3.0.0 is out of date. The core version is 3.1.0
tyrion/woocommerce/single-product/rating.php version 2.3.2 is out of date. The core version is 3.1.0
tyrion/woocommerce/single-product/related.php
tyrion/woocommerce/single-product/sale-flash.php
tyrion/woocommerce/single-product/short-description.php
tyrion/woocommerce/single-product/tabs/tabs.php
tyrion/woocommerce/single-product/title.php
tyrion/woocommerce/single-product/up-sells.php
tyrion/woocommerce/single-product-reviews.php
tyrion/woocommerce/single-product.php

Outdated Templates: Learn how to update
`

Isolating the problem

  • This bug happens with only WooCommerce plugin active
  • This bug happens with a default WordPress theme active, or Storefront
  • I can reproduce this bug consistently
@mikejolley

This comment has been minimized.

Copy link
Member

commented Jul 13, 2017

Increase the threshold above the number of variations in your product https://gist.github.com/claudiosanches/6f91ad228c2176b986b2 There is a limit of 30 to prevent it needing to load all variations at once.

@mikejolley mikejolley closed this Jul 13, 2017

@ericprem

This comment has been minimized.

Copy link

commented Dec 28, 2017

Thank you so much @mikejolley You saved my project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.