jadess Posted October 21, 2011 Share Posted October 21, 2011 Hello, I am currently building a new site. I created a customer account as a test. I go to My Account --> My Addresses From here, I cannot update or delete an address. When I click "update" it redirects to an Add a New Address form page. When I click "delete", it first prompts, "Are you sure?" and when you hit OK, it then redirects to an Add New Address form page. Any help is appreciated... thanks!! Link to comment Share on other sites More sharing options...
jadess Posted October 22, 2011 Author Share Posted October 22, 2011 I think the problem may be related to the theme. When using the theme " prestashop_new " the update and delete address links do not work. When I switched to the theme "prestashop" the links work. I guess I will start trying to troubleshoot this by comparing the addresses.tpl files of the two different themes.. Link to comment Share on other sites More sharing options...
jadess Posted October 22, 2011 Author Share Posted October 22, 2011 Seems to be fixed. For some reason the addresses.tpl file in "prestashop_new" theme was not generating the correct links for updating or deleting addresses as a customer. For example it was generating "https://site.com/prestashop/address" instead of - "https://site.com/prestashop/address?id_address=3" In address.tpl replaced the lines: <li class="address_update"><a href="{$link->getPageLink('address', true, NULL, "id_address={$address.object.id|intval}")}" title="{l s='Update'}">{l s='Update'}</a></li> <li class="address_delete"><a href="{$link->getPageLink('address', true, NULL, "id_address={$address.object.id|intval}&delete")}" onclick="return confirm('{l s='Are you sure?'}');" title="{l s='Delete'}">{l s='Delete'}</a></li> with this (taken from "prestashop" theme) <li class="address_update"><a href="{$link->getPageLink('address.php', true)}?id_address={$address.object.id|intval}" title="{l s='Update'}">{l s='Update'}</a></li> <li class="address_delete"><a href="{$link->getPageLink('address.php', true)}?id_address={$address.object.id|intval}&delete" onclick="return confirm('{l s='Are you sure?'}');" title="{l s='Delete'}">{l s='Delete'}</a></li> Hopefully this was correct. 1 Link to comment Share on other sites More sharing options...
gregkuwayedesign Posted November 29, 2011 Share Posted November 29, 2011 For those of you having no luck with jadess's solution in 1.4.3: Starting at line 115 in your template's addresses.tpl file, replace the code with the following: <li class="address_update"><a href="{$link->getPageLink('address.php', true)}?id_address={$address.object.id_address}" title="{l s='Update'}">{l s='Update'}</a></li> <li class="address_delete"><a href="{$link->getPageLink('address.php', true)}?id_address={$address.object.id_address}&delete" onclick="return confirm('{l s='Are you sure?'}');" title="{l s='Delete'}">{l s='Delete'}</a></li> The original code makes reference to $address.object.id which, according to my {debug}, doesn't exist. The correct variable is $address.object.id_address. For some reason the intval pipe after the variable was causing only zeroes to show up, so I removed it and it worked. Good luck, hope this helps Link to comment Share on other sites More sharing options...
4saleusa Posted August 19, 2012 Share Posted August 19, 2012 UNSOLVED your solution do not work with 1482 Link to comment Share on other sites More sharing options...
krychlicka Posted August 22, 2012 Share Posted August 22, 2012 from ?id_address={$address.object.id_address|intval}"... to ?id_address={$address.object.id|intval}" ... it works in1482 Link to comment Share on other sites More sharing options...
Dede Posted October 9, 2012 Share Posted October 9, 2012 (edited) it's not working in 1.4.82 in 1.4.82 ?id_address={$address.object.id|intval}" - that link is changed by default. but this problem occured.. Edited October 9, 2012 by Dede (see edit history) Link to comment Share on other sites More sharing options...
coradyne Posted January 26, 2014 Share Posted January 26, 2014 from ?id_address={$address.object.id_address|intval}"... to ?id_address={$address.object.id|intval}" ... it works in1482 it worked for me too (1482 user) thank you so much jadess (and everyone else)! 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