Title: Variations error
Last modified: August 21, 2016

---

# Variations error

 *  Resolved [katalonian](https://wordpress.org/support/users/katalonian/)
 * (@katalonian)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/variations-error/)
 * Hi there!
    I have a huge problem for last few days with variations on WooCommerce.
   Some products have around 20 variations. In beginning there were no problem, 
   but suddenly one day variations in front end stopped working caused by JS error:
 * > Uncaught TypeError: Cannot read property ‘product_id’ of undefined
   >  – add-to-
   > cart-variation.min.js?ver=2.1.8:4
 * When you choosing a variation on front-end in drop-down menu, nothing changes(
   No SKU, no Price, add to cart button doesn’t show), i mean nothing happens when
   you swapping between vars.
    And button “Clear selection” always stays on, even
   if there no selection on dropdown. I found a lot topics where people were discussing
   this problem. I tried so many things, and actually i found one solution which
   helped me. It was to copy code from **add-to-cart-variation.js** and paste it
   inside **add-to-cart-variation.min.js** with replacing everything. It helped 
   me, but a got another problem in this case. When you adding product to cart, 
   page refreshes, but it doesn’t add it to your cart. Does anyone know how to deal
   with it? It’s really irritating, i spend few days now, and no results.. Thanks
   a lot in advance, hope to got some solutions here…
 * WC Version: 2.1.8
    Theme Name: Mystile Theme Version: 1.3.0
 * [https://wordpress.org/plugins/woocommerce/](https://wordpress.org/plugins/woocommerce/)

Viewing 1 replies (of 1 total)

 *  Thread Starter [katalonian](https://wordpress.org/support/users/katalonian/)
 * (@katalonian)
 * [12 years, 1 month ago](https://wordpress.org/support/topic/variations-error/#post-4905788)
 * So, according to this reference [https://github.com/woothemes/woocommerce/issues/4707](https://github.com/woothemes/woocommerce/issues/4707)
   i deleted variable.php , but from plugins folder, and copy-pasted there a new
   variable.php from woocommerce instalation pack. And everything works now!
    And
   i also rolled back previous changes in files a mentioned above. Magic…

Viewing 1 replies (of 1 total)

The topic ‘Variations error’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [attributes](https://wordpress.org/support/topic-tag/attributes/)
 * [js](https://wordpress.org/support/topic-tag/js/)
 * [variables](https://wordpress.org/support/topic-tag/variables/)
 * [variations](https://wordpress.org/support/topic-tag/variations/)

 * 1 reply
 * 1 participant
 * Last reply from: [katalonian](https://wordpress.org/support/users/katalonian/)
 * Last activity: [12 years, 1 month ago](https://wordpress.org/support/topic/variations-error/#post-4905788)
 * Status: resolved