VirtueMart Forum

VirtueMart 2 + 3 + 4 => Plugins: Payment, Shipment and others => Topic started by: Emma Iana on November 30, 2023, 22:49:47 PM

Title: configuration is not saving, how debug
Post by: Emma Iana on November 30, 2023, 22:49:47 PM
Hi,

I have a dedicated plugin for shipment that I have been using since the VM3 version. I am currently using the VM4 version.

Now I realized that when I trying to save its configuration, the data was deleted.

I mean the data saved in virtuemart_shipmentmethods -> shipment_params. Every time I save, only the entry display_color=""| appears there.

How can I start looking for the cause?

When I put the relevant data in the database manually, everything works. The problem is with saving.
Regards
Title: Re: configuration is not saving, how debug
Post by: GJC Web Design on December 02, 2023, 12:06:11 PM
check your functions are all camel case

e.g. plgVmOnSelectCheckShipment

also check this function is there

/*  GJC this is missing in many plugins and will prevent params saving */
   function plgVmSetOnTablePluginShipment(&$data,&$table){
$name = $data['shipment_element'];
$id = $data['shipment_jplugin_id'];

if (!empty($this->_psType) and !$this->selectedThis ($this->_psType, $name, $id)) {
return FALSE;
} else {
return $this->setOnTablePluginParams ($name, $id, $table);
}
}


Title: Re: configuration is not saving, how debug
Post by: Emma Iana on December 22, 2023, 13:04:55 PM
Thank you.
This was the solution.