Page 1 of 1

Orders billing template error - orders_state_options

Posted: Mon Feb 12, 2018 7:22 am
by edmundspriede
i get this on Orders default action

Code: Select all

Syntax error in template "module_db_tpl:module_db_tpl:Orders;billingform_Sample"  on line 84 "{orders_state_options selected=$billing->get_state()}" unknown tag "orders_state_options"

Re: Orders billing template error - orders_state_options

Posted: Sun Mar 04, 2018 6:39 am
by WWc
Hi edmundspriede

Did you manage to resolve this?

I have a second website with this issue now.

Re: Orders billing template error - orders_state_options

Posted: Sun Mar 04, 2018 5:35 pm
by velden
I don't know about this specific error but it can be helpful to create a new template for the specific module action and review its contents. Then compare with your template.

Things change in the module but the existing templates won't be touched.

Re: Orders billing template error - orders_state_options

Posted: Mon Mar 05, 2018 5:06 am
by WWc
velden wrote:I don't know about this specific error but it can be helpful to create a new template for the specific module action and review its contents. Then compare with your template.

Things change in the module but the existing templates won't be touched.

Great hint. Thanks

Re: Orders billing template error - orders_state_options

Posted: Mon Mar 05, 2018 7:50 am
by WWc
I've fixed it for me. Hooray!

In the Billing Template, I've made the following changes (using tags from a template I made about a year ago on another site).

I only ship to one country.

Find
{orders_state_options selected=$billing->get_state()}

Replace with
{html_options options=$state_list selected=$billing->get_state()}

Find
{orders_country_options options=$billing->get_country()}

Replace with
{html_options options=$country_list selected=$billing->get_country()}

Find
<select name="{$actionid}shipping_{$i}_state">
{orders_state_options selected=$addr->get_state()}
</select>

Replace with
<input type="text" name="{$actionid}shipping_{$i}_postal" value="{$addr->get_postal()}" size="20"/>

Find
{orders_country_options selected=$addr->get_country()}

Replace with
{html_options options=$country_list selected=$addr->get_country()}