Page 1 of 1

New OCMOD i made : position="After" works like "Replace"

Posted: Wed May 13, 2015 5:30 pm
by abda11ah
Hi again,

I I'm trying to add a string after a part of PHP code by:

Code: Select all

<operation>
			<search regex="false"><![CDATA[date_modified = NOW() WHERE product_id = '" . (int)$product_id . "'");]]></search>
			<add position="After"><![CDATA[if (isset($data['image'])) {
                        $this->editImages($data['image'], $product_id);
                }/*]]></add>
        </operation>
But i obtain a replacement instead of a paste After :
date_modified = NOW() WHERE product_id =...
is replaced by
if (isset($data['image'])) {...
is it a bug or i missed something ?

Re: New OCMOD i made : position="After" works like "Replace"

Posted: Wed May 13, 2015 7:13 pm
by abda11ah
oops, just solved.

Before and After keywords had to be in lowercase