View Single Post
  #6  
Old 07-30-2014, 08:21 AM
  totaltec's Avatar 
totaltec totaltec is offline
 

X-Guru
  
Join Date: Jan 2007
Location: Louisville, KY USA
Posts: 5,823
 

Default Re: Remove Template From Lists Question

Aha! I believe I have discovered why this code:
Code:
\XLite\Core\Layout::getInstance()->removeClassFromLists('\XLite\View\Product\Details\Customer\AttributesModify');
did not execute.

You do not need the beginning slash in front of the class you want to remove. So the correct code that does work:
Code:
\XLite\Core\Layout::getInstance()->removeClassFromLists('XLite\View\Product\AttributeValues');

Tony, you have helped me immensely. I now understand much more than I did before. Having you around to confirm what I am doing is great!

Let me know if you see any error in my final solution, or how it could be done better. I am simply decorating the \XLite\View\Product\Details\Customer\AttributesMod ify class, and adding the reference to my template directory, rather than removing the class. I just wanted to try the other method to see that it works.

My last question in this thread,(I think) is the correct terminology to refer to "removeClassFromLists". Is this called a function? Or a method? When do you refer to something as a method, and when as a function?
__________________
Mike White - Now Accepting new clients and projects! Work with the best, get a US based development team for just $125 an hour. Call 1-502-773-6454, email mike at babymonkeystudios.com, or skype b8bym0nkey

XcartGuru
X-cart Tutorials | X-cart 5 Tutorials

Check out the responsive template for X-cart.
Reply With Quote