woocommerce / woocommerce

A customizable, open-source ecommerce platform built on WordPress. Build any commerce solution you can imagine.
https://woocommerce.com
9.39k stars 10.76k forks source link

Can't select product variations on product page #2587

Closed sbarry50 closed 11 years ago

sbarry50 commented 11 years ago

After updating to WooCommerce 2.0.1, I'm having an issue selecting different product variations for variable products on product pages.

For instance on one of our products, it displays the following variation by default...

varation_before_click

But when you click to change "configurations" the drop down menu immediately reverts back to "Choose an option" as the only option and the variations do not appear.

varation_after_click

mikejolley commented 11 years ago

Demo URL or we cannot confirm.

serveds commented 11 years ago

I am having the same issue

http://test.bcfasteners.com/shop/uss-flat-washers-galvanized/

coenjacobs commented 11 years ago

@serveds Your theme is very old (Canvas Commerce is no longer in use). Please update to the latest Canvas version available via your My Account dashboard on woothemes.com

@sbarry50 If you are using one of our themes, also make sure that you are using the latest version of that theme. Drop us a demo URL to confirm this.

sbarry50 commented 11 years ago

I was on an old version of Canvas (working on a child theme for it) when I discovered it today but even after I updated to 5.1.5 it's still doing it.

It was working fine before I updated to WooCommmerce 2.0.1. I'm on WooFramework 5.5.4 if that matters.

This is on a website I'm building locally so I don't have a demo URL. I'm not sure how I could send you a link without setting it up on a server. Know of any alternatives?

serveds commented 11 years ago

something seems strange ...I have removed the canvas commerce ..running canvas 5.1.5

When I look at the variations in the back end it doesn't say I have attribute selected in the drop downs but when you look at the image I have attached you see the drop down works. I try to re-save the values in and it all ways reverts back.

washer

codearachnid commented 11 years ago

I switched the theme to Canvas and Hustle but ultimately switched back to the original theme - you can see the product page here http://sycamorepewter.com/shop/virginia-square-platter/ this is a screenshot of my variations panel in the product editor e2740a8f08b7f76177cfd52428ababf777c373cd2d

mikejolley commented 11 years ago

There are two errors in this thread, I will address both;

a) Having any x.. per variation is no good. Assign an attribute to each variation. If it doesn't save for any reason, turn off other plugins/theme

b) Variations not showing on the frontend - THEME issue. WC 2.0 add to cart form includes variation data as an attribute called product-data. If your theme includes a custom version of our add to cart form BOOM broken. Switch to 20-10 theme to confirm.

I see no issues in the code.

sbarry50 commented 11 years ago

I put the site running on a server... Here's a URL to a product where I'm having the issue.

http://www.bgchainsawchain.com/test/?product=gravely-pro-master-200-zero-turn-mower

mikejolley commented 11 years ago

Switch themes - use twenty eleven for a moment.

sbarry50 commented 11 years ago

Ok I did and it's still doing it in twenty eleven

mikejolley commented 11 years ago

I wonder if its that attribute with & in it. Do you have a product to test without this?

sbarry50 commented 11 years ago

Yes I can add a new product to test. I'll try that and reply when I'm done.

serveds commented 11 years ago

I have added a new product with new variations and it works. But all the variations that I had before the update do not work

sbarry50 commented 11 years ago

I tried modifying an existing variable product to remove the "&" from the variation and I believe I'm having the same problem as serveds. It won't save the variations in the admin and thus doesn't show any variation options on the frontend.

I'll try adding a new product now to see if that works.

sbarry50 commented 11 years ago

Ok I found the problem. Having the HTML codes for quotation marks and the "&" in the attribute used for the variation was causing the problem.

My original "Configurations" attribute included HTML codes for both (which wordpress converted them to on it's own from inputting " and & and then saving):

Pro-Master 260H-RD w/ 60" cutting deck & 27 HP Kawasaki|Pro-Master 260H w/ 60" cutting deck & 27 HP Kawasaki

When I changed it to the following it worked like it was supposed to on the backend and frontend:

Pro-Master 260H-RD w/ 60in cutting deck and 27 HP Kawasaki|Pro-Master 260H w/ 60in cutting deck and 27 HP Kawasaki

I did test them using only one or the other as well and both caused the same problem.

Ideally, I'd like to continue to use those characters in the variations. Is it possible to fix this so it works like it did in the old version of WooCommerce?

coenjacobs commented 11 years ago

@sbarry50 Yes, see @mikejolley's commits right above your comment. Just fixed it.

sbarry50 commented 11 years ago

Ok great! Thanks!

codearachnid commented 11 years ago

I just confirmed that it was the encoding issue with smart quotes and the update seems to have fixed the problem with not saving the dropdown values for variations.

sbarry50 commented 11 years ago

I hate to say it but after updating to WooCommerce 2.0.2, I'm still having the same problems - won't save variations and display them on the frontend. Removing the codes is the only way I can get it to work properly.

I triple checked that I'm running 2.0.2.

ascottmccauley commented 11 years ago

I'm currently using 2.0.5 and experiencing this same problem. Dropdown for enabled product variations only show 'choose an option'. I'm using a child theme who's parent uses a custom template (just a duplicate of the woocommerce template though). Tomorrow I will check the twenty twelve theme, and try removing the template to see if this fixes the problem.

Edit - Just checked my theme and realized it was somehow using the variable.php template from version 1.6.5

Problem is now solved, sorry.

ddeath commented 9 years ago

I just figured out that options are not shoving if you did not set price for variations. Check if you have set a price....

arlCode commented 8 years ago

@ddeath Yep, that was my issue, thanks!

mtbsomi commented 8 years ago

No dropdowns at all here :/

There's the form, data-product_variations seems to be ok, but the table classed variations is empty:

http://imgur.com/a/y1Spn

All the variations have price, globally set on stock (10 pieces).

No JS error. Console just say notes:

JQMIGRATE: Migrate is installed, version 1.4.0 [cycle] terminating; too few slides: 1

If all other plugins turned off, the problem still exists.

WC was turned on/off, no help.

Theme: eStore v4.5

Any idea?

tdrdimov commented 7 years ago

Hey guys I updated woocommerce twice for the last week and I have the same problem changing variations on the product page but nothing, I went trough all the settings tested different settings but still have the same issue. Can you guys help me with this my website link is https://printle.net Thanks.

damjanstojancic commented 7 years ago

Having the same problem with the latest version of Avada theme and Woocommerce. On initial page load it doesn't show the product variations dropdown, once I click add to chart button the page reloads with all elements properly. Any suggestions on how to solve this? 1 2

adrianowagner commented 5 years ago

I made it work in the worse way... But it works....

As I saw ppl saying that the new products has worked I assumed that you could rebuild your products... So what I did was "Export all the products" and Re Import it... And now it's working... You may try using the All Export and All import solutions... But that several other plugins to export and reimport products...