How to import class ps_user and use function from other module or components?

Started by jvicious, December 26, 2014, 11:08:09 AM

Previous topic - Next topic

jvicious

How to import class ps_user and use function from other module or components?

I just modified module user registration on joomla virtuemart but cannot add to database  #_{vm}_user_info table and association table.

Thank you for your advice.
James


jenkinhill

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

jvicious

I use Joomla version 1.5 , but this version no longer support ?

Thank you for advice,

jenkinhill

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

GJC Web Design

to use a class in VM1.1 import the parser, import the class file and call the class

e.g.

// Load the virtuemart main parse code
if( file_exists(dirname(__FILE__).'/../../components/com_virtuemart/virtuemart_parser.php' )) {
   require_once( dirname(__FILE__).'/../../components/com_virtuemart/virtuemart_parser.php' );
} else {
   require_once( dirname(__FILE__).'/../components/com_virtuemart/virtuemart_parser.php' );
}

//then

require_once ( CLASSPATH. 'ps_user.php');

//then

$ps_user = new ps_user;

not tested but should work
GJC Web Design
VirtueMart and Joomla Developers - php developers [url="https://www.gjcwebdesign.com"]https://www.gjcwebdesign.com[/url]
VM3 AusPost Shipping Plugin - e-go Shipping Plugin - VM3 Postcode Shipping Plugin - Radius Shipping Plugin - VM3 NZ Post Shipping Plugin - AusPost Estimator
Samport Payment Plugin - EcomMerchant Payment Plugin - ccBill payment Plugin
VM2 Product Lock Extension - VM2 Preconfig Adresses Extension - TaxCloud USA Taxes Plugin - Virtuemart  Product Review Component
[url="https://extensions.joomla.org/profile/profile/details/67210"]https://extensions.joomla.org/profile/profile/details/67210[/url]
Contact for any VirtueMart or Joomla development & customisation