VirtueMart Forum

VirtueMart 2 + 3 + 4 => General Questions => Topic started by: Ducksoul on December 31, 2011, 15:29:26 PM

Title: php error after adding a product with cart variant to cart
Post by: Ducksoul on December 31, 2011, 15:29:26 PM
Hi there,

I've got an error when I try to add a product with a cart variant (material) into cart. If I don't change the material there is no problem, but when I change the material of the product and then add it to the cart the following errors get displayed:


Warning: Missing argument 4 for plgVmCustomTextinput::plgVmOnViewCart() in /www/htdocs/w008c2cd/liquidextasy/plugins/vmcustom/textinput/textinput.php on line 120

Warning: Missing argument 4 for plgVmCustomStockable::plgVmOnViewCart() in /www/htdocs/w008c2cd/liquidextasy/plugins/vmcustom/stockable/stockable.php on line 345


I wanted to set the shop online today, but I think that's not going to happen :(

If you want to try out the error: http://beta.liquid-extasy.de/index.php/shop
Title: Re: php error after adding a product with cart variant to cart
Post by: Milbo on December 31, 2011, 15:44:47 PM
The stockable variant is old and does not fit to the core, expect an update in the first week of the new year.
Title: Re: php error after adding a product with cart variant to cart
Post by: Ducksoul on December 31, 2011, 16:45:18 PM
Thank's for the fast reply. How do I know when an update is available? Do I have to check svn or do you plan to release an offical update?
Title: Re: php error after adding a product with cart variant to cart
Post by: Milbo on December 31, 2011, 17:29:45 PM
There will be an official update
Title: Re: php error after adding a product with cart variant to cart
Post by: Ducksoul on January 12, 2012, 22:13:20 PM
Is there an current date on which users can expect an update that solves the problem?
Title: Re: php error after adding a product with cart variant to cart
Post by: tratcliffe on February 28, 2012, 10:54:09 AM
Hi,

using joomla 2.5 and the latest VM 2.02

I am getting :-

Warning: Parameter 3 to plgVmCustomTextinput::plgVmOnViewCart() expected to be a reference, value given in /home/gifts2me/public_html/dev/libraries/joomla/event/event.php on line 71

I have a custom text input for the text of a gift card.

http://dev.gifts2men.com.au/index.php/books/lifestyle/organic-vegetable-gardening-detail

cheers

Title: Re: php error after adding a product with cart variant to cart
Post by: Milbo on February 28, 2012, 16:48:53 PM
Please try this file, then we put it in the core.

[attachment cleanup by admin]
Title: Re: php error after adding a product with cart variant to cart
Post by: tratcliffe on February 29, 2012, 23:33:40 PM
Thanks mate, unfortunately, same problem.

I replaced plugins/vmcustom/textinput/textinput.php with the contents of that file.

I then went to the product http://dev.gifts2men.com.au/index.php/books/lifestyle/organic-vegetable-gardening-detail

and added the text and added to cart - the following error shows both in the cart module and the checkout page.

I don't get the stockable plugin error - I am not using that one.

Warning: Parameter 3 to plgVmCustomTextinput::plgVmOnViewCartModule() expected to be a reference, value given in /home/gifts2me/public_html/dev/libraries/joomla/event/event.php on line 72

Warning: Parameter 3 to plgVmCustomStockable::plgVmOnViewCartModule() expected to be a reference, value given in /home/gifts2me/public_html/dev/libraries/joomla/event/event.php on line 72
Title: Re: php error after adding a product with cart variant to cart
Post by: osp on March 01, 2012, 08:33:26 AM
Hi tratcliffe,

what's version of your VM?
can you post your administrator/components/com_virtuemart/models/customfields.php

Thx, Ondra
Title: Re: php error after adding a product with cart variant to cart
Post by: vigier on March 01, 2012, 21:27:13 PM
Hi, sorry to break in, but I also have problems with the textinput. I replaced textinput.php with your file, switched on debug modus and even before showing the productdetails it comes up with the following errors:
That's in this part:
   function plgVmDisplayInOrderBE($item, $row, &$html) {
      if (empty($item->productCustom->custom_element) or $item->productCustom->custom_element != $this->_name) return '';
      $this->plgVmOnViewCart($item,$row,&$html); //same render as cart
    }

   /**
    *
    * shopper order display FE
    */
   function plgVmDisplayInOrderFE($item, $row, &$html) {
      if (empty($item->productCustom->custom_element) or $item->productCustom->custom_element != $this->_name) return '';
      $this->plgVmOnViewCart($item,$row,&$html); //same render as cart   
}

It's about the 2 red colored lines. Maybe this'll help. By the way: running Joomla 2.5.1 and VM 2.0.2.
Title: Re: php error after adding a product with cart variant to cart
Post by: tratcliffe on March 01, 2012, 22:53:51 PM
Thanks Ondra - I had 2.02 stable but the custom fields model was from the previous version - I definitely got in a muddle with my version control.

The custom text field is now working with Milbo's updated textinput.php and with vm 2.02 with joomla 2.5

cheers and thanks again,

Trevor

btw Milbo, I have just finished coding and testing a payment plugin for Eway, if anyone can use it. Let me know and I will tidy it up and upload it.
Title: Re: php error after adding a product with cart variant to cart
Post by: vigier on March 01, 2012, 23:36:26 PM
If you place an order on your site and check the order in the admin section of virtuemart, do you see the text that you've typed as Gift card text?
Title: Re: php error after adding a product with cart variant to cart
Post by: osp on March 02, 2012, 14:18:35 PM
Quote from: vigier on March 01, 2012, 23:36:26 PM
If you place an order on your site and check the order in the admin section of virtuemart, do you see the text that you've typed as Gift card text?
Check also this post with patch... http://forum.virtuemart.net/index.php?topic=98786.0

Ondra
Title: Re: php error after adding a product with cart variant to cart
Post by: jross on March 05, 2012, 03:25:39 AM
Quote from: tratcliffe on March 01, 2012, 22:53:51 PM

btw Milbo, I have just finished coding and testing a payment plugin for Eway, if anyone can use it. Let me know and I will tidy it up and upload it.

Hi there, I'd be very happy to load and test the eWay plugin. Can you provide a link to download it please?

JR
Title: Re: php error after adding a product with cart variant to cart
Post by: concap on March 05, 2012, 23:34:16 PM
Where is it possible to get eway plugin?