beginpresta Posted November 11, 2010 Share Posted November 11, 2010 I want to get id_address to perform a query inside a php code(added by me) in order-address.tpl.How the value of id_address of the logged person made available to a variable in php?I am at brim,Please help. Link to comment Share on other sites More sharing options...
Divine Posted November 11, 2010 Share Posted November 11, 2010 Link to comment Share on other sites More sharing options...
MrBaseball34 Posted November 12, 2010 Share Posted November 12, 2010 Try $_SERVER['REMOTE_ADDR'] Link to comment Share on other sites More sharing options...
beginpresta Posted November 18, 2010 Author Share Posted November 18, 2010 I tried it but didn't get.I want to get the value of '{$address.id_address|intval}' to be used in a query.Please help. Link to comment Share on other sites More sharing options...
MrBaseball34 Posted November 18, 2010 Share Posted November 18, 2010 OH, my bad, I thought you wanted to get the IP address...Will post answer later Link to comment Share on other sites More sharing options...
beginpresta Posted November 18, 2010 Author Share Posted November 18, 2010 I am expecting your help at the earliest.Thanks in advance. Link to comment Share on other sites More sharing options...
MrBaseball34 Posted November 18, 2010 Share Posted November 18, 2010 You are aware that there may be many addresses.The way to get the value you want is on line 28 {$address.id_address|intval} But, remember, you have to loop the $addresses objectto get the one you want. Link to comment Share on other sites More sharing options...
beginpresta Posted November 20, 2010 Author Share Posted November 20, 2010 The line you have defined have made it as a javascript.I am not able to define it as a php code.Do you have any suggestions? Link to comment Share on other sites More sharing options...
MrBaseball34 Posted November 20, 2010 Share Posted November 20, 2010 In my order-address.tpl, it looks like this: id_address_delivery}selected="selected"{/if}>{$address.alias|escape:'htmlall':'UTF-8'} I don't know what line you are talking about, Link to comment Share on other sites More sharing options...
beginpresta Posted November 22, 2010 Author Share Posted November 22, 2010 Can you please help me how to loop the $addresses object? Link to comment Share on other sites More sharing options...
MrBaseball34 Posted November 22, 2010 Share Posted November 22, 2010 Dude, it's in the code already, look at the code in order-address.tpl.There is a foreach loop, looks like this: {foreach from=$addresses key=k item=address} Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now