vm21_extension_upgrade
Dies ist eine alte Version des Dokuments!
Inhaltsverzeichnis
Updating VM 2.0 plugins / modules / extensions to VM 2.1:
- In the .xml file convert the <params> section to <config><fieldset><fields>
- Change all elements/ to fields/ (base class JFormField)
PROBLEMS:
- Custom fields: param changes in product are NOT saved
- fields are not properly displayed (param in xml are used)
- VirtueMartModelCustomfields::getproductCustomslist or VirtueMartModelCustomfields::getCustomEmbeddedProductCustomFields?? What's the change?
[Wed Jan 15 20:06:45.773199 2014] [:error] [pid 10439] [client 127.0.0.1:40856] PHP Warning: Missing argument 2 for plgVmCustomDownloads_for_Sale::plgVmDeclarePluginParamsCustom() in /home/reinhold/Software/plg_opentools_vm2_downloads_for_sale/downloads_for_sale.php on line 542, referer: http://joomla-test.local/vm21/vm-categories.html [Wed Jan 15 20:06:45.773265 2014] [:error] [pid 10439] [client 127.0.0.1:40856] PHP Warning: Missing argument 3 for plgVmCustomDownloads_for_Sale::plgVmDeclarePluginParamsCustom() in /home/reinhold/Software/plg_opentools_vm2_downloads_for_sale/downloads_for_sale.php on line 542, referer: http://joomla-test.local/vm21/vm-categories.html [Wed Jan 15 20:06:45.773333 2014] [:error] [pid 10439] [client 127.0.0.1:40856] PHP Warning: Missing argument 4 for plgVmCustomDownloads_for_Sale::plgVmDeclarePluginParamsCustom() in /home/reinhold/Software/plg_opentools_vm2_downloads_for_sale/downloads_for_sale.php on line 542, referer: http://joomla-test.local/vm21/vm-categories.html [Wed Jan 15 20:06:45.773384 2014] [:error] [pid 10439] [client 127.0.0.1:40856] PHP Notice: Undefined variable: id in /home/reinhold/Software/plg_opentools_vm2_downloads_for_sale/downloads_for_sale.php on line 543, referer: http://joomla-test.local/vm21/vm-categories.html [Wed Jan 15 20:06:45.773437 2014] [:error] [pid 10439] [client 127.0.0.1:40856] PHP Notice: Undefined variable: data in /home/reinhold/Software/plg_opentools_vm2_downloads_for_sale/downloads_for_sale.php on line 543, referer: http://joomla-test.local/vm21/vm-categories.html
CHANGE:
function plgVmDeclarePluginParamsCustom($psType,$name,$id, &$data){ return $this->declarePluginParams('custom', $name, $id, $data); } function plgVmSetOnTablePluginParamsCustom($name, $id, &$table){ return $this->setOnTablePluginParams($name, $id, $table); }
TO:
function plgVmDeclarePluginParamsCustom(&$data){ return $this->declarePluginParams('custom', $data); } function plgVmSetOnTablePluginParamsCustom($name, $id, &$table){ return $this->setOnTablePluginParams($name, $id, $table); }
[Wed Jan 15 20:06:58.884708 2014] [:error] [pid 9827] [client 127.0.0.1:40858] PHP Warning: Missing argument 3 for plgVmCustomDownloads_for_Sale::plgVmOnDisplayProductFE() in /home/reinhold/Software/plg_opentools_vm2_downloads_for_sale/downloads_for_sale.php on line 481, referer: http://joomla-test.local/vm21/virtuemart/download-detail.html [Wed Jan 15 20:06:58.884756 2014] [:error] [pid 9827] [client 127.0.0.1:40858] PHP Notice: Undefined variable: field in /home/reinhold/Software/plg_opentools_vm2_downloads_for_sale/downloads_for_sale.php on line 483, referer: http://joomla-test.local/vm21/virtuemart/download-detail.html [Wed Jan 15 20:06:58.884806 2014] [:error] [pid 9827] [client 127.0.0.1:40858] PHP Notice: Trying to get property of non-object in /home/reinhold/Software/plg_opentools_vm2_downloads_for_sale/downloads_for_sale.php on line 483, referer: http://joomla-test.local/vm21/virtuemart/download-detail.html
CHANGE:
function plgVmOnDisplayProductFE( $product, &$idx,&$field)''
TO (idx is practically never needed!):
function plgVmOnDisplayProductFE( $product, &$group)''
[Wed Jan 15 19:25:05.630164 2014] [:error] [pid 10555] [client 127.0.0.1:40134] PHP Notice: Undefined property: stdClass::$packaging in /home/reinhold/Software/plg_opentools_vm2_shipping_by_rules/rules_shipping_base.php on line 503, referer: http://joomla-test.local/vm21/virtuemart/vm-cart.html
???????
[Wed Jan 15 19:23:54.425075 2014] [:error] [pid 9835] [client 127.0.0.1:40101] PHP Fatal error: Call to undefined method VirtueMartModelCustomfields::getproductCustomslist() in /home/reinhold/Software/plg_opentools_vm2_buyer_assign_group/buyer_assign_group.php on line 257, referer: http://joomla-test.local/vm21/virtuemart/vm-cart.html
USE VirtueMartModelCustomfields::getCustomEmbeddedProductCustomFields INSTEAD???????
[Wed Jan 15 19:25:09.824297 2014] [:error] [pid 10555] [client 127.0.0.1:40134] PHP Notice: Undefined property: stdClass::$subscribe_buyers in /home/reinhold/Software/plg_opentools_vm2_acy_subscribe_buyer/acymailing_subscribe_buyer.php on line 262, referer: http://joomla-test.local/vm21/virtuemart/vm-cart.html
PROBLEM: VirtueMartModelCustomfields::getCustomEmbeddedProductCustomFields apparently does not load the custom field parameters (which aren't stored, in the DB, either…)
[Wed Jan 15 19:23:54.406963 2014] [:error] [pid 9835] [client 127.0.0.1:40101] PHP Notice: Undefined property: stdClass::$customfields in /home/reinhold/Homepages/joomla-test.local/vm21/administrator/components/com_virtuemart/models/customfields.php on line 678, referer: http://joomla-test.local/vm21/virtuemart/vm-cart.html [Wed Jan 15 19:23:54.407027 2014] [:error] [pid 9835] [client 127.0.0.1:40101] PHP Warning: Invalid argument supplied for foreach() in /home/reinhold/Homepages/joomla-test.local/vm21/administrator/components/com_virtuemart/models/customfields.php on line 678, referer: http://joomla-test.local/vm21/virtuemart/vm-cart.html
???????? VM BUG???
CHANGED TRIGGERS:
- signature: plgVmOnViewCart($product,$row,&$html) ⇒ plgVmOnViewCart(&$product, &$productCustom, &$html)
- signature: plgVmDisplayInOrderBE($item, $row, &$html) ⇒ plgVmDisplayInOrderBE(&$item, $productCustom, &$html)
- signature: plgVmDisplayInOrderFE($item, $row, &$html) ⇒ plgVmDisplayInOrderBE(&$item, $productCustom, &$html)
- signature: plgVmSetOnTablePluginParamsCustom($name, $id, &$table) ⇒ plgVmSetOnTablePluginParamsCustom($name, $id, &$table,$xParams)
- plgVmCalculateCustomVariant($product, &$productCustomsPrice, $selected) ⇒ plgVmPrepareCartProduct($product, &$productCustomsPrice,$selected,&$modificatorSum)
Various:
- plgVmOnProductEdit: parseCustomParams not needed any more?
- plgVmOnDisplayProductVariantFE seems to be changed to plgVmOnDisplayProductFE
- plgVmOnViewCart: Change foreach loop to
foreach($product->customProductData[$productCustom->virtuemart_custom_id][$productCustom->virtuemart_customfield_id] as $name => $value)
- plgVmDisplayInOrderBE: Need to assign $item→productCustom = $productCustom;
- plgVmDisplayInOrderFE: Need to assign $item→productCustom = $productCustom;
- New trigger? plgVmGetTablePluginParams
- plgVmCalculateCustomVariant: use $modificatorSum instead of $productCustomsPrice→custom_price to set the price modification
QUESTIONS:
- Why are the signatures of plgVmOnDisplayProductVariantFE and plgVmOnDisplayProductFE different?
My extensions and their update status;
CUSTOM Field plugins:
- acymailing_subscribe_buyer
- buyer_assign_group
- donation
- downloads_for_sale
SHOPPER plugins:
- ordernumber: WORKS
SHIPPING plugins:
- rules_shipping
- rules_shipping_advanced
BACKEND modules/plugins:
- mod_vmassign_groups
- auto_parent_categories
COMMUNITY BUILDER:
- cb.usergroupsfield
vm21_extension_upgrade.1390149996.txt.gz · Zuletzt geändert: 2014/01/19 16:46 (Externe Bearbeitung)