Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls

How to return to the page sale URL after login/registration

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 02-28-2018, 10:33 AM
 
Kevin Brown Kevin Brown is offline
 

Newbie
  
Join Date: May 2015
Posts: 4
 

Default How to return to the page sale URL after login/registration

Hi
I've trying to figure out why this doesn't work;
Code:
<ul class="sign-in_block"> <li class="account-link-sign_in"> <button type="button" class="btn regular-button popup-button popup-login" data-without-close="1"> <script type="text/x-cart-data"> {"url_params":{"target":"login","widget":"\\XLite\\View\\Authorization","fromURL":""}} </script> <span>Sign in for price</span> </button>

What would be the Twig var be to use in the fromURL var?

Without this after login/registration the user is returned to the account page.
__________________
x-cart 5 multi vendor
mobile skin
Reply With Quote
  #2  
Old 03-01-2018, 12:50 AM
  qualiteam's Avatar 
qualiteam qualiteam is offline
 

X-Guru
  
Join Date: Dec 2010
Posts: 6,373
 

Default Re: How to return to the page sale URL after login/registration

I'm not sure where you see the code. Is it a custom template?

The code in the original template looks like this:
HTML Code:
<ul class="sign-in_block"> <li class="account-link-sign_in"> {{ widget('XLite\\View\\Button\\PopupLogin', label='Sign in / sign up') }} </li> </ul>

So, it's the \XLite\View\Button\PopupLogin widget that renders the button and adds all the necessary parameters.
If you need a custom button, you should implement a similar widget class that will render the button with your parameters.
__________________
Alex Solovev,
Qualiteam

---

User manual Video tutorials X-Cart FAQ

You are welcome to press "Thanks" button
if you find this post useful

Click here to learn how to apply patches

X-Cart Extensions
Reply With Quote
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 12:47 AM.

   

 
X-Cart forums © 2001-2020