Current time: 11-25-2024, 05:17 AM Hello There, Guest! (LoginRegister)


Post Reply 
ISPCP meets gSales
Author Message
fulltilt Offline
Member
***

Posts: 1,225
Joined: Apr 2007
Reputation: 5
Post: #1
ISPCP meets gSales
tested with g*Sales Version 1.4.3

direct sql connection without gsales interface ...
new customer will only be created if added new order in reseller panel Wink

Code:
nano /var/www/ispcp/gui/reseller/orders_add.php
insert at line 284
behind ";
Code:
// gsales begin
include '../include/gsales.php';
// gsales end
save file
Code:
nano /var/www/ispcp/gui/include/gsales.php
insert
Code:
// insert start
<?php
$server = "localhost";
$username = "gsales-db-user";
$password = "gsales-db-pass";
$database = "gsales-database";

mysql_connect($server, $username, $password) or die(mysql_error());
mysql_select_db($database) or die(mysql_error());

$name = $first_name." ".$last_name;
$ptext1 = "Bitte begleichen Sie diese Rechnung bis zum {faellig}";
$ptext2 = "Bei Paypal Zahlungen bitte an: payment@domain.tld";
$ptext3 = "Alle Waren und Leistungen bleiben bis zur vollstaendigen Bezahlung Eigentum der Firma";

if ($dmn_user_name == '') {
echo "not allowed";
}
else
{
$einlesen = mysql_query("SELECT COUNT(*) FROM kunde WHERE knr='$customer_id'");
$einzeln = mysql_fetch_row($einlesen);
if($einzeln[0]==1) {
echo "";
}
else
{
$check = mysql_query("SELECT knr FROM kunde ORDER BY knr DESC LIMIT 1");
$check1 = mysql_fetch_array($check);
$knr = $check1["knr"];
$knr_new = $knr +1;

mysql_query("INSERT INTO kunde
(knr, firma, name, anschrift, plz, ort, email, status, text1, text2, text3, telefon, fax, kommentar) VALUES('$knr_new', '$firm', '$name', '$street_one', '$zip', '$city', '$user_email', '1', '$ptext1', '$ptext2', '$ptext3', '$phone', '$fax', '$dmn_user_name' ) ")
or die(mysql_error());
}
}
?>
// insert end
edit $database details and $ptext1 - $ptext3
save
and:
Code:
chmod 0440 /var/www/ispcp/gui/include/gsales.php
chown vu2000.www-data /var/www/ispcp/gui/include/gsales.php
(This post was last modified: 10-05-2010 02:48 AM by fulltilt.)
09-29-2010 03:31 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
ISPCP meets gSales - fulltilt - 09-29-2010 03:31 PM
RE: ISPCP meets gSales - ZooL - 09-29-2010, 11:07 PM
RE: ISPCP meets gSales - fulltilt - 10-05-2010, 02:54 AM
RE: ISPCP meets gSales - rethus - 01-25-2011, 07:49 PM
RE: ISPCP meets gSales - fulltilt - 01-25-2011, 08:11 PM
RE: ISPCP meets gSales - lucas1986 - 09-14-2011, 11:21 PM
RE: ISPCP meets gSales - levanven1988 - 04-05-2014, 06:28 PM
RE: ISPCP meets gSales - m88asia910 - 06-17-2015, 01:34 PM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)