kungfumunchkin Posted August 23, 2010 Share Posted August 23, 2010 Is it possible to integrate the adress page into the identity page so the customer don't have to change info on two different pages? Link to comment Share on other sites More sharing options...
cactusman2 Posted August 23, 2010 Share Posted August 23, 2010 In your template folder open the following files (save a copy of each file before):- addresses.tpl- identity.tplCopy everything in addresses.tpl except the following line at the top: <!-- var baseDir = '{$base_dir_ssl}'; --> *ript and this one at the end: > </pre> <ul> {l s='Back to Your Account'} {l s='Home'} </ul> Paste everything in identity.tpl before the following line: > </pre> <ul> {l s='Back to Your Account'} {l s='Home'} </ul> You might want to remove the addresses link in account page...In my-account.tpl (make a copy of the file and open the original one)replace: {l s='Your addresses'} with {* {l s='Your addresses'} *} Link to comment Share on other sites More sharing options...
kungfumunchkin Posted August 23, 2010 Author Share Posted August 23, 2010 Thank you for the reply. That's almost what i'm after. When doing that you get the links etc to change you're adress but it don't know that you already have an adress. That will just leave a link that says "you don't have any adress yet, register a new one" even though you have 3 or 4. What I'm after is make the form look like the one when you are registering for the first time.It should just show the same form but with the information pre-entered so you can just see what you have registered and what you want to change real quick. Something like on the picture i have attached. (sorry for the english) Link to comment Share on other sites More sharing options...
cactusman2 Posted August 23, 2010 Share Posted August 23, 2010 Seems a bit complicated as to have the form displayed this way you have to select an address first as in Prestashop you can have different addresses... Link to comment Share on other sites More sharing options...
kungfumunchkin Posted August 24, 2010 Author Share Posted August 24, 2010 Thank you for the help. I'll try your first example a bit more and see how that works out. Link to comment Share on other sites More sharing options...
cactusman2 Posted August 24, 2010 Share Posted August 24, 2010 To make the identity page to detect existing addresses and work properly I think you would need to copy part of the addresses.php file in the identity.php file.Try to copy the following content of addresses.php: if (!$cookie->isLogged()) Tools::redirect('authentication.php?back=addresses.php'); $customer = new Customer(intval($cookie->id_customer)); if (!Validate::isLoadedObject($customer)) die(Tools::displayError('customer not found')); include(dirname(__FILE__).'/header.php'); $smarty->assign('addresses', $customer->getAddresses(intval($cookie->id_lang))); $smarty->display(_PS_THEME_DIR_.'addresses.tpl'); include(dirname(__FILE__).'/footer.php'); in the identity.php file before: include(dirname(__FILE__).'/header.php'); $smarty->display(_PS_THEME_DIR_.'identity.tpl'); include(dirname(__FILE__).'/footer.php'); It should work but will not display the address form as you want. Link to comment Share on other sites More sharing options...
kungfumunchkin Posted August 25, 2010 Author Share Posted August 25, 2010 Tried this and it resulted in a hack error, I might have done something wrong though.Thank you for trying, I'll stick too the default my-account page for adresses. 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