burt wrote: ↑Mon Aug 28, 2023 10:21 am
It's not ideal, because you'll always be working with older code, so when you need help, it's code most of us will have forgotten about
Each time you ask a question, just *ensure* to state that you are on a modified 1.0.7.18, the codebase engine from 1.0.7.18 (March 2021) to 1.0.8.20 (current release) is changed a lot.
class hook_shop_create_account_cityCountry {
public function listen_injectBodyEnd() {
// get the country ID from the ISO code as the country id can change, but 99.9% of the time never will
$c_query = tep_db_query("SELECT countries_id FROM countries WHERE countries_iso_code_2 = 'GB'");
$c = tep_db_fetch_array($c_query);
$countryid = $c['countries_id'];
$cc = <<<tt
<script>
document.getElementById("inputCity").value = "Bishops Stortford";
document.getElementById("inputState").value = "Hertfordshire";
document.getElementById("inputCountry").value = "{$countryid}";
</script>
tt;
return $cc;
}
}
Thank you @burt
This updated code worked better except that the country not is populated.
And thanks for your advice about stating a version. I was looking for somewhere in my profile I could enter my version so it is displayed with my posts and questions like I've seen on some other forums.
Untitled-1.jpg
You do not have the required permissions to view the files attached to this post.
burt wrote: ↑Mon Aug 28, 2023 12:38 pm
There are two things you could do to solve this.
It's time for you to "catch a fish and feed yourself" rather than just be given fish to eat.
Take a think about what two things you could do, and do one of them.
Both of those things concern "State/County".
Thank you for the fishing tips. I have done some fishing and get the city, county, and country populated. However, I am still keen to explore your initial suggestion to hide away that country selection from customers entirely. My baits have not had any success in that area.