Author Topic: updating plugin xml file  (Read 134 times)

welrachid

  • Jr. Member
  • **
  • Posts: 185
  • 3rd party plugin developer
  • Skype Name: wel.rachid
  • VirtueMart Version: Always LATEST stable
updating plugin xml file
« on: December 06, 2017, 11:22:55 am »
Hi guys
im trying to do a transition from one template to another, and during my "upgrade" i'll need to change some of the plugins.
Therefore i have made the vm plugins into zip's (the same way that i did when i installed them).
But im not sure how the xml file should look, because i keep getting an folder exists error.

Current xml code is:
Code: [Select]
<?xml version="1.0" encoding="UTF-8" ?>
<extension  version="3.2" type="plugin" group="vmcustom" >
    <name>VM - nemprint</name>
    <creationDate>January 2013</creationDate>
    <author>Jesper Skelgaard</author>
    <authorUrl>http://skelgaard.com</authorUrl>
    <copyright>Copyright (C) 2013 Jesper Skelgaard. All rights reserved</copyright>
    <version>0.2</version>
    <description>Calculator for VM</description>
    <languages>
        <language tag="da-DK">da-DK.plg_vmcustom_nemprint.ini</language>
        <language tag="en-GB">en-GB.plg_vmcustom_nemprint.ini</language>
    </languages>
    <files>
        <filename plugin="nemprint">nemprint.php</filename>
        <folder>nemprint</folder>
    </files>
    <vmconfig>
    </vmconfig>
   <config>
</config>
</extension>
Hope you guys can help
Thanks.
Best regards,
Wel

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2404
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 &amp; 3.0.x.y
Re: updating plugin xml file
« Reply #1 on: December 06, 2017, 12:23:00 pm »
 <extension  version="3.2" type="plugin" group="vmcustom" >
to
 <extension  version="3.2" type="plugin" group="vmcustom" method="upgrade">
Should solve the error if you try to update an existing extention

welrachid

  • Jr. Member
  • **
  • Posts: 185
  • 3rd party plugin developer
  • Skype Name: wel.rachid
  • VirtueMart Version: Always LATEST stable
Re: updating plugin xml file
« Reply #2 on: December 06, 2017, 12:58:31 pm »
Thanks worked perfect.
will i have do anything in case i will need to "install" it on a fresh installation? or do i have to make a section for upgrade and a section for install?
Best regards,
Wel

Studio 42

  • Contributing Developer
  • Full Member
  • *
  • Posts: 2404
  • Joomla & Virtuemart addon developper
    • Studio 42 - Virtuemart & Joomla extentions
  • VirtueMart Version: 2.6 &amp; 3.0.x.y
Re: updating plugin xml file
« Reply #3 on: December 06, 2017, 13:16:16 pm »
You dont need to do 2 section only one is accepted.
If you have two different content then you have to do 2 package, but  method="upgrade" is accepted for an install too, not only for update.

welrachid

  • Jr. Member
  • **
  • Posts: 185
  • 3rd party plugin developer
  • Skype Name: wel.rachid
  • VirtueMart Version: Always LATEST stable
Re: updating plugin xml file
« Reply #4 on: December 08, 2017, 11:05:19 am »
Ok thx!
Best regards,
Wel