Page 1 of 1
OCmod file not in modifications list
Posted: Tue Feb 20, 2024 6:58 pm
by Frens
Hello
Make ocmod file test .xml file and empthy upload folder then make zip file test.ocmod.zip
Then upload the file with the extension uploader in admin.
Go to modifications and refresh , but my module is not showing in the modifications list.
Does anyone have an idea why mine isn't in the modifications list?
Re: OCmod file not in modifications list
Posted: Tue Feb 20, 2024 8:48 pm
by by mona
No OC version
There is no link field
Use the one I created on a previous post and you already tested works without missing out the link field
viewtopic.php?t=233125#p867203
Re: OCmod file not in modifications list
Posted: Tue Feb 20, 2024 9:24 pm
by Frens
Thanks
It is now in the modifications list .
Now i look in the source before the <body>
but nothing change there is no TEST before the <body>.
Code: Select all
<file path="catalog/view/theme/*/template/common/header.twig">
<operation>
<search><![CDATA[<body>]]></search>
<add position="before"><![CDATA[TEST]]></add>
</operation>
</file>
Use OC -3.0.3.8 and default theme
Re: OCmod file not in modifications list
Posted: Tue Feb 20, 2024 9:41 pm
by by mona
It will not be in the source it will be in the modified file (if you refreshed modification cache) and it has not already been edited.
and I have tested it and it shows in the front end as TEST at the top of the page.
Re: OCmod file not in modifications list
Posted: Tue Feb 20, 2024 11:19 pm
by Frens
and I have tested it and it shows in the front end as TEST at the top of the page.
Ok ,...at my site there is nothing to see about the TEST text ....try to find out why.
Re: OCmod file not in modifications list
Posted: Tue Feb 20, 2024 11:52 pm
by by mona
Did you refresh modification cache?
Did you check the modification log?
Did you check the modified file?
Did you refresh browser / server / any other cache you may have?
Have you edited the body tag already in another ocmod?
Did you edit the header.twig previously using the built in editor?
As you can see the TEST is written at the top left corner of every page using the ocmod attached.
Re: OCmod file not in modifications list
Posted: Wed Feb 21, 2024 12:49 am
by Frens
Did you refresh modification cache? ok
Did you check the modification log? ok
Did you check the modified file? ok
Did you refresh browser / server / any other cache you may have? ok
Have you edited the body tag already in another ocmod? ok
Did you edit the header.twig previously using the built in editor? it is orginal
But not working i see no test text at the front
Log:
FILE: catalog/view/theme/default/template/common/header.twig
CODE: <body>
LINE: 40
I made a new one for the footer.twig
Code: Select all
<file path="catalog/view/theme/*/template/common/footer.twig">
<operation>
<search><![CDATA[<footer>]]></search>
<add position="before"><![CDATA[TEST]]></add>
</operation>
</file>
And works fine.
Re: OCmod file not in modifications list
Posted: Wed Feb 21, 2024 1:08 am
by by mona
In the footer version you see the word TEST in the front end?
Re: OCmod file not in modifications list
Posted: Wed Feb 21, 2024 3:05 am
by Frens
Hi mona
Yes in the footer its ok.
Is can see the text.
The firtst with the body is not working
Re: OCmod file not in modifications list
Posted: Wed Feb 21, 2024 3:14 am
by by mona
Is the text appearing on the modified header.twig file ?
Re: OCmod file not in modifications list
Posted: Wed Feb 21, 2024 8:16 pm
by Frens
First i try to find out how it works/
First Upload a extension and it stored in the database > tabel modification.
The in admin modification refresh button ,a file will be added in :
storage/modification/catalog/view/theme/default/template/common/
So you mean the file in storage/modification/catalog/view/theme/default/template/common/ ?
about the question in you last post.
In the common there is a footer.twig with code
Code: Select all
TEST
<footer>
<div class="container">
and the TEST is showing on the frontpage , so its ok
--------------------------------
In the common there is also a header.twig with code and the text TEST is above the </header>
Code: Select all
</div>
</div>
TEST
</header>
{{ menu }}
But this text is not showing at the front
Code: Select all
In the source at the front there is code:
</div>
</div>
</div>
</div>
</header>
<div class="container">
So there is no text TEST above the </header>
Re: OCmod file not in modifications list
Posted: Wed Feb 21, 2024 10:10 pm
by by mona
There is no <body> in either of those so I must assume you have another modification.
Without a link to your site it is shooting in the dark all the time
Code: Select all
<file path="catalog/view/theme/*/template/common/header.twig">
<operation>
<search><![CDATA[</header>]]></search>
<add position="after"><![CDATA[<p>TEST</p>]]></add>
</operation>
</file>
Re: OCmod file not in modifications list
Posted: Wed Feb 21, 2024 10:33 pm
by Frens
I have make a new because in the header.twig there is no <body> tag with name testheader.ocmod
(
https://mysite.com is only for on forum)
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<name>Testheader</name>
<code>Testheader</code>
<version>1.0.0.0</version>
<author>Frens</author>
<link>https://mysite.com</link>
<file path="catalog/view/theme/*/template/common/header.twig">
<operation>
<search><![CDATA[</head>]]></search>
<add position="before"><![CDATA[TEST]]></add>
</operation>
</file>
</modification>
In the header.twig there is a </head>
modified 15.57u
Ok there is also a body tag
Re: OCmod file not in modifications list
Posted: Wed Feb 21, 2024 11:43 pm
by by mona
There is also an </header>
Re: OCmod file not in modifications list
Posted: Thu Feb 22, 2024 12:17 am
by Frens
Yes but this one search a </head>
Re: OCmod file not in modifications list
Posted: Thu Feb 22, 2024 12:35 am
by by mona
Re: OCmod file not in modifications list
Posted: Thu Feb 22, 2024 1:00 am
by Frens
sorry misunderstanding
Make it with </header>
The twig file in
storage/modification/catalog/view/theme/default/template/common/header.twig
contains:
Code: Select all
<div class="col-sm-3">{{ cart }}</div>
</div>
</div>
TEST
</header>
{{ menu }}
But in the front no TEST
Code: Select all
</div>
</div>
</header>
<div class="container">
See PM for link