News:

Looking for documentation? Take a look on our wiki

Main Menu

[FIXED] Bug Report - Empty Product Price...

Started by RitchieTheBrit, February 17, 2008, 15:12:50 PM

Previous topic - Next topic

RitchieTheBrit

Description: An empty entry in the Product Price field causes the following error on the category view:

Warning: Cannot use a scalar value as an array in C:\wamp\www\dvine\administrator\components\com_virtuemart\classes\ps_product.php on line 1759

The category displays fine after this error.

VirtueMart Version: VirtueMart 1.1 revision 1263

Joomla/Mambo Version: Joomla! 1.0.14 RC1 Stable [ Daybreak ] 13 January 2008 22:00 UTC

Steps to replicate: It happens if I simply edit a shop item and remove both product price entries (gross and net).  Replacing the price clears the error.

Proposed fix(es):  Sorry, I'm not a good enough coder to go poking around!

Bugtracker task #: 1810

System info:  Windows XP Professional Service Pack 2 (Windows NT 5.1 build 2600), Apache v2.2.6 (Win32), PHP v5.2.5 and MySQL v5.0.45-community-nt.

[attachment cleanup by admin]


vangoga

Quick fix:
insert following:

              if(!is_array($price)) $price=array();

before line 1759 in ps_product.php
         $price["product_price"] = $base_price + $adjustment;

DH

I am meeting the same problem on
Joomla1.51
VM1.1.0  BETA3
I believe this is a VM bug,but I do not know where is the problem. Can "vangoga" or other kind people show me more details of how to quick fix.

Much thanks!
---------------------------------------
PHP v5.3.1          |  Apache v2.2.41
MySQL v5.1.41   |  XAMPP 1.7.3
phpMyAdmin v3.2.4
Windows 7 SP1 Professional
---------------------------------------

jenkinhill

This bug was fixed. Beta3 is quite old now - try installing the latest RC2 nightly - http://dev.virtuemart.net/cb/proj/doc.do?doc_id=1328
Kelvyn
Lowestoft, Suffolk, UK

Retired from forum life November 2023

Please mention your VirtueMart, Joomla and PHP versions when asking a question in this forum