Post by Frens » Tue Feb 20, 2024 6:58 pm

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?

Use OC -3.0.3.8 and 4.0.1.1 & default theme


Active Member

Posts

Joined
Sat Apr 20, 2013 10:48 pm

Post by by mona » Tue Feb 20, 2024 8:48 pm

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

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by Frens » Tue Feb 20, 2024 9:24 pm

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

Use OC -3.0.3.8 and 4.0.1.1 & default theme


Active Member

Posts

Joined
Sat Apr 20, 2013 10:48 pm

Post by by mona » Tue Feb 20, 2024 9:41 pm

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.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by Frens » Tue Feb 20, 2024 11:19 pm

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.

Use OC -3.0.3.8 and 4.0.1.1 & default theme


Active Member

Posts

Joined
Sat Apr 20, 2013 10:48 pm

Post by by mona » Tue Feb 20, 2024 11:52 pm

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.

Attachments

Screen Shot 2024-02-20 at 15.46.42.png

Screen Shot 2024-02-20 at 15.46.42.png (236.74 KiB) Viewed 1911 times


DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by Frens » Wed Feb 21, 2024 12:49 am

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.

Use OC -3.0.3.8 and 4.0.1.1 & default theme


Active Member

Posts

Joined
Sat Apr 20, 2013 10:48 pm

Post by by mona » Wed Feb 21, 2024 1:08 am

In the footer version you see the word TEST in the front end?

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by Frens » Wed Feb 21, 2024 3:05 am

Hi mona

Yes in the footer its ok.
Is can see the text.

The firtst with the body is not working

Use OC -3.0.3.8 and 4.0.1.1 & default theme


Active Member

Posts

Joined
Sat Apr 20, 2013 10:48 pm

Post by by mona » Wed Feb 21, 2024 3:14 am

Is the text appearing on the modified header.twig file ?

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by Frens » Wed Feb 21, 2024 8:16 pm

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>

Use OC -3.0.3.8 and 4.0.1.1 & default theme


Active Member

Posts

Joined
Sat Apr 20, 2013 10:48 pm

Post by by mona » Wed Feb 21, 2024 10:10 pm

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>	

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by Frens » Wed Feb 21, 2024 10:33 pm

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

Use OC -3.0.3.8 and 4.0.1.1 & default theme


Active Member

Posts

Joined
Sat Apr 20, 2013 10:48 pm

Post by by mona » Wed Feb 21, 2024 11:43 pm

There is also an </header>

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by Frens » Thu Feb 22, 2024 12:17 am

Yes but this one search a </head>

Use OC -3.0.3.8 and 4.0.1.1 & default theme


Active Member

Posts

Joined
Sat Apr 20, 2013 10:48 pm

Post by by mona » Thu Feb 22, 2024 12:35 am

but I said to do it after </header> for a reason.
https://www.w3schools.com/tags/tag_head ... nformation.

DISCLAIMER:
You should not modify core files .. if you would like to donate a cup of coffee I will write it in a modification for you.


https://www.youtube.com/watch?v=zXIxDoCRc84


User avatar
Expert Member

Posts

Joined
Mon Jun 10, 2019 9:31 am

Post by Frens » Thu Feb 22, 2024 1:00 am

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

Use OC -3.0.3.8 and 4.0.1.1 & default theme


Active Member

Posts

Joined
Sat Apr 20, 2013 10:48 pm
Who is online

Users browsing this forum: No registered users and 14 guests