Skip to content
This repository has been archived by the owner on Mar 17, 2022. It is now read-only.

Product type dropdown shows "Simple Product" after saving a variable product #526

Closed
mrleemon opened this issue Feb 3, 2021 · 8 comments

Comments

@mrleemon
Copy link
Contributor

mrleemon commented Feb 3, 2021

I installed the plugin from master with the latest commits from February to test if issues with variable product persist, and I see that #510 is still occurring.
When I save a variable product, and the edit product page reloads, the "Single Product" option in the product type dropdown is selected. As soon as I select "Variable Product", all the previously set up attributes and variations appear again, so this data is apparently not lost when saving.

@Jon007
Copy link
Contributor

Jon007 commented Feb 3, 2021

ok wow, it works fine in Safari which i was using but in Chrome no, nada

@Jon007 Jon007 closed this as completed in d9e55ad Feb 3, 2021
@Jon007
Copy link
Contributor

Jon007 commented Feb 3, 2021

Hi @mrleemon try this, just replaced the JQuery with standard javascript

@mrleemon
Copy link
Contributor Author

mrleemon commented Feb 3, 2021

I tested this new version and now in the edit screen of any previously saved product (single, group, external, etc.), the "Variable Product" option is always selected in the Product Type dropdown.

@mrleemon
Copy link
Contributor Author

mrleemon commented Feb 3, 2021

I suppose this line:

document.getElementById("product-type").value="variable";

should be:

document.getElementById("product-type").value="%2$s";

to select the correct type ($type[0] parameter in the sprintf)

Jon007 added a commit that referenced this issue Feb 3, 2021
@Jon007
Copy link
Contributor

Jon007 commented Feb 3, 2021

haha yes, was already on it..

@mrleemon
Copy link
Contributor Author

mrleemon commented Feb 3, 2021

In this new patch you referenced the wrong placeholder: It's %2$s, not %1$s

Jon007 added a commit that referenced this issue Feb 3, 2021
@mrleemon
Copy link
Contributor Author

mrleemon commented Feb 3, 2021

Thanks!

@PauKokura
Copy link

Hi. Sorry to say that my wp is still stuck with this #526 issue. Same with the 1.4.5 zip from github and the 1.5.0 from wordpress repo. I'm totally lost.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants