Post by Reptile » Mon Apr 30, 2018 12:37 am

I want to add some extra information to the New Customer Admin Alert email and all the info I need is working except for the zone info.
I cannot get the zone name to display.

In: catalog/model/account/customer.php

I added:

Code: Select all

$this->load->model('localisation/country');

		$countries = $this->model_localisation_country->getCountries();

		foreach ($countries as $country) {
			if ($country['country_id'] == (int)$data['country_id']){
				$data['country'] = $country['name'];
			}
		}
To get the correct country name. (this is working)

When I try to do this for the zone it does not work.

Code: Select all

$this->load->model('localisation/zone');

		$zones = $this->model_localisation_zone->getZones();

		
		foreach ($zones as $zone) {
			if ($zone['zone_id'] == (int)$data['zone_id']){
				$data['zone'] = $zone['name'];
			}
		}
I know zones are more complicated because the are related to countries.
Can anybody tell me what I should do to display the zone name?

The only input you receive in this model is the zone_id and with that I need to display the corresponding name.

All my extensions: Click here or Click here


User avatar
Active Member

Posts

Joined
Mon Jan 30, 2012 7:23 pm
Location - The Netherlands

Post by cyclops12 » Mon Apr 30, 2018 1:34 am

Not sure if this will help but if you look at the bottom of catalog/view/theme/default/template/account/register.tpl there is some json code.
This may get the name from the id ?

Expert Member

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by Reptile » Mon Apr 30, 2018 4:52 am

cyclops12 wrote:
Mon Apr 30, 2018 1:34 am
Not sure if this will help but if you look at the bottom of catalog/view/theme/default/template/account/register.tpl there is some json code.
This may get the name from the id ?
Thank you yes it does but on the front end.
I have also been looking at: admin\view\template\customer\customer_form.tpl
But I need a solution which fetches it in the model.

All my extensions: Click here or Click here


User avatar
Active Member

Posts

Joined
Mon Jan 30, 2012 7:23 pm
Location - The Netherlands

Post by Reptile » Tue May 01, 2018 1:54 am

Nevermind I finally figured it out.

All my extensions: Click here or Click here


User avatar
Active Member

Posts

Joined
Mon Jan 30, 2012 7:23 pm
Location - The Netherlands
Who is online

Users browsing this forum: No registered users and 36 guests