X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Modifying the design and features (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=56)
-   -   How to return to the page sale URL after login/registration (https://forum.x-cart.com/showthread.php?t=76040)

Kevin Brown 02-28-2018 10:33 AM

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.

qualiteam 03-01-2018 12:50 AM

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.


All times are GMT -8. The time now is 08:43 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.