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

modify sign-in URL

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 04-30-2020, 03:45 AM
  Dev_Bro's Avatar 
Dev_Bro Dev_Bro is offline
 

Newbie
  
Join Date: Apr 2020
Posts: 5
 

Default 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
__________________
-=-
Reply With Quote
  #2  
Old 04-30-2020, 05:26 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #3  
Old 04-30-2020, 05:46 AM
  Dev_Bro's Avatar 
Dev_Bro Dev_Bro is offline
 

Newbie
  
Join Date: Apr 2020
Posts: 5
 

Default 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 ?
__________________
-=-
Reply With Quote
  #4  
Old 04-30-2020, 06:00 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default 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.
__________________
Steve Stoyanov
CFLSystems.com
Web Development
Reply With Quote
  #5  
Old 04-30-2020, 06:32 AM
  Dev_Bro's Avatar 
Dev_Bro Dev_Bro is offline
 

Newbie
  
Join Date: Apr 2020
Posts: 5
 

Default 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?
__________________
-=-
Reply With Quote
  #6  
Old 04-30-2020, 06:37 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,190
 

Default 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
__________________
Steve Stoyanov
CFLSystems.com
Web Development
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 04:06 AM.

   

 
X-Cart forums © 2001-2020