Change countries list on back-end

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
MikaelNazarenko
Advanced
Posts: 167
Joined: 27 Jun 2019, 16:19

Change countries list on back-end

Post by MikaelNazarenko » 13 Nov 2019, 17:10

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!

User avatar
aimeos
Administrator
Posts: 4137
Joined: 01 Jan 1970, 00:00

Re: Change countries list on back-end

Post by aimeos » 14 Nov 2019, 07:57

Overwrite the "Aimeos.getCountries" function to return only those countries you want to show.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

janiefisher
Posts: 1
Joined: 29 Nov 2019, 06:54

Re: Change countries list on back-end

Post by janiefisher » 29 Nov 2019, 06:57

It works, thank you aimeos!

Post Reply