Current time: 12-22-2024, 09:33 PM 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
ZooL Offline
Moderator
*****
Moderators

Posts: 3,429
Joined: Jan 2007
Reputation: 79
Post: #2
RE: ISPCP meets gSales
nice workly Wink
09-29-2010 11:07 PM
Visit this user's website Find all posts by this user Quote this message in a reply
fulltilt Offline
Member
***

Posts: 1,225
Joined: Apr 2007
Reputation: 5
Post: #3
RE: ISPCP meets gSales
now improved to handle customer numbers with gsales ...
- if customer number exist > no entry
- if new customer > new entry in gsales
10-05-2010 02:54 AM
Find all posts by this user Quote this message in a reply
rethus Offline
Junior Member
*

Posts: 202
Joined: May 2009
Reputation: 3
Post: #4
RE: ISPCP meets gSales
Whats with gsales2 ?
01-25-2011 07:49 PM
Find all posts by this user Quote this message in a reply
fulltilt Offline
Member
***

Posts: 1,225
Joined: Apr 2007
Reputation: 5
Post: #5
RE: ISPCP meets gSales
if the insert tables same as in script it should be work, if not you need to change the insert part

(01-25-2011 07:49 PM)rethus Wrote:  Whats with gsales2 ?
01-25-2011 08:11 PM
Find all posts by this user Quote this message in a reply
lucas1986 Offline


Posts: 1
Joined: Sep 2011
Reputation: 0
Post: #6
RE: ISPCP meets gSales
I often use asp.net

I am interested in c # language

lol...
09-14-2011 11:21 PM
Visit this user's website Find all posts by this user Quote this message in a reply
levanven1988 Offline


Posts: 2
Joined: Apr 2014
Reputation: 0
Post: #7
RE: ISPCP meets gSales
I often use php

I often use php
(This post was last modified: 04-05-2014 06:29 PM by levanven1988.)
04-05-2014 06:28 PM
Find all posts by this user Quote this message in a reply
m88asia910 Offline
Newbie
*

Posts: 5
Joined: Jun 2015
Reputation: 0
Post: #8
RE: ISPCP meets gSales
I also like your idea first, supporting offline
06-17-2015 01:34 PM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


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