| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
trying to fix the address layout on the gmap.tpl file | |||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||
|
|||||||
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:
the line in question is the Code:
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.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3 mods: reCaptcha running on UNIX www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2 mods: reCaptcha cdseo pro running on UNIX |
|||||||
#2
|
|||||||||
|
|||||||||
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
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#3
|
|||||||
|
|||||||
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?
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3 mods: reCaptcha running on UNIX www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2 mods: reCaptcha cdseo pro running on UNIX |
|||||||
#4
|
|||||||||
|
|||||||||
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
__________________
Steve Stoyanov CFLSystems.com Web Development |
|||||||||
#5
|
|||||||
|
|||||||
Re: trying to fix the address layout on the gmap.tpl file
thanks for the tips Steve.
__________________
www.uscandleco.com - X-Cart Version 4.7.11 Gold Plus php7.3 mods: reCaptcha running on UNIX www.keystonecandle.com X-Cart Gold Plus - Version 4.7.11 php7.2 mods: reCaptcha cdseo pro running on UNIX |
|||||||
|
|||
X-Cart forums © 2001-2020
|