Posted: October 31, 2016 at 7:55 am
|
Hi there, Please i need help overriding this file “EE_Mini_Cart_List_Line_Item_Display_Strategy.php” within the Multi Event Registration Add-on. Is this possible, and if so, please how can i override it? Include the file within wp-content or what? please help… |
Hi there, Currently its not possible to override core files by placing a copy within Can I ask what it is your looking to change? I’ll check in with our developers to see if its possible. |
|
|
Hi Tony, Thanks for your swift response. I’m looking at changing/removing some information that appear on the list |
Can you be more specific? What are you looking to edit within the ul?
Can you not just add the same style to the classes used by EE with some custom CSS? Completely overriding a display strategy seems excessive for the above. The other option I can think of is the build your own display strategy and use it within the mini cart template file (which is override-able within wp-content) but I will see if our developers can provide any feedback. (Will take a little due to time differences) |
|
|
I want completely change/update the style & structure of the mini_cart_widget using the “widget_minicart_list” as base. Below link is an example of how the widget will look like when im done: http://www.kizomba.ng/support/plugins_support/event_espresso/multi_event_reg/sample_final_outcome.png In order for me to archive this, I need to update the following files within the Multi Event Registration Plugin Folder: 1. widget_minicart_dropdown.template.php b. I will also modify the html tags of certain modules like the tax rows and adding custom css classes to it My general knowledge of Event Espresso (coding) is not that great, so is my wordpress skills but atleast I can try. Thanks. |
I checked into this and widget_minicart_dropdown.template.php isn’t a real file, maybe you meant widget_minicart_table.template.php? If so, you can copy that file to your WordPress theme, and use a filter hook to allow selecting your new template. Here’s the example code you add to a functions file:
Once your copied file is in your theme, and the above filter function is active, you’ll be able to go into the widget settings in Appearance > Widgets and change the Mini Cart Template dropdown to the one you just edited (it will show the filename you gave it). With the other file, there shouldn’t be any need to add CSS classes. Can you not target the elements using existing CSS classes or even target them without CSS classes? |
|
|
Hello Josh, Thank you for your support & snippet code above. Yes, you’re right, there’s no such file as widget_minicart_dropdown.template.php; I meant widget_minicart_list.template.php. My intention is to create widget_minicart_dropdown.template.php which I will do and add it using the code you sent in your reply.
I need to modify EE_Mini_Cart_List_Line_Item_Display_Strategy.php as I need to change its html structure. For example: there are elements that I will change from I also want to remove certiain element within as well like tax details, etc. Am thinking, is there a way I can override EE_Mini_Cart_List_Line_Item_Display_Strategy.php using filters just like widget_minicart_dropdown.template.php Thanks |
No you cannot override the Display Strategy file. My advise is you can use CSS to make the modifications. |
|
|
Hi Josh, Can i just create my own Display Strategy? Is yes, how do i go about it…can you give me a sample file and maybe a code on how to activate it within my theme? Thanks |
George that’s an awful lot of code to maintain just to add some CSS classes. A better way forward would be to add some filter hooks to allow for adding said CSS classes. Do you have a Github account? |
|
|
Hi Josh, No, i dont have a Github account yet. I will take your advise using filter hooks. Regards. |
The support post ‘Overriding Add-on files’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.