VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: pabgn on August 31, 2012, 18:39:04 PM

Title: getCustomVariant() ERROR.
Post by: pabgn on August 31, 2012, 18:39:04 PM
Hello,
Since I updated VirtueMart to 2.0.10 my customPlugin based on "textinput" is not working anymore.
I've been looking through this forum to get it working but I just don't know what to do.
Currently, I'm showing this input in the website:

<input class="'.$class.'" type="text" id="rest" value="" size="'.$field->custom_size.'" name="customPlugin['.$field->virtuemart_custom_id.']['.$this->_name.'][comment]"><br />

It's the normal input to type some comments. Before, I could manage to read the input when the store tried to update its settings through the propierty: plgVmCalculateCustomVariant, which had this simple code:


public function plgVmCalculateCustomVariant($product, &$productCustomsPrice,$selected){

$customVariant = $this->getCustomVariant($product->customfields);  //This received the input
$productCustomsPrice->custom_price = $customVariant['comment'];
return true;
}



Now, the variable $customVariant is absolutely empty. I don't know what else I have to do to receive what is being sent in the input.

Any help would be greatly appreciated.

Best Regards.
Title: Re: getCustomVariant() is empty.
Post by: Milbo on September 02, 2012, 18:55:35 PM
I would say you have a template override running
Title: Re: getCustomVariant() ERROR.
Post by: pabgn on September 02, 2012, 18:57:13 PM
Yes, there's a templete, but it was working before I updated to 2.0.10.
Which file in the theme should I modify to get the parameters working?
Title: Re: getCustomVariant() ERROR.
Post by: Milbo on September 04, 2012, 00:49:38 AM
Kick your templater ;-)

or check the changes we did http://dev.virtuemart.net/attachments/download/476/com_virtuemart.2.0.10_layout_changes.zip