Post by Joe1234 » Thu Apr 28, 2022 11:38 am

I tried searching but template and tpl was being rejected.

Can I OCMOD a tpl file? I have an extension that consists of tpl files and I'm trying to make OCMODs for them, but it wont take. I see the modified file in the modifications folder, and I've refreshed everything. I can't see any changes reflected. The original file is being picked up.

v3.0.4.0 php 8.1
I'm here for a reason, if your response is contact a/the developer, just don't reply.


Active Member

Posts

Joined
Sat Jan 01, 2022 5:47 am

Post by phpscript7 » Thu Apr 28, 2022 2:33 pm

This topic will help you more

viewtopic.php?t=163924
viewtopic.php?t=200201

New member

Posts

Joined
Wed Jan 04, 2017 3:55 pm

Post by thekrotek » Thu Apr 28, 2022 4:34 pm

You can modify any file except JS and CSS.

Professional OpenCart extensions, support and custom work.
Contact me via email or Skype by support@thekrotek.com


User avatar
Expert Member

Posts

Joined
Sun Jul 03, 2016 12:24 am


Post by phpscript7 » Thu Apr 28, 2022 5:02 pm

thekrotek wrote:
Thu Apr 28, 2022 4:34 pm
You can modify any file except JS and CSS.
Now that the issue has been resolved, please add: [SOLVED] at the beginning of the subject line on your first post.

New member

Posts

Joined
Wed Jan 04, 2017 3:55 pm

Post by kestas » Thu Apr 28, 2022 5:08 pm

thekrotek wrote:
Thu Apr 28, 2022 4:34 pm
You can modify any file except JS and CSS.
Not true. ;) You can modify JS files with OCMOD also. Only CSS can not. ;)
This is the old thread regarding that... viewtopic.php?f=202&t=215092&p=770907&h ... ds#p770907

Custom OpenCart modules and solutions. You can write PM with additional questions... Extensions you can find here


Active Member

Posts

Joined
Tue Oct 12, 2010 2:23 am

Post by JNeuhoff » Thu Apr 28, 2022 6:02 pm

First of all, OpenCart 3 uses the Twig template engine for its template files (*.twig files, not *.tpl files).

Then, use event handlers for core file modifications, and your own theme folder for modified template files.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Joe1234 » Fri Apr 29, 2022 7:31 pm

Is it a requirement that extensions be able to work with OCMOD? I've contacted the developer (paid extension) and he says this issue has nothing to do with him. This doesn't make sense to me because if every other OCMOD I've made is being picked up properly and these mods are not, it seems like a an output issue with the extension to me...I don't know, you tell me. Is it opencart that automatically looks in the modifications folder for updated file, or would there be hard coded lines in the extension that would disrupt that? Is this something the developer expected to correct?

v3.0.4.0 php 8.1
I'm here for a reason, if your response is contact a/the developer, just don't reply.


Active Member

Posts

Joined
Sat Jan 01, 2022 5:47 am

Post by straightlight » Fri Apr 29, 2022 8:12 pm

Joe1234 wrote:
Fri Apr 29, 2022 7:31 pm
Is it a requirement that extensions be able to work with OCMOD? I've contacted the developer (paid extension) and he says this issue has nothing to do with him. This doesn't make sense to me because if every other OCMOD I've made is being picked up properly and these mods are not, it seems like a an output issue with the extension to me...I don't know, you tell me. Is it opencart that automatically looks in the modifications folder for updated file, or would there be hard coded lines in the extension that would disrupt that? Is this something the developer expected to correct?
OCMod is not a requirement. It used to be an additional feature from the core until the Event Engine was built-in. As for paid extensions, however, if a developer says that the reported issue has nothing to do with him and you believe it doesn't make sense due to an installed extension, you can either use the contact us link at the bottom of the site and request to speak with the Accounts and Billing Team after filling the form to request a refund or by creating a new service request in the Commercial Support section of the forum for a developer to review this extension for you as a custom job.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by JNeuhoff » Fri Apr 29, 2022 9:52 pm

3rd party extension should hopefully all work with their modifications. However, since 3rd party extensions are not aware of each other, they may occasionbally clash with each other, especially when using OCmod-based modifications, as opposed to event handlers.

Either way, an extension author should be able to fix potential clashes or issues.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by Joe1234 » Fri Apr 29, 2022 11:43 pm

This has nothing to do with clashes. It simply isn't playing with OCMOD the way it should, and according to the developer it is supposed to. I even sent him the following to show him a simple test with no conflicts isn't working:

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<modification>
	<name>MY CUSTOM: Test</name>
	<code>MY_CUSTOM_Test</code>
	<version>1.0</version>
	<author>Just Me</author>

	<!-- Module -->
	<file path="catalog/view/theme/default/template/product/EXTENSION_NAME.tpl">
		<operation error="skip">
			<search><![CDATA[<?php echo $breadcrumb['text']; ?>]]></search>
			<add position="replace"><![CDATA[<?php echo $breadcrumb['text']; ?>testingExtension]]></add>
		</operation>
	</file>

	<file path="catalog/view/theme/default/template/product/product.twig">
		<operation error="skip">
			<search><![CDATA[{{ breadcrumb.text }}]]></search>
			<add position="replace"><![CDATA[{{ breadcrumb.text }}testing]]></add>
		</operation>
	</file>

