X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Modules and themes (X-Cart 5) (https://forum.x-cart.com/forumdisplay.php?f=64)
-   -   modify sign-in URL (https://forum.x-cart.com/showthread.php?t=77780)

Dev_Bro 04-30-2020 03:45 AM

modify sign-in URL
 
Hi there,
please advise:

I can see a file: customer/authorization/parts/link.create.twig

and I want to replace it by my module with a custom .twig from my module files.

I am searching the classes folder with:
$: grep -rs "link.create.twig" *
but get no results. What am I doing wrong to start?
* I was thinking I would just redifine / extend the class that defines that twig :roll:

cflsystems 04-30-2020 05:26 AM

Re: modify sign-in URL
 
XC5 has multiple ways of calling a template.

1. Class calls it through getDefaultTemplate method - in this case decorate the class and replace the template path/name with your own.

2. Another template calls it directly with twig "include" - in this case you need to replace the parent template so you can change the call.

3. The template in question has @ListChild directive that tells it to show within whatever list - in this case use moveTemplatesInList method in your module Main.php class to delete the original template from the list and add your own

Dev_Bro 04-30-2020 05:46 AM

Re: modify sign-in URL
 
Hi Steve,
thanks for finding some time to reply in this hard times - how r the thing in your place with the current global pandemia?

In regards to your feedback OK:

>>2. Another template calls it directly with twig "include" - in this case you need to replace the parent template so you can change the call.


This means I would need to change a lot of templates to get to the template for signup ?

cflsystems 04-30-2020 06:00 AM

Re: modify sign-in URL
 
Quote:

Originally Posted by Dev_Bro
This means I would need to change a lot of templates to get to the template for signup ?





I have not checked how this template is called so not sure which one of the options you need to use.
It is one of them not all. Also you can use the webmaster mode to modify the template in question directly on the storefront instead of with a module. Although I personally do not like this approach. But it is the easiest and fastest.

Dev_Bro 04-30-2020 06:32 AM

Re: modify sign-in URL
 
Yes, I have already used that tweaker but it's not flexible to deliver ... Yes, I understand it's not all of them ;) but since it's not just 1 class extending, right?

cflsystems 04-30-2020 06:37 AM

Re: modify sign-in URL
 
I don't know what you have or doing so can't tell you what is/not. Just pointing out the ways to replace/add/remove templates


All times are GMT -8. The time now is 06:57 PM.

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