[IMP] website_sale: replace signup by 'Sign In' in checkout
+ add link in confirmation page to propose the signup in b2c
This commit is contained in:
@@ -300,6 +300,10 @@ class Website(models.Model):
|
||||
def is_user(self):
|
||||
return self.env['ir.model.access'].check('ir.ui.menu', 'read', False)
|
||||
|
||||
@api.model
|
||||
def is_public_user(self):
|
||||
return request.env.user.id == request.website.user_id.id
|
||||
|
||||
@api.model
|
||||
def get_template(self, template):
|
||||
View = self.env['ir.ui.view']
|
||||
|
||||
@@ -1142,8 +1142,7 @@
|
||||
<t t-if="mode == ('new', 'billing')">
|
||||
<h3 class="page-header mt32 ml16">Your Address
|
||||
<small> or </small>
|
||||
<t t-set='connect' t-value="request.env['ir.config_parameter'].sudo().get_param('auth_signup.allow_uninvited') == 'True' and ('signup', 'Sign Up') or ('login', 'Log In')"/>
|
||||
<a t-attf-href='/web/{{connect[0]}}?redirect=/shop/checkout' class='btn btn-primary' style="margin-top: -11px"><t t-esc='connect[1]'/></a>
|
||||
<a href='/web/login?redirect=/shop/checkout' class='btn btn-primary' style="margin-top: -11px">Log In</a>
|
||||
</h3>
|
||||
</t>
|
||||
<t t-if="mode == ('edit', 'billing')">
|
||||
@@ -1502,6 +1501,12 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<t t-call="website_sale.payment_confirmation_status" />
|
||||
<t t-if="request.env['ir.config_parameter'].sudo().get_param('auth_signup.allow_uninvited') == 'True' and request.website.is_public_user()">
|
||||
<p class='alert alert-info mt16'>
|
||||
<a t-att-href='order.partner_id.signup_prepare() and order.partner_id.signup_url' class='btn btn-primary'>Sign Up</a>
|
||||
Now to Follow Your Order
|
||||
</p>
|
||||
</t>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3 hidden-sm hidden-xs text-muted">
|
||||
|
||||
Reference in New Issue
Block a user