redirect to order when creating or updating address from the order

This commit is contained in:
Julien Chanséaume
2014-07-28 09:39:03 +02:00
committed by Julien Chanseaume
parent d105879fa1
commit ca3cdb278c
2 changed files with 15 additions and 2 deletions

View File

@@ -26,7 +26,16 @@
{loop name="customer.update" type="address" customer="current" id="{$address_id}"} {loop name="customer.update" type="address" customer="current" id="{$address_id}"}
<form id="form-address" class="form-horizontal" action="{url path="/address/update/{$address_id}"}" method="post"> <form id="form-address" class="form-horizontal" action="{url path="/address/update/{$address_id}"}" method="post">
{form_field form=$form field='success_url'} {form_field form=$form field='success_url'}
<p>
next: {$smarty.get.next}<br />
default: {url path="/account"}<br />
successs: {$value}
</p>
{if $value}
{$next_url=$value}
{else}
{$next_url=$smarty.get.next|default:{url path="/account"}} {$next_url=$smarty.get.next|default:{url path="/account"}}
{/if}
<input type="hidden" name="{$name}" value="{$next_url}" /> <input type="hidden" name="{$name}" value="{$next_url}" />
{/form_field} {/form_field}

View File

@@ -25,8 +25,12 @@
{form name="thelia.front.address.create"} {form name="thelia.front.address.create"}
<form id="form-address" class="form-horizontal" action="{url path="/address/create"}" method="post"> <form id="form-address" class="form-horizontal" action="{url path="/address/create"}" method="post">
{form_field form=$form field='success_url'} {form_field form=$form field='success_url'}
{if $value}
{$next_url=$value}
{else}
{$next_url=$smarty.get.next|default:{url path="/account"}} {$next_url=$smarty.get.next|default:{url path="/account"}}
<input type="hidden" name="{$name}" value="{url path="/account"}" /> {/if}
<input type="hidden" name="{$name}" value="{$next_url}" />
{/form_field} {/form_field}
{form_field form=$form field='error_message'} {form_field form=$form field='error_message'}