Closed Rmh1978 closed 1 year ago
thank you @Rmh1978 , we will check and process your PR
Admin user has hiden (user, create new order)
but select the Shipping address it not hide
Create new acc at FE it not hide Edit Billing has show on the State field but when user select the Country it has hiden
anh @NguyenBao10 , @Rmh1978 help me check it again
Hi @VanTrieuThanh
Your comment: "but select the Shipping address it not hide" Is related to the issue I described in the PR: "There is a issue in admin Addorder. If the BT country has states and you add shipping and choose a country that has no states redshop.js function also hides the BT state. I guess this effects only big international shop and happens rarely. Not a issue for me. My commits has not fixed or created this issue."
So i did not add the id="div_state_txt" in ST because then it would effect the BT user.
The rest of the comments
are is also described in my PR because of the function:
// Now let's hide state list by default
in https://github.com/redCOMPONENT-COM/redSHOP/blob/develop/media/com_redshop/js/redshop.js does not hide the state list by default (on page load) and if there is a pre-selected country that has States then is should display state list.
That is why i added this old core code more places:
<script type="text/javascript" language="javascript"> if (document.getElementById('rs_state_state_code')) { if (document.getElementById('rs_state_state_code').options[1] == undefined) { document.getElementById('div_state_txt').style.display = 'none'; } } </script>
This was not needed if the js check worked on initial load.
I have not added this code for the FE you commentet about because my FE dont work in my 3.0.3 test version. @NguyenBao10 is working on it, so i can test in FE as well.
My fixes have not broken, but enhanced the "state hide" some places but not all. The state hide function has not worked for years. I just hardcoded "display:none" on the state fields untill now.
Admin
It fine for me on the my local site. @Rmh1978 so we can continue the next step
@anhredweb please merge.
I corrected the display:none functions for when a country does not have states, it didnt work for years.
The function in redshop.js does work and display:none the State TR on change of country. But it does not hide id="div_state_txt" on initial load.
There is a issue in admin Addorder. If the BT country has states and you add shipping and choose a country that has no states redshop.js function also hides the BT state. I guess this effects only big international shop and happens rarely. Not a issue for me. My commits has not fixed or created this issue.
@lunguyenhat @NguyenBao10