Issue with invalid variants not disabling add to cart button

Issue with invalid variants not disabling add to cart button

Viewsofjavi
Tourist
10 0 1

I recently attempted to integrate my store with Facebook and Instagram but after doing so, my variant selector stopped working. I haven't added any custom code, or implemented third party apps to handle variants. I use swatches for one set of the options. When a set of options are selected that don't make up a preset variant, adding to cart functionality still remains. When add to cart is pressed with an invalid variant, the store adds to the cart the variant with all three variant parameters set to the first option. Has anyone else run into this issue?

Replies 4 (4)

oscprofessional
Shopify Partner
16386 2441 3190

Hello @Viewsofjavi ,

 

  • Disable Integration: Temporarily disconnect Facebook/Instagram and test again.
  • Update Theme: Ensure your theme is up-to-date for compatibility.
  • Verify Swatches: Confirm swatches are linked correctly to variants.
  • Review Variant Code: Check your theme’s JavaScript (e.g., product.js) for conflicts.
  • Test Dropdowns: Switch to dropdown selectors to isolate swatch issues.
  • Inventory Policy: Ensure invalid combinations disable the "Add to Cart" button.

 

Hire us | Pass Core Web Vital | B2B Wholesale Experts | Claim Your Free Website Review |
Connect with Us: WhatsApp | Skype: oscprofessionals-87 | Email: pallavi@oscprofessionals.com |
Custom Shopify SolutionsPrivate Apps, Theme Customization & SEO | Digital Marketing |
OSCP Apps: Discount Suite | Wholesale App | Bundle & Upsell | Shipping Discount | and more...
Viewsofjavi
Tourist
10 0 1

Seems that the code changed to "selected, first available or default" variant selection for the add-to-cart/buy button functionality. Instead of checking availability OR variant configuration for the selected combination, the add-to-cart/buy buttons allow the customer to add the default variant to their cart when they select an unconfigured variant. I had shopify support help me, it wasn't to do with the theme. Problem persisted with different themes. The swatches are configured correctly, switching to dropdowns changed nothing. An unconfigured variant selection shouldn't allow the customer to add anything to the cart. I don't know when the code changed but there's another seller I've come across with the same issue and they didn't attempt to integrate FB/Instagram.

Bizfound
Shopify Partner
2 0 0

I'm having the same problem. Invalid variant option combinations are selectable even when they shouldn't be. 

Viewsofjavi
Tourist
10 0 1

Have they fixed your issue yet?