Commit 9b069641 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer

Version 1.0: First version

parent 5cccb2a2
BASE=donation
PLUGINTYPE=vmcustom
VERSION=0.1
VERSION=1.0
PLUGINFILES=$(BASE).php $(BASE).script.php $(BASE).xml index.html
TRANSLATIONS=$(call wildcard,language/*/*.plg_$(PLUGINTYPE)_$(BASE).*ini)
INDEXFILES=language/index.html $(call wildcard,language/*/index.html)
TMPLFILES=$(call wildcard,$(BASE)/tmpl/*.php)
TMPLFILES=$(call wildcard,$(BASE)/tmpl/*.php) $(call wildcard,$(BASE)/tmpl/index.html) $(call wildcard,$(BASE)/index.html)
ASSETS=
ZIPFILE=plg_$(PLUGINTYPE)_$(BASE)_v$(VERSION).zip
......
......@@ -19,8 +19,8 @@ if (!class_exists('vmCustomPlugin')) require(JPATH_VM_PLUGINS . DS . 'vmcustompl
// if(!class_exists('VmTable'))require(JPATH_VM_ADMINISTRATOR.DS.'helpers'.DS.'vmtable.php');
if (JVM_VERSION === 2) {
if (!defined('VMDONATION_PLUGINPATH')) define('VMDONATION_PLUGINPATH', JPATH_SITE.DS.'plugins'.DS.'vmcustom'.DS.'set_price');
if (!defined('VMDONATION_PLUGINWEBROOT')) define('VMDONATION_PLUGINWEBROOT', 'plugins/vmcustom/set_price');
if (!defined('VMDONATION_PLUGINPATH')) define('VMDONATION_PLUGINPATH', JPATH_SITE.DS.'plugins'.DS.'vmcustom'.DS.'donation');
if (!defined('VMDONATION_PLUGINWEBROOT')) define('VMDONATION_PLUGINWEBROOT', 'plugins/vmcustom/donation');
} else {
if (!defined('VMDONATION_PLUGINPATH')) define('VMDONATION_PLUGINPATH', JPATH_SITE.DS.'plugins'.DS.'vmcustom');
if (!defined('VMDONATION_PLUGINWEBROOT')) define('VMDONATION_PLUGINWEBROOT', 'plugins/vmcustom');
......@@ -79,7 +79,8 @@ class plgVmCustomDonation extends vmCustomPlugin {
foreach($plgParam as $k => $item){
if(!empty($item['customprice']) && ($product->productCustom->virtuemart_customfield_id==$k)){
$html .='<span>'.JText::_($product->productCustom->custom_title).' '.$item['customprice'].'</span>';
$currency = CurrencyDisplay::getInstance ();
$html .='<span>'.JText::_($product->productCustom->custom_title).' '.$currency->priceDisplay($item['customprice']).'</span>';
}
}
return true;
......
<?php
defined('_JEXEC') or die('Restricted access');
class plgVmCustomDownloads_for_SaleInstallerScript
class plgVmCustomDonationInstallerScript
{
/**
* Constructor
......
<?xml version="1.0" encoding="UTF-8" ?>
<install version="1.5" type="plugin" group="vmcustom" method="upgrade">
<name>VMCUSTOM_SETPRICE</name>
<name>VMCUSTOM_DONATION</name>
<creationDate>2013-03-02</creationDate>
<author>Reinhold Kainhofer</author>
<authorUrl>http://www.kainhofer.com/</authorUrl>
<copyright>Copyright (C) 2013 Reinhold Kainhofer. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl.html GNU/GPL v3+</license>
<version>0.1.0</version>
<description>VMCUSTOM_SETPRICE_DESC</description>
<version>1.0.0</version>
<description>VMCUSTOM_DONATION_DESC</description>
<files>
<filename plugin="set_price">set_price.php</filename>
<filename>set_price.script.php</filename>
<filename plugin="donation">donation.php</filename>
<filename>donation.script.php</filename>
<folder>language</folder>
<folder>donation</folder>
<filename>index.html</filename>
</files>
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.plg_vmcustom_set_price.ini</language>
<language tag="en-GB">en-GB/en-GB.plg_vmcustom_set_price.sys.ini</language>
<language tag="en-GB">en-GB/en-GB.plg_vmcustom_donation.ini</language>
<language tag="en-GB">en-GB/en-GB.plg_vmcustom_donation.sys.ini</language>
<language tag="de-DE">de-DE/de-DE.plg_vmcustom_donation.ini</language>
<language tag="de-DE">de-DE/de-DE.plg_vmcustom_donation.sys.ini</language>
</languages>
<scriptfile>set_price.script.php</scriptfile>
<scriptfile>donation.script.php</scriptfile>
<params addpath="/administrator/components/com_virtuemart/elements">
<param type="vmjpluginwarning" />
</params>
......
......@@ -4,7 +4,7 @@
//vmdebug('$this',$viewData[0]);
//if ($field->custom_price_by_letter) $class='vmcustom-textinput';?>
<input class="<?php echo $class ?>" type="text" value="" name="customPlugin[<?php echo $viewData[0]->virtuemart_customfield_id ?>][<?php echo $this->_name?>][customprice]"><br />
<input class="<?php echo $class ?>" type="text" value="" size="4" name="customPlugin[<?php echo $viewData[0]->virtuemart_customfield_id ?>][<?php echo $this->_name?>][customprice]"><?php echo CurrencyDisplay::getInstance ()->getSymbol(); ?><br />
<?php
// preventing 2 x load javascript
static $textinputjs;
......
; Virtuemart! Project
; Copyright (C) 2011 Virtuemart Team. All rights reserved.
; License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL, see LICENSE.php
; Note : All ini files need to be saved as UTF-8 - No BOM
VMCUSTOM_DONATION="VM Spenden Plugin"
VMCUSTOM_DONATION_DESC="VirtueMart Benutzerfeld Erweiterung, die Benutzern einen Spendenbetrag zum Produktpreis hinzufügen oder den Preis des Produktes selbst festlegen lässt."
; Virtuemart! Project
; Copyright (C) 2011 Virtuemart Team. All rights reserved.
; License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL, see LICENSE.php
; Note : All ini files need to be saved as UTF-8 - No BOM
VMCUSTOM_DONATION="VM Spenden Plugin"
VMCUSTOM_DONATION_DESC="VirtueMart Benutzerfeld Erweiterung, die Benutzern einen Spendenbetrag zum Produktpreis hinzufügen oder den Preis des Produktes selbst festlegen lässt."
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment