3 Letter Code instead of State_Name on Invoices

  • Posts: 35
  • Thank you received: 1
9 years 8 months ago #195860

-- HikaShop version -- : 2.3.5
-- Joomla version -- : 3.3.6
-- PHP version -- : 5.5.1
-- Browser(s) name and version -- : All Browsers

Hi There

I have been customising the Shipping and Tax Invoices for the ISIS template by modifying the invoice.php override file.

I have made some changes to the ISIS Address Template too (address_template.php). But I can't figure out how to use the 3 Letter State Code instead of the State Name in the address template.

For example I now have the shipping and billing address showing as:

Sydney New South Wales 2000.

But I would like it to be:

Sydney NSW 2000

Is this possible? If so how would I go about this?

Kind regards

Mark

Please Log in or Create an account to join the conversation.

  • Posts: 13201
  • Thank you received: 2322
9 years 8 months ago #195866

Hi,

This will require some code to edit the display.
For example in the view "address / show" you will have to replace:

echo $this->addressClass->displayAddress($this->fields,$this->address,'address');
By a code which will edit the address state name by its state code.
// Get the address html
$address = $this->addressClass->displayAddress($this->fields,$this->address,'address');
// Then add code to process it in order to replace the state name by the state code

It require php knowledges.

Please Log in or Create an account to join the conversation.

Time to create page: 0.060 seconds
Powered by Kunena Forum