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

delete subscriptions form from before footer

 
Reply
   X-Cart forums > X-Cart 5 > Dev Questions (X-Cart 5)
 
Thread Tools Search this Thread
  #1  
Old 04-16-2021, 05:52 AM
 
pablo pablo is offline
 

Member
  
Join Date: Aug 2005
Posts: 27
 

Default delete subscriptions form from before footer

Hi guys

Can anyone tell me please why this code doesn't do anything (5.4.1)?

I am simply trying to remove the big newsletter subscription box from above the footer.

I have a customskin created, and I am using main.php, which already has a function for moveTemplatesInLists with some add and delete functions that do work.

But this one doesn't do anything.

'modules/XC/NewsletterSubscriptions/form/subscribe.twig' => [

static::TO_DELETE => [

['layout.main.footer.before', \XLite\Model\ViewList::INTERFACE_CUSTOMER],

],

],
__________________
Version 5.3
Reply With Quote
  #2  
Old 04-19-2021, 12:10 AM
 
memoto memoto is offline
 

X-Cart team
  
Join Date: Feb 2018
Posts: 245
 

Default Re: delete subscriptions form from before footer

Simply find the needed template via Template editor and delete the responsible code. Otherwise - apply the "display: none;" style to this block.

To be honest, I'm not sure you are using the best way just to get rid of the specific section.
__________________
X-Cart Team
Reply With Quote

The following user thanks memoto for this useful post:
pablo (04-19-2021)
  #3  
Old 04-19-2021, 01:53 AM
 
pablo pablo is offline
 

Member
  
Join Date: Aug 2005
Posts: 27
 

Default Re: delete subscriptions form from before footer

My understanding was it was best to stop the code from running in the first place.

What I really want to do though is move the subscription from before the footer, to within the footer.

If I copy and paste the template in to the footer, it gives a fatal error.

I have even tried to have the equivalent "TO_ADD" code in my main.php file.
__________________
Version 5.3
Reply With Quote
  #4  
Old 04-20-2021, 11:44 PM
 
Ed B. Ed B. is offline
 

eXpert
  
Join Date: Apr 2016
Posts: 397
 

Default Re: delete subscriptions form from before footer

Since you want to move the place of the template, you can override the viewer class
The code responsible of outputting the template where it is, is
Code:
/** * SubscribeBlock * * TODO: Make placeholder for subscribed user/profile * * @ListChild (list="layout.main.footer", weight="50") */
in

classes/XLite/Module/XC/NewsletterSubscriptions/View/SubscribeBlock.php


Now, I am a bit confused on how to override. The code above precedes the line
Code:
class SubscribeBlock extends \XLite\View\AView
which would probably mean that you can't override by writing a class extending
classes/XLite/Module/XC/NewsletterSubscriptions/View/SubscribeBlock.php

If nothing else works, you can always edit by hand the line
Code:
* @ListChild (list="layout.main.footer", weight="50")
(and remember doing it each time you upgrade the newsletter subscription module).
__________________
X-cart 5.2.12, php 5.6
Ed from Grenoble, France
Reply With Quote
  #5  
Old 04-21-2021, 04:38 AM
  cflsystems's Avatar 
cflsystems cflsystems is offline
 

Veteran
  
Join Date: Apr 2007
Posts: 14,020
 

Default Re: delete subscriptions form from before footer

Since the list is defined in the class you have to use moveClassesInLists not moveTemplatesInLists
__________________
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 01:46 AM.

   

 
X-Cart forums © 2001-2020