additional Pull-down-menu in admin-customers

Open to all! Ask other shopowners for help.
Post Reply
amaische
Member
Posts: 13
Joined: Wed Aug 18, 2021 7:10 am
Phoenix Version: v1.0.9.7
Been thanked: 1 time

additional Pull-down-menu in admin-customers

Post by amaische »

Hello,
I am currently working on showing all delivery addresses to an choosen customer in admin-customers.

I want to show the countries as a pull-down-menu and with the country from the database as first country (like in the regular customer area).

I do not understand how I have to use the class cd_country correctly. Here my code:

Code: Select all

$country = new cd_country();
$parameters = ['id' => $y_country_id];
$parameters['aria-describedby'] = 'atCountry';
$input = $country->draw_country_list('country_id', $parameters);
echo               "<td class=main>" .  $input. "</td>" ....
y_country_id is from the database the country_id of the delivery address.
The changes are made in /catalog/admin/includes/actions/customers/views/edit.php

All countries are shown as a pull down menu, but the delivery-country does not appear as selected country and it seems that I can not select a country in the pull down.

What is my mistake ?
Anke

php:8.2.32
phoenix: 1.0.9.7


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply