By Anatoliy Kulbabskyy on Friday, 21 October 2022
Posted in General Issues
Likes 0
Views 509
Votes 0
Hi Team, i making some templates overrides following this guide:
https://stackideas.com/docs/payplans/administrators/customization/template-override

The overrides not working in the child theme/html, but working as expected in the general template html folder.

I`m using YOOtheme Pro child theme:
template overrides path is: /templates/yootheme/html/com_payplans/checkout/default/*.*
child theme overrides path is: /templates/yootheme_flart/html/com_payplans/checkout/default/*.*

So i will continue a templates overrides development in the general template html folder, but if you can, please fix the issue with the child themes. Thank you
Cool, I've tested in locally and can able to retrieve this child theme name, we will include the fix in the next release version.
·
Friday, 11 November 2022 10:12
·
0 Likes
·
0 Votes
·
0 Comments
·
Do you mean that you would like to show different HTML content if the user views the default YOOtheme template and yootheme_flart child theme on the Payplans checkout page?

The reason why it doesn't work for this template override file /templates/yootheme_flart/html/com_payplans/checkout/default/*.* is because the system only detects which site template you set it as default instead of YOOtheme child theme.

Perhaps you can share with us what is the reason why you insist that putting the override file under the YOOtheme child theme directory folder?
·
Tuesday, 25 October 2022 12:54
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello Arlex, thank you for the reply, i will try to explain.
general YOOtheme template has a lot of overrides of Joomla templates such as com_users, com_articles etc. (Screenshot 3)

For example if i need an override a com_user, that is already overriden in the general template forlder, I can copy com_user to child theme/html folder. Because if i dont do that all my overrides will be rewriten with template update.

So i like to store all my overrides in the child theme, i did so with some components (Screenshot 4), but PayPlans dont work from that folder.

--------

This is not big problem for me, but if you can fix this it will be nice.
·
Tuesday, 25 October 2022 21:32
·
0 Likes
·
0 Votes
·
0 Comments
·
I see, I understand your concern now.

But currently I am not sure how to get this child theme value from the code, is it possible for you to consult with the YOOtheme template provider and see which code should we use to retrieve this child theme value from the YOOTheme template (screenshot: https://monosnap.com/file/kmrx0wczLYzt0sagcGz6iQBVXcxqJY ) so we can pass this child theme name to our Payplans template override to respect this child theme?
·
Wednesday, 26 October 2022 15:17
·
0 Likes
·
0 Votes
·
0 Comments
·
ok thank you, i will ask that.
·
Wednesday, 26 October 2022 15:30
·
0 Likes
·
0 Votes
·
0 Comments
·
You're most welcome, keep us update then.
·
Wednesday, 26 October 2022 17:37
·
0 Likes
·
0 Votes
·
0 Comments
·
Hello i found the way how to access child theme name in YOOtheme Pro


// Get the Joomla Application
$app = JFactory::getApplication();

// Get the template params
$params = json_decode($app->getTemplate(true)->params['config']);
var_dump('yootheme_' . $params->child_theme);
·
Friday, 11 November 2022 01:40
·
0 Likes
·
0 Votes
·
0 Comments
·
Great! Thank You!
·
Friday, 11 November 2022 10:16
·
0 Likes
·
0 Votes
·
0 Comments
·
You are most welcome.

Just for your information, I have locked and marked this thread as resolved to avoid confusion in the future. Please start a new thread if you have any other issues in the future so it will be easier for us to manage your inquiries.

Thanks for understanding.
·
Friday, 11 November 2022 10:17
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post