Keyword

*sigh* hacking the core

  • Gary A Mort
  • Gary A Mort's Avatar Topic Author
  • Offline
  • New Member
More
14 years 3 months ago #77892 by Gary A Mort
*sigh* hacking the core was created by Gary A Mort
Well...  I'm working on a situation where I have 2 subcategories that both come from a master category and multi-level inheritance was really neccessary[ie define fields on the master category and the children, and the children would inherit the master].For the most part, this isn't a problem because K2 doesn't care what data you put in the field, it stores it no matter what.However, loading the select boxes it does care about... so I ended up with the following core hack:Replace the extrafields function in both controller\item.php files [one on the frontend, one on the back]
That's it...it handles circular logic[3 categories , ABC where A is the parent to B, B is the parent to C, and C is the parent to A] - so once it goes around the cycle it gives up.It handles duplicate logic[3 Categories where you have Cart --> Order --> Saved Cart and 2 extra group fields,  one called ShoppingCart and one called Orders... Cart and saved Cart are both of Extra group Shopping cart.....   The code tracks which group sets it has loaded and won't load Cart ShoppingCart a second time]Enjoy.....

Please Log in or Create an account to join the conversation.

  • Gary A Mort
  • Gary A Mort's Avatar Topic Author
  • Offline
  • New Member
More
14 years 3 months ago #77893 by Gary A Mort
Replied by Gary A Mort on topic *sigh* hacking the core
As a follow up, if you use this hack make sure that you disable compact ordering to ensure you don't run into problems.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum