Post by sbsjr13 » Tue Nov 21, 2017 10:09 pm

So I am wondering about showing the state in the registration email.

If I just add the display of the zone_id it just shows a number which corresponds to the state, but I would like to show the actual state name, how do I do this?

New member

Posts

Joined
Wed Sep 16, 2015 8:02 pm

Post by straightlight » Tue Nov 21, 2017 10:34 pm

sbsjr13 wrote:
Tue Nov 21, 2017 10:09 pm
So I am wondering about showing the state in the registration email.
So the Opencart version has not been posted in order to integrate your amended request.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by sbsjr13 » Tue Nov 21, 2017 10:44 pm

Is there a workaround for this?

New member

Posts

Joined
Wed Sep 16, 2015 8:02 pm

Post by straightlight » Tue Nov 21, 2017 10:48 pm

sbsjr13 wrote:
Tue Nov 21, 2017 10:44 pm
Is there a workaround for this?
Yes, by first posting your OC version.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by sbsjr13 » Tue Nov 21, 2017 10:50 pm

Right now I am getting...

Web Site: Company Site
First Name: Test
Last Name: Register
Company:
Customer Group: Default
E-Mail: sbsxxx@XXXX.com
Telephone: 712XXXXXXXX
City: Storm Lake
State: 3637
Zip Code: 50588

Obviously the state is the zone_id which corresponds to Iowa, i just need it to display Iowa instead..

New member

Posts

Joined
Wed Sep 16, 2015 8:02 pm

Post by sbsjr13 » Tue Nov 21, 2017 10:52 pm

if ($this->config->get('config_account_mail')) {
$message = $this->language->get('text_signup') . "\n\n";
$message .= $this->language->get('text_website') . ' ' . $this->config->get('config_name') . "\n";
$message .= $this->language->get('text_firstname') . ' ' . $data['firstname'] . "\n";
$message .= $this->language->get('text_lastname') . ' ' . $data['lastname'] . "\n";
$message .= $this->language->get('text_company') . ' ' . $data['company'] . "\n";
$message .= $this->language->get('text_customer_group') . ' ' . $customer_group_info['name'] . "\n";
$message .= $this->language->get('text_email') . ' ' . $data['email'] . "\n";
$message .= $this->language->get('text_telephone') . ' ' . $data['telephone'] . "\n";
$message .= $this->language->get('text_city') . ' ' . $data['city'] . "\n";
$message .= $this->language->get('text_zone_id') . ' ' . $data['zone_id'] . "\n";
$message .= $this->language->get('text_postcode') . ' ' . $data['postcode'] . "\n";

New member

Posts

Joined
Wed Sep 16, 2015 8:02 pm

Post by sbsjr13 » Tue Nov 21, 2017 10:53 pm

I am running OC 2.0.1.0

New member

Posts

Joined
Wed Sep 16, 2015 8:02 pm

Post by straightlight » Tue Nov 21, 2017 11:06 pm

Replace:

Code: Select all

$message .= $this->language->get('text_zone_id') . ' ' . $data['zone_id'] . "\n";
with:

Code: Select all

$this->load->model('account/address');
			
			$this->load->model('localisation/zone');
			
			$address = $this->model_account_address->getAddress($address_id);
			
			if ($address) {
				$zone = $this->model_localisation_zone->getZone($address['zone_id']);
				
				if ($zone) {
					$message .= $this->language->get('text_zone_id') . ' ' . html_entity_decode($zone['name'], ENT_QUOTES, 'UTF-8') . "\n";
				}
			}

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by sbsjr13 » Tue Nov 21, 2017 11:29 pm

I dont get the state line at all in email now.. any language mods needed?

Web Site: Company Site
First Name: Test
Last Name: Register
Company:
Customer Group: Default
E-Mail: sbxxx@xxx.com
Telephone: 71xxxxxxxxx
City: Storm Lake
Zip Code: 50588

New member

Posts

Joined
Wed Sep 16, 2015 8:02 pm

Post by straightlight » Wed Nov 22, 2017 12:22 am

Ensure to have set full access to your database rights on your host console. The inserted IDs should be re-obtainable at the same period where they were first inserted with the captured variables of any methods on the platform.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by sbsjr13 » Wed Nov 22, 2017 1:08 am

I do but this isnt helping me.. sorry.. thanks for trying..

New member

Posts

Joined
Wed Sep 16, 2015 8:02 pm

Post by straightlight » Wed Nov 22, 2017 1:09 am

sbsjr13 wrote:
Wed Nov 22, 2017 1:08 am
I do but this isnt helping me.. sorry.. thanks for trying..
It is not a simple tryout solution. The solution above is working. Try on a virtual server. The values should be returned as expected.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by sbsjr13 » Wed Nov 22, 2017 1:19 am

Maybe my problem is this is Mijoshop which is OC 2.0.1.0, but is a mod of oc..

New member

Posts

Joined
Wed Sep 16, 2015 8:02 pm

Post by straightlight » Wed Nov 22, 2017 1:19 am

As suggested above, try on a virtual server. Check error logs and access logs on both servers.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by sbsjr13 » Wed Nov 22, 2017 2:53 am

Tried it on a more or less plain jane site too, doesnt work there either.. so must be something with mijoshop variables... i will look into it further.

New member

Posts

Joined
Wed Sep 16, 2015 8:02 pm
Who is online

Users browsing this forum: No registered users and 196 guests