Add To Cart While A Certain Variable Is Not Selected
-
Hello,
I have a product with 3 variations.
The variaton 1 is the “Ticket”. You can have a standart event ticket and a ticket with a t-shirt.
Variaon 2 is t-shirt size
Variation 3 is t-shirt gender.So if Variation 1 is set to standart event ticket, then I want the product could be bought without variaton 2&3 selected. Because it’s weird if you buy a ticket without a t-shirt and still get to choose a t-shirt size & gender.
How can I set some of the variables to optional?
-
Hello @overdriver,
Can you please share a link to your site so we can take a look at this product? If the functionality you want to create isn’t included in the WooCommerce core, you might want to use conditional logic for variable products – we’ll suggest which extension you might want to use for this once we get more information about your configuration. 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.
Thanks.
Hello,
An example link is here.
I’d like the ticket could be added to cart without selecting a T-Shirt size & shape.
### WordPress Environment ### WordPress address (URL): https://themadcaprocks.com Site address (URL): https://themadcaprocks.com WC Version: 5.8.0 REST API Version: ? 5.8.0 WC Blocks Version: ? 5.9.1 Action Scheduler Version: ? 3.3.0 WC Admin Version: ? 2.7.2 Log Directory Writable: ? WP Version: 5.8.1 WP Multisite: – WP Memory Limit: 768 MB WP Debug Mode: – WP Cron: ? Language: en_US External object cache: – ### Server Environment ### Server Info: Apache PHP Version: 7.4.24 PHP Post Max Size: 256 MB PHP Time Limit: 120 PHP Max Input Vars: 3000 cURL Version: 7.66.0 OpenSSL/1.1.1l-fips SUHOSIN Installed: – MySQL Version: 5.7.32-35-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: 5.8.0 WC Database Prefix: uva_ Total Database Size: 25.46MB Database Data Size: 17.99MB Database Index Size: 7.47MB uva_woocommerce_sessions: Data: 0.08MB + Index: 0.02MB + Engine InnoDB uva_woocommerce_api_keys: Data: 0.02MB + Index: 0.03MB + Engine InnoDB uva_woocommerce_attribute_taxonomies: Data: 0.02MB + Index: 0.02MB + Engine InnoDB uva_woocommerce_downloadable_product_permissions: Data: 0.02MB + Index: 0.06MB + Engine InnoDB uva_woocommerce_order_items: Data: 0.02MB + Index: 0.02MB + Engine InnoDB uva_woocommerce_order_itemmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB uva_woocommerce_tax_rates: Data: 0.02MB + Index: 0.06MB + Engine InnoDB uva_woocommerce_tax_rate_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB uva_woocommerce_shipping_zones: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_woocommerce_shipping_zone_locations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB uva_woocommerce_shipping_zone_methods: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_woocommerce_payment_tokens: Data: 0.02MB + Index: 0.02MB + Engine InnoDB uva_woocommerce_payment_tokenmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB uva_woocommerce_log: Data: 0.02MB + Index: 0.02MB + Engine InnoDB uva_actionscheduler_actions: Data: 0.14MB + Index: 0.17MB + Engine InnoDB uva_actionscheduler_claims: Data: 0.02MB + Index: 0.02MB + Engine InnoDB uva_actionscheduler_groups: Data: 0.02MB + Index: 0.02MB + Engine InnoDB uva_actionscheduler_logs: Data: 0.08MB + Index: 0.06MB + Engine InnoDB uva_commentmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB uva_comments: Data: 0.03MB + Index: 0.09MB + Engine InnoDB uva_fooevents_check_in: Data: 0.02MB + Index: 0.02MB + Engine InnoDB uva_icl_content_status: Data: 0.02MB + Index: 0.02MB + Engine InnoDB uva_icl_core_status: Data: 0.02MB + Index: 0.02MB + Engine InnoDB uva_icl_flags: Data: 0.02MB + Index: 0.02MB + Engine InnoDB uva_icl_languages: Data: 0.02MB + Index: 0.03MB + Engine InnoDB uva_icl_languages_translations: Data: 0.20MB + Index: 0.17MB + Engine InnoDB uva_icl_locale_map: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_icl_message_status: Data: 0.02MB + Index: 0.03MB + Engine InnoDB uva_icl_mo_files_domains: Data: 0.02MB + Index: 0.02MB + Engine InnoDB uva_icl_node: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_icl_reminders: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_icl_strings: Data: 0.05MB + Index: 0.09MB + Engine InnoDB uva_icl_string_batches: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_icl_string_packages: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_icl_string_pages: Data: 0.02MB + Index: 0.03MB + Engine InnoDB uva_icl_string_positions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB uva_icl_string_status: Data: 0.02MB + Index: 0.02MB + Engine InnoDB uva_icl_string_translations: Data: 0.02MB + Index: 0.03MB + Engine InnoDB uva_icl_string_urls: Data: 0.02MB + Index: 0.02MB + Engine InnoDB uva_icl_translate: Data: 0.06MB + Index: 0.02MB + Engine InnoDB uva_icl_translate_job: Data: 0.02MB + Index: 0.02MB + Engine InnoDB uva_icl_translations: Data: 0.09MB + Index: 0.27MB + Engine InnoDB uva_icl_translation_batches: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_icl_translation_downloads: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_icl_translation_status: Data: 0.05MB + Index: 0.02MB + Engine InnoDB uva_links: Data: 0.02MB + Index: 0.02MB + Engine InnoDB uva_options: Data: 5.06MB + Index: 0.14MB + Engine InnoDB uva_postmeta: Data: 5.50MB + Index: 3.66MB + Engine InnoDB uva_posts: Data: 2.39MB + Index: 0.27MB + Engine InnoDB uva_redirects: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_revslider_css: Data: 0.13MB + Index: 0.00MB + Engine InnoDB uva_revslider_css_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_revslider_layer_animations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_revslider_layer_animations_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_revslider_navigations: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_revslider_navigations_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_revslider_sliders: Data: 0.08MB + Index: 0.00MB + Engine InnoDB uva_revslider_sliders_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_revslider_slides: Data: 1.08MB + Index: 0.00MB + Engine InnoDB uva_revslider_slides_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_revslider_static_slides: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_revslider_static_slides_bkp: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_sgs_log_events: Data: 0.36MB + Index: 0.00MB + Engine InnoDB uva_sgs_log_visitors: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_termmeta: Data: 0.02MB + Index: 0.03MB + Engine InnoDB uva_terms: Data: 0.02MB + Index: 0.03MB + Engine InnoDB uva_term_relationships: Data: 0.06MB + Index: 0.05MB + Engine InnoDB uva_term_taxonomy: Data: 0.02MB + Index: 0.03MB + Engine InnoDB uva_trp_dictionary_en_us_tr_tr: Data: 0.16MB + Index: 0.14MB + Engine InnoDB uva_trp_gettext_en_us: Data: 0.33MB + Index: 0.39MB + Engine InnoDB uva_trp_gettext_tr_tr: Data: 0.41MB + Index: 0.41MB + Engine InnoDB uva_trp_original_meta: Data: 0.08MB + Index: 0.13MB + Engine InnoDB uva_trp_original_strings: Data: 0.11MB + Index: 0.08MB + Engine InnoDB uva_usermeta: Data: 0.05MB + Index: 0.03MB + Engine InnoDB uva_users: Data: 0.02MB + Index: 0.05MB + Engine InnoDB uva_wc_admin_notes: Data: 0.05MB + Index: 0.00MB + Engine InnoDB uva_wc_admin_note_actions: Data: 0.02MB + Index: 0.02MB + Engine InnoDB uva_wc_category_lookup: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_wc_customer_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB uva_wc_download_log: Data: 0.02MB + Index: 0.03MB + Engine InnoDB uva_wc_order_coupon_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB uva_wc_order_product_lookup: Data: 0.02MB + Index: 0.06MB + Engine InnoDB uva_wc_order_stats: Data: 0.02MB + Index: 0.05MB + Engine InnoDB uva_wc_order_tax_lookup: Data: 0.02MB + Index: 0.03MB + Engine InnoDB uva_wc_product_meta_lookup: Data: 0.02MB + Index: 0.09MB + Engine InnoDB uva_wc_reserved_stock: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_wc_tax_rate_classes: Data: 0.02MB + Index: 0.02MB + Engine InnoDB uva_wc_webhooks: Data: 0.02MB + Index: 0.02MB + Engine InnoDB uva_woocommerce_ac_iyzico_card_tokens: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_woocommerce_ac_iyzico_order_refunds: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_wpmailsmtp_debug_events: Data: 0.02MB + Index: 0.00MB + Engine InnoDB uva_wpmailsmtp_tasks_meta: Data: 0.02MB + Index: 0.00MB + Engine InnoDB ### Post Type Counts ### album: 41 attachment: 439 carousels: 9 custom_css: 1 customize_changeset: 7 event: 14 event_magic_tickets: 6 language_switcher: 4 nav_menu_item: 250 page: 104 post: 59 product: 40 product_variation: 40 revision: 133 shop_order: 10 wpcf7_contact_form: 3 ### Security ### Secure connection (HTTPS): ? Hide errors from visitors: ? ### Active Plugins (21) ### Classic Widgets: by WordPress Contributors – 0.2 Woocommerce AC Iyzico Payment Gateway: by Abdullah Ceylan – 1.0.4 Contact Form 7 Extension For Mailchimp: by Renzo Johnson – 0.5.49 Contact Form 7: by Takayuki Miyoshi – 5.4.2 Edge CPT: by Edge Themes – 1.3.1 Edge Instagram Feed: by Edge Themes – 2.0 Edge Twitter Feed: by Edge Themes – 1.0.1 Envato Market: by Envato – 2.0.6 301 Redirects: by WebFactory Ltd – 2.70 Facebook for WooCommerce: by Facebook – 2.6.5 FooEvents for WooCommerce: by FooEvents – 1.12.48 WPBakery Page Builder: by Michael M - WPBakery.com – 6.5.0 WooCommerce One Page Shopping: by OptArt | Piotr Szczygiel – 2.5.34 Really Simple SSL: by Really Simple Plugins – 5.1.1 Slider Revolution: by ThemePunch – 6.3.3 TranslatePress - Multilingual: by Cozmoslabs Razvan Mocanu Madalin Ungureanu Cristophor Hurduban – 2.1.3 User Role Editor: by Vladimir Garagulya – 4.60.2 WooCommerce Price Based on Country Pro Add-on: by Oscar Gare – 2.8.15 WooCommerce Price Based on Country (Basic): by Oscar Gare – 2.0.26 WooCommerce: by Automattic – 5.8.0 WP Mail SMTP: by WPForms – 3.1.0 ### Inactive Plugins (4) ### SiteGround Central: by SiteGround – 2.0.0 SiteGround Optimizer: by SiteGround – 5.9.7 SiteGround Security: by SiteGround – 1.1.3 TranslatePress - Automatic User Language Detection Add-on: by Cozmoslabs Razvan Mocanu – 1.0.8 ### Settings ### API Enabled: ? Force SSL: – Currency: EUR (€) 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) Connected to WooCommerce.com: – ### WC Pages ### Shop base: #5 - /shop/ Cart: #6 - /cart/ Checkout: #7 - /checkout/ My account: #8 - /my-account/ Terms and conditions: ? Page not set ### Theme ### Name: Rebellion Version: 1.6 Author URL: https://themeforest.net/user/edge-themes 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 ### Archive Template: Your theme has a woocommerce.php file you will not be able to override the woocommerce/archive-product.php custom template since woocommerce.php has priority over archive-product.php. This is intended to prevent display issues. Overrides: rebellion/woocommerce/cart/cart-shipping.php rebellion/woocommerce/cart/cart-totals.php rebellion/woocommerce/cart/cart.php rebellion/woocommerce/cart/shipping-calculator.php rebellion/woocommerce/content-product.php rebellion/woocommerce/content-single-product.php rebellion/woocommerce/global/quantity-input.php rebellion/woocommerce/loop/pagination.php rebellion/woocommerce/product-searchform.php rebellion/woocommerce/single-product/add-to-cart/external.php rebellion/woocommerce/single-product/add-to-cart/grouped.php version 4.0.0 is out of date. The core version is 4.8.0 rebellion/woocommerce/single-product/add-to-cart/simple.php rebellion/woocommerce/single-product/meta.php rebellion/woocommerce/single-product/product-image.php rebellion/woocommerce/single-product/tabs/tabs.php Outdated Templates: ? Learn how to update ### Geolocation debug info ### Default customer location: geolocation MaxMind GeoIP database: ? MaxMind GeoIP license: ? MM_COUNTRY_CODE: ? GEOIP_COUNTRY_CODE: ? HTTP_CF_IPCOUNTRY: ? HTTP_X_COUNTRY_CODE: ? HTTP_X_REAL_IP: 78.172.170.242 HTTP_X_FORWARDED_FOR: ? REMOTE_ADDR: 78.172.170.242 Real external IP: 78.172.170.242 WCPBC_USE_REMOTE_ADDR: – Geolocation Test: ? ### PBC Settings ### Version: 2.0.26 Base location: TR:TR06 Base currency: EUR Price Based On: billing Shipping: – Test mode: – Test country: – Load products price in background: – Currency format: [symbol][price] Exchange rate API: Prices entered with tax: – Calculate tax based on: shipping Display prices in the shop: excl ### Zone Pricing Euro Zone ### zone_id: euro-zone name: Euro Zone countries: AX | AD | AT | BE | CY | EE | FI | FR | GF | TF | DE | GR | GP | IE | IT | LV | LT | LU | MT | MQ | YT | MC | ME | NL | PT | RE | BL | MF | PM | SM | SK | SI | ES | VA currency: EUR exchange_rate: 1 auto_exchange_rate: yes exchange_rate_fee: 0 round_nearest: currency_format: price_thousand_sep: , price_decimal_sep: . price_num_decimals: 2 disable_tax_adjustment: no ### Zone Pricing Dollar Zone ### zone_id: dollar-zone name: Dollar Zone countries: US currency: USD exchange_rate: 1.1595351467242 auto_exchange_rate: yes exchange_rate_fee: 0 round_nearest: currency_format: price_thousand_sep: , price_decimal_sep: . price_num_decimals: 2 disable_tax_adjustment: no ### Zone Pricing Pound ### zone_id: pound name: Pound countries: GB currency: GBP exchange_rate: 0.84579781435423 auto_exchange_rate: yes exchange_rate_fee: 0 round_nearest: currency_format: price_thousand_sep: , price_decimal_sep: . price_num_decimals: 2 disable_tax_adjustment: no ### Zone Pricing Türkiye ### zone_id: turkiye name: Türkiye countries: TR currency: TRY exchange_rate: 10.6471303581 auto_exchange_rate: yes exchange_rate_fee: 0 round_nearest: currency_format: price_thousand_sep: , price_decimal_sep: . price_num_decimals: 2 disable_tax_adjustment: no ### Action Scheduler ### Complete: 445 Oldest: 2021-10-08 05:52:46 +0000 Newest: 2021-10-16 20:01:13 +0000 Pending: 2 Oldest: 2021-10-17 19:46:09 +0000 Newest: 2021-10-18 14:01:59 +0000 ### Status report information ### Generated at: 2021-10-16 20:15:18 +00:00
Hi @overdriver,
It is a bit unusual to see the shirt sizes when purchasing a ticket without a shirt as an option. WooCommerce variations are set up to use all attributes that are set up as “use for variations.” There’s not a way to have some attributes appear when another one is selected. All attributes are used for every variation.
One way around that would be to use an extension like Product Add-ons. You could make the shirt an option that customers can select separately. That might be an option for you.
https://woocommerce.com/products/product-add-ons/
If you have any questions, please let us know.
Cheers
Hi @overdriver
We’ve not heard back from you in a while, so I’m marking this thread as resolved. If you have further questions, please feel free to open a new topic.
- The topic ‘Add To Cart While A Certain Variable Is Not Selected’ is closed to new replies.