M4rt1n
March 18, 2019, 12:34am
1
Situation:
I make my own templates and want the country names to be displayed completely.
Normaly it shows: “DE”
I want it to show: “Deutschland” (Germany)
In the PDF I solved it with
get_country_name(trans('cldr'), $quote->user_country)
But when I use it in the Web-View it throws this error:
Call to undefined function get_country_name()
Is there any workaround to also display in the Web-Template the complete country name?
Thanks in advance!
M4rt1n:
Call to undefined function get_country_name()
You need this in the controller
<?php $this->load->helper('country'); ?>
2 Likes
M4rt1n
March 18, 2019, 4:07pm
3
First, thanks for the help! After adding this into the controller it worked properly!
I just edited the Thread-Topic to ask some more questions about variables which are not possible to set by default.
In the Web-Template I also want to display the quote_tax_rate_name
and the quote_tax_rate
Can you help me with that aswell?
Thanks!
#EDIT: solved it with this code:
<?php foreach ($quote_tax_rates as $quote_tax_rate) : ?>
<?php echo $quote_tax_rate->quote_tax_rate_name . ' ' . format_amount($quote_tax_rate->quote_tax_rate_percent); ?> %
<?php endforeach ?>
1 Like
system
Closed
April 1, 2019, 4:12pm
4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.