Hi all,
I'm a PHP noob, but I'm trying to add Canadian states to the eCommerce
"Store" module (5.x-3.6), and inside the "store_location.inc" file it says:
// If you would like to add more state lists:
// 1. Create a file called store_custom.inc and place it in the
store.module directory.
// 2. Copy this function to the new file and rename the function
"store_custom_build_states()"
// 3. Add new countrys to the array by uncommenting or adding the
following syntax:
// By adding a separate file, you do not risk over-riding your custom
lists during an upgrade.
/*
So I created a separate file with the name: "store_custom.inc" and put
this text in it:
- - - - - - - - - - - - - code - - - - - - - - - - - - -
function store_custom_build_states()
$available_states['ca'] = array(
'AD' => 'Alberta',
'BC' => 'British Columbia',
'MB' => 'Manitoba',
'NB' => 'New Brunswick',
'NL' => 'Newfoundland',
'NT' => 'Northwest Territories',
'NS' => 'Nova Scotia',
'NU' => 'Nunavut',
'ON' => 'Ontario',
'PE' => 'Prince Edward Island',
'QC' => 'Quebec',
'SK' => 'Saskatchewan',
'YT' => 'Yukon',
);
- - - - - - - - - - - - - code - - - - - - - - - - - - -
Is what I've done correct? Or did I misinterpret the directions?
Does it need a "{" after the function name if it's an include?
Also, does the main page need to be modified to know to add this file?
Thanks for any assistance!