Post by pla1829 » Sat Aug 26, 2017 2:57 am

Since there are constant updates to a theme I use, I made an attempt at a vQmod to do the changes for me automatically on an account.tpl file. However, the vQmod is not working. Any input would be much appreciated to get it working..

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<modification>
   <id>Journal Theme Account.tpl Changes</id>
   <version>1.0</version>
   <vqmver>2.X</vqmver>
   <author>Me</author>
   <file name="catalog/view/theme/journal2/template/account/account.tpl">
       <operation info=“Make changes to account.tpl“>
           <search position=“after”><![CDATA[ <li><a href="<?php echo $wishlist; ?>"><?php echo $text_wishlist; ?></a></li>
			]]>
			</search>
			<add>
			<![CDATA[ <li><a href="index.php?route=account/logout">Logout of My Account</a></li>
			]]>
			</add>
			<search position="replace" offset="X">
			<![CDATA[ <li><a href="<?php echo $return; ?>"><?php echo $text_return; ?></a></li>
			]]>
			</search>
			<add></add>
			<search position="replace" offset="X">
			<![CDATA[ <li><a href="<?php echo $recurring; ?>"><?php echo $text_recurring; ?></a></li>
			]]>
			</search>
			<add></add>
       </operation>
   </file>
</modification>

New member

Posts

Joined
Sat Nov 22, 2014 12:16 pm

Post by cyclops12 » Sat Aug 26, 2017 3:48 am

<search position="replace" offset="X">
well i would say you need to replace "X" with the number of lines you want to replace

Active Member
Online

Posts

Joined
Sun Sep 27, 2015 1:10 am

Post by pla1829 » Sat Aug 26, 2017 6:44 am

Thanks, I made a few other mistakes too.

Also, I used a vQmod XML generator by UKSB and it is working now. Here is the output.

Code: Select all

<modification>
	<id><![CDATA[Add and Remove Parts to Account Page]]></id>
	<version><![CDATA[1.0]]></version>
	<vqmver><![CDATA[2.x]]></vqmver>
	<author><![CDATA[Me]]></author>
	<file path="catalog/view/theme/journal2/template/account/" name="account.tpl">
		<operation info="add logout">
			<search position="after" offset="2"><![CDATA[<li><a href="<?php echo $wishlist; ?>"><?php echo $text_wishlist; ?></a></li>]]></search>
			<add><![CDATA[<li><a href="index.php?route=account/logout">Logout of My Account</a></li>]]></add>
		</operation>
		<operation info="remove return">
			<search position="replace"><![CDATA[<li><a href="<?php echo $return; ?>"><?php echo $text_return; ?></a></li>]]></search>
			<add><![CDATA[]]></add>
		</operation>
		<operation info="remove recurring payments">
			<search position="replace"><![CDATA[<li><a href="<?php echo $recurring; ?>"><?php echo $text_recurring; ?></a></li>]]></search>
			<add><![CDATA[]]></add>
		</operation>
	</file>
</modification>

New member

Posts

Joined
Sat Nov 22, 2014 12:16 pm
Who is online

Users browsing this forum: No registered users and 9 guests