Page 1 of 1

Change countries list on back-end

Posted: 13 Nov 2019, 17:10
by MikaelNazarenko
I need to customize countries list on customer page on back-end.

As I see it is done here:

Code: Select all

Aimeos.Customer = {

	init : function() {

		this.setupComponents();

		Aimeos.Customer.Product.init();
	},


	select: function(ev, ui) {

		var node = $(ev.delegateTarget);
		node.closest("card-block").find("input.item-countryid").val(node.val());
	},


	setupComponents : function() {

		$(".item-customer .item-countryid.combobox").combobox({
			getfcn: Aimeos.getCountries,
			select: Aimeos.Customer.select
		});
	}
};
How can I do it elegantly ? I need remove unnecessary countries from list.
Thank you!

Re: Change countries list on back-end

Posted: 14 Nov 2019, 07:57
by aimeos
Overwrite the "Aimeos.getCountries" function to return only those countries you want to show.