VirtueMart Forum

VirtueMart Dev/Coding Central: VM1 (old version) => Development Projects, Modifications, Hacks & Tweaks. VM1.1 => Payment Modules => Topic started by: soulpad on December 11, 2007, 22:40:13 PM

Title: new ps_DB?
Post by: soulpad on December 11, 2007, 22:40:13 PM
Hi,

I've been looking into developing a new payment module and am having difficulty using the ps_DB class.

So I've taken to modifying another paypal related payment module, and I've attempted to create a new SQL query on the orderid. But I've hit a snag...

It appears I should code along the lines of...

$table=new ps_DB();
$qs="SELECT blah";
$table->query($qs);

But - how can I instantiate a new ps_DB without getting Fatal error: Cannot instantiate non-existent class: ps_db ?

I've checked around and virtuemart uses this class all over the place, so why do I get this error? I've tried declaring ps_database.php but to no avail. When I include ps_database.php I get a different error Fatal error: Class ps_db: Cannot inherit from undefined class database

I have checked through the developer manual - Anyone with any knowledge of this out there?

BTW - Sorry for the duplication but I made a very similar post elsewhere, just thought that this was probably a better forum for this question.
Title: Re: new ps_DB?
Post by: Kurosaki on December 20, 2007, 02:55:36 AM
where (in which file) do you add the line of new ps_DB() ?
Title: Re: new ps_DB?
Post by: gregdev on December 29, 2007, 17:26:13 PM
Yes, where are you doing this? Also, which versions of VirtueMart and Joomla?

Greg
Title: Re: new ps_DB?
Post by: soulpad on December 30, 2007, 00:52:40 AM
Thanks for the responses, I think the errors were probably mine as I recently had a lot of trouble with my webhosts incorrectly setting up aliases. Not an easy one to trace I can tell you!