bob_basli wrote:
ps: also would like to set the default country to Netherlands instead of US.
How do I do That?
I think I found it.
Within the orders module files, open action.default.php
Then find the following around line 750:
Code: Select all
$smarty->assign_by_ref('mod',$this);
if( !empty($status) )
{
$smarty->assign('status',$status);
$smarty->assign('message',$message);
}
$smarty->assign('formstart',$this->CGCreateFormStart($id, 'default', $returnid, $params));
$smarty->assign('formend',$this->CreateFormEnd());
$smarty->assign('input_billing_first_name',
$this->CreateInputText($id, 'billing_first_name',
$billing['first_name'], 30));
$smarty->assign('input_billing_last_name',
$this->CreateInputText($id, 'billing_last_name',
$billing['last_name'], 30));
$smarty->assign('input_billing_address1',
$this->CreateInputText($id, 'billing_address1',
$billing['address1'], 50));
$smarty->assign('input_billing_address2', $this->CreateInputText($id, 'billing_address2',
$billing['address2'], 50));
$smarty->assign('input_billing_city', $this->CreateInputText($id, 'billing_city',
$billing['city'], 30));
$smarty->assign('input_billing_state',
$this->CreateInputStateDropdown($id, 'billing_state',
$billing['state'] != '' ? $billing['state'] : 'AL', false));
$smarty->assign('input_billing_postal',
$this->CreateInputText($id, 'billing_postal', $billing['postal'], 20));
$smarty->assign('input_billing_country',
$this->CreateInputCountryDropdown($id, 'billing_country',
$billing['country'] != '' ? $billing['country'] : 'US', false));
$smarty->assign('input_billing_phone',
$this->CreateInputText($id, 'billing_phone', $billing['phone'], 30));
$smarty->assign('input_billing_fax',
$this->CreateInputText($id, 'billing_fax', $billing['fax'], 30));
$smarty->assign('input_billing_email',
$this->CreateInputText($id, 'billing_email', $billing['email'], 80));
Go to:
Code: Select all
$this->CreateInputCountryDropdown($id, 'billing_country',
$billing['country'] != '' ? $billing['country'] : 'US', false));
Change the 'US' part to the code for your country.
E.g. NL for the Netherlands, GB for the United Kingdom.
These codes can be found within the CGExtensions module files, in countries.txt
Incidentally, the functions used to make the countries and states lists can all be found in the CGExtensions module, in the files form_tools.php and CGExtensions.module.php
Regards
Ben
P.s., I found that the length of the email field (80), breaks the page, so you can also easily change 80 at the end of the line:
Code: Select all
$this->CreateInputText($id, 'billing_email', $billing['email'], 80));
to a smaller value.