Question

I'm trying to develop a new opencart module. I'm having some issues with the vqmoderator of Avant Osch. I really like it, but it seems the part for adding a new file is not working.

I want my xml file to generate this new file. I can always add this file and ask people to added directly, but will not have sense for the vqmod purpose.

by now, i discover the sintax is something like :

    <newfile name="admin/controller/module/name.php" chmod="0777" mime="text" exist="update">
    <add><![CDATA[]]></add>
</newfile>

Till here, I found out, but as I image it works, is that the code should contain the new file. So lets say we write down the php file inside.

    <newfile name="admin/controller/module/name.php" chmod="0777" mime="text" exist="update">
    <add><![CDATA[<?php  
// Heading
$_['heading_title']        = 'Módulo Cumpleaños';
// Error
$_['error_permission']     = 'Atencion: No tiene los permisos para modificar el Módulo Cumpleaños!';
$_['error_subject']        = 'Se requiere asusnto en el E-Mail!';
$_['error_message']        = 'Se requiere el mensaje del E-Mail!';
?>]]></add>
</newfile>

After doing so (several new files), first of all, i have permission problems, and second, the vqmoderator becomes crazy.

If someone has some usefull link I'll appreciate it.

Thanks in advance!

Was it helpful?

Solution

Vqmod stands for ‘Virtual Quick Mod‘, also known as ‘Virtual File modification System‘. It’s used to virtually alter any php or tpl file in OpenCart except the main index.php files. The changes are mentioned in xml files using search/add/replace tags and these files are parsed on page load. The original core files with the xml files’ code injected to it are then executed.

In your case, you need to create a new file. So there's no need to use vqmod and as far as I know vqmod cannot create new files.

To know more about vqmod check this link: Opencart: Vqmod tutorial

Have a nice day !!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top