Post by mupcku » Sun Aug 05, 2018 11:44 pm

Hi there! Im using opencart vesrion 2.1.0.1. There are several vqmod extensions installed and also some over ocmod. Now i want to create a module for ocmod and i want to place a code snippet EXACTLY BEFORE closing </body> tag. How is this possible?
I use this in xml

Code: Select all

<search>
				<![CDATA[
					</body></html>
				]]>
			</search>
but after loading the site and see the full code, there are codes from another modules existing before body tag. How can i achieve it?
Thank tou!

New member

Posts

Joined
Tue Jan 24, 2017 8:12 pm

Post by straightlight » Sun Aug 05, 2018 11:46 pm

You need set a before position after the specified line by adding your statement in the CDATA .

The most generated errors being found on Opencart forum originates from contributed programming. The increased counters are caused by posted redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

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

Post by mupcku » Mon Aug 06, 2018 1:06 am

straightlight wrote:
Sun Aug 05, 2018 11:46 pm
You need set a before position after the specified line by adding your statement in the CDATA .
Exactly there is the problem! There are two or three modules, which have the same statement, and there is conflict.

New member

Posts

Joined
Tue Jan 24, 2017 8:12 pm

Post by straightlight » Mon Aug 06, 2018 1:20 am

Welcome to the OC extensions world when new files are not involved.

The most generated errors being found on Opencart forum originates from contributed programming. The increased counters are caused by posted redundancies of the same solutions that were already provided prior.

F. Rules:

- viewtopic.php?f=176&t=200480
- viewtopic.php?f=176&t=200804


Regards,
Straightlight


Legendary Member

Posts

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

Post by mupcku » Mon Aug 06, 2018 3:06 am

Very encouraging...

New member

Posts

Joined
Tue Jan 24, 2017 8:12 pm

Post by cyclops12 » Mon Aug 06, 2018 3:25 am

Could you use another line of code to search for and use an offset in the CDATA
https://code.tutsplus.com/tutorials/alt ... -cms-22330

Active Member

Posts

Joined
Sun Sep 27, 2015 1:10 am
Who is online

Users browsing this forum: No registered users and 40 guests