</modification>
I'll just contact OC when I have a minute.

v3.0.4.0 php 8.1
I'm here for a reason, if your response is contact a/the developer, just don't reply.


Active Member

Posts

Joined
Sat Jan 01, 2022 5:47 am

Post by mikeinterserv » Sat Apr 30, 2022 12:08 am

There are no .tpl files in 3.0.3.8 what are you doing.
You have been told already.
NO OCMod is going to find ANYTHING with a tpl extension.
What is this extension you speak of

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by Joe1234 » Sat Apr 30, 2022 2:04 am

I don't know if I'm misunderstanding you or you're misunderstanding me.
mikeinterserv wrote:
Sat Apr 30, 2022 12:08 am
NO OCMod is going to find ANYTHING with a tpl extension.
1/ OCMOD is finding the template and modifying it with no issue, it just wont show on the front end. Do you mean that OCMOD wont find the modified file and show it?

2/ The developer directly said OCMOD will work on his extension and all the files within. And since this extension is working without template switcher extension, I figure he's made it in a way that works contrary to what you say....I don't know. He says I must be doing something wrong which also points to he expects it to work but something else is wrong with his code preventing it.

3/ I'm not quite ready to state the developer or extension since there is no way for you to see the files to see what's going on since it is not a free download. If I make no way with him or OC then I'll let it be known to see what can happen.

4/ I've looked at the first link, but I cant see how to implement that within this extension...still looking though.


I actually wouldn't even care if the extension wasn't so damn buggy causing me to overwrite my modifications every other day with the updates.

v3.0.4.0 php 8.1
I'm here for a reason, if your response is contact a/the developer, just don't reply.


Active Member

Posts

Joined
Sat Jan 01, 2022 5:47 am

Post by straightlight » Sat Apr 30, 2022 2:43 am

Joe1234 wrote:
Sat Apr 30, 2022 2:04 am
I don't know if I'm misunderstanding you or you're misunderstanding me.
mikeinterserv wrote:
Sat Apr 30, 2022 12:08 am
NO OCMod is going to find ANYTHING with a tpl extension.
1/ OCMOD is finding the template and modifying it with no issue, it just wont show on the front end. Do you mean that OCMOD wont find the modified file and show it?

2/ The developer directly said OCMOD will work on his extension and all the files within. And since this extension is working without template switcher extension, I figure he's made it in a way that works contrary to what you say....I don't know. He says I must be doing something wrong which also points to he expects it to work but something else is wrong with his code preventing it.

3/ I'm not quite ready to state the developer or extension since there is no way for you to see the files to see what's going on since it is not a free download. If I make no way with him or OC then I'll let it be known to see what can happen.

4/ I've looked at the first link, but I cant see how to implement that within this extension...still looking though.


I actually wouldn't even care if the extension wasn't so damn buggy causing me to overwrite my modifications every other day with the updates.
There are always first-time-to-read replies, that's for sure. It doesn't happen often but when it does ...

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by mikeinterserv » Sat Apr 30, 2022 3:00 am

3x uses twig - if you have an EXTENSION that has added the tpl then maybe its in a different location
Like the modification folder

Has your extension placed the files in the original folder OR only in the MODIFICATIONS folder.
Do you see the file here
catalog/view/theme/default/template/product/EXTENSION_NAME.tpl
or is it
system/storage/modification/catalog/view/theme/default/template/product/EXTENSION_NAME.tpl

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by Joe1234 » Sat Apr 30, 2022 5:42 am

After the modification the modified tpl is placed in the modifications folder only. But not that folder you have listed, my modification folder is in a directory outside of the public_html directory. And no extension I have was placed back in the original folder.

v3.0.4.0 php 8.1
I'm here for a reason, if your response is contact a/the developer, just don't reply.


Active Member

Posts

Joined
Sat Jan 01, 2022 5:47 am

Post by mikeinterserv » Sat Apr 30, 2022 7:14 am

Joe1234 wrote:
Sat Apr 30, 2022 5:42 am
After the modification the modified tpl is placed in the modifications folder only. But not that folder you have listed, my modification folder is in a directory outside of the public_html directory. And no extension I have was placed back in the original folder.
well where your mod folder is.
So you have no tpl file in
catalog/view/theme/default/template/product/
either before or after modification refresh ?

Active Member

Posts

Joined
Thu May 28, 2020 6:55 am
Location - Wales

Post by Joe1234 » Sat Apr 30, 2022 11:19 am

Yes the original file is in folder:
catalog/view/theme/default/template/product
before and after modification.

Modified file is in modification folder after modification.

v3.0.4.0 php 8.1
I'm here for a reason, if your response is contact a/the developer, just don't reply.


Active Member

Posts

Joined
Sat Jan 01, 2022 5:47 am
Who is online

Users browsing this forum: No registered users and 77 guests