![]() |
trying to fix the address layout on the gmap.tpl file
When I click on a customers location in the admin/orders/ it opens up a map with the customer name and address in the top left corner. I would like to fix the way the address is laid out. The template that lays out the address is /common_files/gmap.tpl
Code:
{capture name="gmap"} the line in question is the Code:
{$description.address} How do I adjust the way that variable is laid out? Meaning I want to have Street City, State, Zip instead of Street Zip City State Any help would be appreciated. Thanks. |
Re: trying to fix the address layout on the gmap.tpl file
You will have to go to the php or js file that writes "address" to $description array and correct it there. Another way would be to use smarty modifier to modify {$description.address} and re-write it any way you want
|
Re: trying to fix the address layout on the gmap.tpl file
I've google smarty modifier and kind of understand but could you give an example of some code that would move parts of the variable around? I'm not asking for the full answer cause I'd like to learn. How do I "see" the different parts of the variable?
|
Re: trying to fix the address layout on the gmap.tpl file
$description is an array. you can list its key/value pairs with var_dump or print_r php functions.
If you are sure "address" holds the value you want to modify and it is like you said most likely there is "<br/>" for each new line in it. You can also use smarty replace on the variable to replace the new line with comma. Coding modifier you can use "explode" to split the $description['address'] and then joing them together in new variable(s) as you need |
Re: trying to fix the address layout on the gmap.tpl file
thanks for the tips Steve.
|
All times are GMT -8. The time now is 04:10 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.