Post by mRC » Sat Dec 13, 2014 6:07 pm

Hi all

I have a question and maybe silly and I have searched but nothing found, I have just started writing my own xml files but I need to know is it one file per mod ( per search ) or can you use multiple mods in one xml file.

Thanks in advance.

mRC
Active Member

Posts

Joined
Wed Nov 12, 2014 12:43 am

Post by tjsystems » Sat Dec 13, 2014 6:35 pm


Live with 2.2.0.0 fully SSL.


Active Member

Posts

Joined
Sun Aug 26, 2012 5:39 pm
Location - NL, Amsterdam

Post by villagedefrance » Sat Dec 13, 2014 6:40 pm

Although I'm not an expert with vQmod XML file creation (I usually hardcode everything), I think you can have multiple "search" in one single XML modification file.

In the same XMl file you can have modifications for "controller", "language", "model", "template" files, and as many as you want.

OpenCart custom solutions @ https://villagedefrance.net


User avatar
Active Member

Posts

Joined
Wed Oct 13, 2010 10:35 pm
Location - UK

Post by mRC » Sat Dec 13, 2014 10:16 pm

ok thanks for the reply well at the moment I have 5 xml files and it seems to be working good, I will have a go at doing just the one xml file but do you know how there are separated for each modification for example below I know its the same code twice but is this the way of doing multiple mods in the same file.

Code: Select all

<modification>
	<id>Facebook og:image fix - Tags</id>
	<version>1.0</version>
	<vqmver>1.0.8</vqmver>
	<author>www.bewebdesign.be</author>

	<file name="catalog/view/theme/*/template/common/header.tpl">
		<operation>
			<search position="after"><![CDATA[</title>]]></search>
			<add><![CDATA[
<?php if ($og_title) { ?>
<meta property="og:title" content="<?php echo $og_title; ?>" />
<?php } ?>
<?php if ($og_descr) { ?>
<meta property="og:description" content="<?php echo $og_descr; ?>" />
<?php } ?>
<?php if ($og_image) { ?>
<meta property="og:image" content="<?php echo $og_image; ?>" />
<?php } ?>
    ]]></add>
       </operation>

	<operation>
			<search position="after"><![CDATA[</title>]]></search>
			<add><![CDATA[
<?php if ($og_title) { ?>
<meta property="og:title" content="<?php echo $og_title; ?>" />
<?php } ?>
<?php if ($og_descr) { ?>
<meta property="og:description" content="<?php echo $og_descr; ?>" />
<?php } ?>
<?php if ($og_image) { ?>
<meta property="og:image" content="<?php echo $og_image; ?>" />
<?php } ?>
    ]]></add>
       </operation>
    </file>
</modification>

mRC
Active Member

Posts

Joined
Wed Nov 12, 2014 12:43 am
Who is online

Users browsing this forum: Google [Bot] and 46 guests