Post by jge » Tue Jul 05, 2016 4:05 pm

Hello,

Tha is a very basic question i know, but...

When I OCMOD some files, sometimes I would like to search a block of lines of code instead of just one line.

It seems that when i

Code: Select all

<search><![CDATA[
       Line#1
       Line#2
       ...
				]]>
</search>
It does not work, but with just one line it works just fine.

What am I missing ?

Thanks in advance !

Opéra Perles
Cultured pearl jewelry
https://www.operaperles.com


User avatar
jge
New member

Posts

Joined
Thu Jun 09, 2016 10:34 pm

Post by artcore » Tue Jul 05, 2016 4:09 pm

Check the documentation for 'offset'
https://github.com/opencart/opencart/wi ... ion-System

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by jge » Tue Jul 05, 2016 4:42 pm

artcore wrote:Check the documentation for 'offset'
https://github.com/opencart/opencart/wi ... ion-System
My understanding is that Offset allows to set the position where you add some code, relatively to the position of the line you <search>.

What I am looking to do is to <search> a few lines together, because sometimes with only one line there can be several results.

Opéra Perles
Cultured pearl jewelry
https://www.operaperles.com


User avatar
jge
New member

Posts

Joined
Thu Jun 09, 2016 10:34 pm

Post by AlexDW » Tue Jul 05, 2016 5:13 pm

That because OCMOD works only with ONE line in <search>

Useful Opencart extensions


User avatar
New member

Posts

Joined
Sun Jun 05, 2016 3:32 am

Post by artcore » Tue Jul 05, 2016 5:35 pm

Use 'index' to get the target when there are more results.
So index=2 takes the third result. And use offset to get the amount if lines you need changed.
And as Alex said, search fir a single line!

Attn: I no longer provide OpenCart extensions, nor future support - this includes forum posts.
Reason: OpenCart version 3+ ;D

Thanks!


User avatar
Active Member

Posts

Joined
Tue Jul 09, 2013 4:13 am
Location - The Netherlands

Post by jge » Tue Jul 05, 2016 7:44 pm

artcore wrote:Use 'index' to get the target when there are more results.
So index=2 takes the third result. And use offset to get the amount if lines you need changed.
And as Alex said, search fir a single line!
Ah ok, I thought there might have been a way around the single line limitation...

Thank you !

Opéra Perles
Cultured pearl jewelry
https://www.operaperles.com


User avatar
jge
New member

Posts

Joined
Thu Jun 09, 2016 10:34 pm
Who is online

Users browsing this forum: No registered users and 159 guests