Can anyone help me with simple ocmod file:
- I need to add a line of code into stylesheet.css.
My current ocmod looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<name><![CDATA[Elcop_mod]]></name>
<version><![CDATA[1.0.0]]></version>
<author><![CDATA[elcopdoo]]></author>
<link><![CDATA[http://www.xxx.com]]></link>
<file path="catalog\view\theme\default\stylesheet\stylesheet.css">
<operation>
<search offset="6"><![CDATA[
line-height: 20px;
]]></search>
<add position="after"><![CDATA[
background: linear-gradient(rgba(255,255,0,0.05), rgba(255,255,0,0.5), rgba(255,255,0,0));
]]></add>
</operation>
</file>
</modification>
I saved this file as install.xml but when try to upload error shows that file is not valid.
- I need to add a line of code into stylesheet.css.
My current ocmod looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<name><![CDATA[Elcop_mod]]></name>
<version><![CDATA[1.0.0]]></version>
<author><![CDATA[elcopdoo]]></author>
<link><![CDATA[http://www.xxx.com]]></link>
<file path="catalog\view\theme\default\stylesheet\stylesheet.css">
<operation>
<search offset="6"><![CDATA[
line-height: 20px;
]]></search>
<add position="after"><![CDATA[
background: linear-gradient(rgba(255,255,0,0.05), rgba(255,255,0,0.5), rgba(255,255,0,0));
]]></add>
</operation>
</file>
</modification>
I saved this file as install.xml but when try to upload error shows that file is not valid.
Ok, I successfully uploaded file by renaming it to elcop.ocmod.xml ,
but mod is not working:
Warning: DOMDocument::loadXML(): StartTag: invalid element name in Entity, line: 3 in admin/controller/extension/modification.php on line 123Warning: DOMDocument::loadXML(): Premature end of data in tag name line 3 in Entity, line: 3 in admin/controller/extension/modification.php on line 123Warning: DOMDocument::loadXML(): Premature end of data in tag modification line 2 in Entity, line: 3 in admin/controller/extension/modification.php on line 123Notice: Trying to get property of non-object in admin/controller/extension/modification.php on line 126
but mod is not working:
Warning: DOMDocument::loadXML(): StartTag: invalid element name in Entity, line: 3 in admin/controller/extension/modification.php on line 123Warning: DOMDocument::loadXML(): Premature end of data in tag name line 3 in Entity, line: 3 in admin/controller/extension/modification.php on line 123Warning: DOMDocument::loadXML(): Premature end of data in tag modification line 2 in Entity, line: 3 in admin/controller/extension/modification.php on line 123Notice: Trying to get property of non-object in admin/controller/extension/modification.php on line 126
This one works fine for OpenCart 2.0.0.1b:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<name><![CDATA[Elcop_mod]]></name>
<code><![CDATA[Elcop_mod]]></code>
<version><![CDATA[1.0.0]]></version>
<author><![CDATA[elcopdoo]]></author>
<link><![CDATA[http://www.xxx.com]]></link>
<file path="catalog/view/theme/default/stylesheet/stylesheet.css">
<operation>
<search offset="6"><![CDATA[
line-height: 20px;
]]></search>
<add position="after"><![CDATA[
background: linear-gradient(rgba(255,255,0,0.05), rgba(255,255,0,0.5), rgba(255,255,0,0));
]]></add>
</operation>
</file>
</modification>
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Warning: DOMDocument::loadXML(): Couldn't find end of Start Tag name line 3 in Entity, line: 3 in admin/controller/extension/modification.php on line 123Warning: DOMDocument::loadXML(): Premature end of data in tag modification line 2 in Entity, line: 3 in admin/controller/extension/modification.php on line 123Notice: Trying to get property of non-object in admin/controller/extension/modification.php on line 126
I have latest OC2 from github installed.
I have latest OC2 from github installed.
Your relevent error message is:
As you can see, the end of Start tag, namely </name>, is clearly there.
And it works absolutely fine on my system, which makes me think there is more likely to be a bug in PHP's DOM library you have installed.
Suggested remedies:
- try it on a Linux server with Apache, not Windows, to see whether you get the same error
- try it without the 1st line
Your PHP DOM library therefore complaints about this line:Couldn't find end of Start Tag name line 3 in Entity, line: 3 in admin/controller/extension/modification.php on line 123
Code: Select all
<name><![CDATA[Elcop_mod]]></name>
And it works absolutely fine on my system, which makes me think there is more likely to be a bug in PHP's DOM library you have installed.
Suggested remedies:
- try it on a Linux server with Apache, not Windows, to see whether you get the same error
- try it without the 1st line
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Ok, installed php-xml is 5.4.16-23 on COS7
I tried everything, even installing atomic PHP Panda with multiple php versions(5.4/5.5/5.6),
but now the the error is:
Warning: DOMDocument::loadXML(): StartTag: invalid element name in Entity, line: 3
I'm beginning to think this has to do with installed latest OC2.0.0.1b ...
Do You have any other suggestions?
Update:
with latest admin/controller/extension/modification.php
(https://github.com/opencart/opencart/co ... bc1fb9b2ad)
error is:
Warning: DOMDocument::loadXML(): Empty string supplied as input in admin/controller/extension/modification.php on line 123Notice: Trying to get property of non-object in admin/controller/extension/modification.php on line 134
in line 123 is:
$dom->loadXml($xml);
so, $xml is not properly initialized or what?
I tried everything, even installing atomic PHP Panda with multiple php versions(5.4/5.5/5.6),
but now the the error is:
Warning: DOMDocument::loadXML(): StartTag: invalid element name in Entity, line: 3
I'm beginning to think this has to do with installed latest OC2.0.0.1b ...
Do You have any other suggestions?
Update:
with latest admin/controller/extension/modification.php
(https://github.com/opencart/opencart/co ... bc1fb9b2ad)
error is:
Warning: DOMDocument::loadXML(): Empty string supplied as input in admin/controller/extension/modification.php on line 123Notice: Trying to get property of non-object in admin/controller/extension/modification.php on line 134
in line 123 is:
$dom->loadXml($xml);
so, $xml is not properly initialized or what?
You are the only one out of thousands of OpenCart 2.0.0.0 or 2.0.0.1b users or testers, and I am certainly not able to reproduce your error.
Have you tried the XML-file without the
?
Have you tried the XML-file without the
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Noticed you're using "offset" in the mod.
In ocmod for v2.0.0.0 this is working the same way as index for vqmod i.e as an array indices NOT as a line offset.
This is a current bone of contention between the vqmod devs & oc core devs and likely to be changed for the next OC version.
You're looking for the 6th instance of the search.
AND search attributes should be on the add tag not search. So it will fail anyway.
https://github.com/opencart/opencart/wi ... ion-System
In ocmod for v2.0.0.0 this is working the same way as index for vqmod i.e as an array indices NOT as a line offset.
This is a current bone of contention between the vqmod devs & oc core devs and likely to be changed for the next OC version.
You're looking for the 6th instance of the search.
AND search attributes should be on the add tag not search. So it will fail anyway.
https://github.com/opencart/opencart/wi ... ion-System
Yes, you are right. There will be changes done to the way OCmod works in the next OpenCart version, see the discussions on github or this forum thread.
Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig
Hi Jeff
Seen your input into these over the last couple of weeks. Yes, hopefully "offset" & "index" will revert back to what they should be. Offset is particularly useful in mod placement.
Would like to see better logging in the next version, the log tab output is a bit unintuitive atm, finding why something hasn't parsed is a laborious trial and error.
Hopefully error="log|skip" will be re-added to the operation or add tag.
Currently converting mods from 1.5.x to 2.0.x. Most things can be worked around atm, but some are a pain. Seems Daniel has got on board now with how crucial this is to the success of oc2 and not just an extra bit. Every opencart install I've been involved with has had multiple modifications, sometime 20+ and vqmod has been essential.
S
Seen your input into these over the last couple of weeks. Yes, hopefully "offset" & "index" will revert back to what they should be. Offset is particularly useful in mod placement.
Would like to see better logging in the next version, the log tab output is a bit unintuitive atm, finding why something hasn't parsed is a laborious trial and error.
Hopefully error="log|skip" will be re-added to the operation or add tag.
Currently converting mods from 1.5.x to 2.0.x. Most things can be worked around atm, but some are a pain. Seems Daniel has got on board now with how crucial this is to the success of oc2 and not just an extra bit. Every opencart install I've been involved with has had multiple modifications, sometime 20+ and vqmod has been essential.
S
After reinstalling latest OC2 from scratch,
error disappeared, so it was OC after all....
Unfortunately mod for CSS didn't work.
Also created pull request GitHub #2064 in the way...
I think We are very close to V2.0.0.1 to be released
error disappeared, so it was OC after all....
Unfortunately mod for CSS didn't work.
Also created pull request GitHub #2064 in the way...
I think We are very close to V2.0.0.1 to be released
uksitebuilder is correct
Limitations - Files not modified by OCMOD
a) index.php
b) Standalone
c) Javascript
d) CSS stylesheets
see site for reference: http://ocextensions.co.uk/ocmod/ocmod
Limitations - Files not modified by OCMOD
a) index.php
b) Standalone
c) Javascript
d) CSS stylesheets
see site for reference: http://ocextensions.co.uk/ocmod/ocmod
Hi.
You can use this extension
http://www.opencart.com/index.php?route ... n_id=26860
After installing above extension you will be to to change in .css, .js, .json etc files via OCMOD.
You can use this extension
http://www.opencart.com/index.php?route ... n_id=26860
After installing above extension you will be to to change in .css, .js, .json etc files via OCMOD.
Who is online
Users browsing this forum: No registered users and 131 guests