Author Topic: Sending serial number by e-mail  (Read 51962 times)

Kümmerle

  • Beginner
  • *
  • Posts: 1
Re: Sending serial number by e-mail
« Reply #15 on: July 29, 2005, 02:47:21 am »
is ist possible to generate a serialnumber with a shell-script?

e.g.:
i sell software which you can download. you need a license-key to activate the software.
the licensekey have to include your maildomain and the number of licenses you bought.
to order the product, you have to enter your maildomain in an atribute-field.

can i take this fiel an give i to a shellscript. the scrip generate the key and write it to a file "license_OrderNoXY.txt".
the shop take this file and read the licensekey and email it to the customer.

if payment method is credid-card, the mail will be sent immediate. else the mail will be sent by order confimation.

is this possible?

greetz


esteve

  • Jr. Member
  • **
  • Posts: 65
Re: Sending serial number by e-mail
« Reply #16 on: July 29, 2005, 11:13:46 am »
Hi,

shortly: yes, it is possible.
:)

In details: add a custom attribute (maildomain) to your product (admin: product/product status/Custom Attribute List). So user has to enter this, when he wants to put it in the cart.
This parameter will arrive to function ps_product_serial.php::create_product_serial(), its name is $custom_attribute. You have to modify only that function. (to work with shell script)
For example:
Code: [Select]
function create_product_serial($product_code, $nusers, $duration, $custom_attribute){

 //run shell script
 $fname = "x.txt";
 $cmd = "yourprogram licence=" . $nusers . " maildomain=" . $custom_attribute . " out=" . $fname;
 system($cmd);

 //read its result
 $handle = @fopen($fname, "r");
 if (!$handle)
    return "no serial"; //error
 $cont = "";
 while (!feof($handle)) {
    $cont .= fread($handle, 500);
 }
 fclose($handle);

 return $cont;
}


Steve

John.Kain

  • Beginner
  • *
  • Posts: 11
Re: Sending serial number by e-mail
« Reply #17 on: July 30, 2005, 12:31:50 pm »
Hi esteve,

Sorry the code i posted didn't make any sense. What i am trying to do is when a customer buys the product with that serial number it should read as issued and should not re-issue since some of the products have different serial numbers in the same product range. And if a custormer buys two of the same products it should not show Qty 2 and same serial number since he is paying for two products.

So now what I was trying to do (may be i am wrong) is to use your existing database structure and add a field in the database table given by you in your contribution that turns from 0 to 1 after the serial is issued and the default being 0. I believe it can be done at checkout or once the payment is confirmed. but the problem is I tried changing the code a bit but it doesn't give me the desired result. Could you please tell me which files to change and where since I fiddled around and made a mess of the code given by you. Please help.

John

esteve

  • Jr. Member
  • **
  • Posts: 65
Re: Sending serial number by e-mail
« Reply #18 on: August 01, 2005, 10:22:26 am »
Hi John,

product serial is created when order is arrived (independent form payment). Serial(s) will be inserted into a table (mos_pshop_product_serials).
Successful payment can only set it visible for customer (in other words: if customer payed for it, then it will be sent to him, and showed on order details, etc, BUT it is already created).

If there is a serial in that table, that means someone wants to pay for it (we don't know when).
So if you want to log which serial was already created, then you have nothing to do.
If you would like to know which serial has been sent to customers = which order's state is "confirmed":
Code: [Select]
SELECT order_status, product_serial
FROM `mos_pshop_product_serials`,  `mos_pshop_orders`
where
mos_pshop_product_serials.order_id = mos_pshop_orders.order_id
and order_status = 'C'

If you want to store this information in serials table, too, then do this for example:
in function ps_order.php::mail_product_serial() (line 243)
Code: [Select]
       if ($mail->Send()) {
//thing are successfully sent
$p_serial->set_issued($d);
and add this function to ps_product_serial.php
Code: [Select]
function set_issued(&$d)
{
      $db = new ps_DB;
  $q = "UPDATE #__pshop_product_serials SET";
  $q .= " issued=1 WHERE order_id=" . $d['order_id'];
     $db->query( $q );
}

 
In my terminology licence means product serial's quantity. (1 serial can be used even by 100 users, if its qty is 100)
If you want so many serial number as its quantity, then use this code:

Code: [Select]
function create_product_serial($product_code, $nusers, $duration, $custom_attribute){
//here you can create product serial number

for ($i=0; $i<$nusers; $i++) {
$result .= "dummy_p_serial" . $product_code . "-p_end"; //place of your algorithm
if ($i != $nusers-1)
    $result .= ",";
}

return $result;
 }

Steve

jumbofudge

  • Beginner
  • *
  • Posts: 4
Re: Sending serial number by e-mail
« Reply #19 on: August 11, 2005, 20:33:13 pm »
Hi there,

I realize i am jumping in late on this discussion, but i have a similar situation as john. I have  say 10 pieces of software, each with a quantity of 10. Each individual piece of software in the quantity has it's own pre-made serial number that i would like to manually enter (not automatically generate). Is this possible?

any help is greatly appreciated, this is an awesome mod!

-jon

esteve

  • Jr. Member
  • **
  • Posts: 65
Re: Sending serial number by e-mail
« Reply #20 on: August 15, 2005, 12:57:18 pm »
Hi,
I'm not sure what you want, but what do you think about this?
(each software has fixed serial)

Code: [Select]
//in ps_product_serial.php
function create_product_serial($product_code, $nusers, $duration, $custom_attribute){

if ($product_code == 1)
 $result="serial-1";
else if ($product_code == 2)
 $result="serial-2";
//...
else if ($product_code == 10)
 $result="serial-10";

return $result;
}


Steve

chaosvg

  • Beginner
  • *
  • Posts: 36
Re: Sending serial number by e-mail
« Reply #21 on: September 09, 2005, 19:56:14 pm »
Hi,

now I had time to create a "Contribution Package", which contains product serial feature. It was merged to cvs version (today).

Details:
-it has an admin surface: global settings: on/off, when send serials, etc,
-each product may be "product serial" (at tab "Product Dimensions and Weight"), and some parameters to that
-main parameter is "robot email text", which will be sent to customer (it can be multilanguage with mambelfish)
-creating serials take place in ps_product_serial.php (function create_product_serial)
-serials are showed always for vendors, for customers only if it is allowed (default is "confirmed")

Good luck!
Steve



Thanx a lot for the code!

I have this problem, however: Serials are not sent by email at all. They do appear on the website with the order details. I use the robot email text generated by the example linkbutton. Where am I wrong ?

(update)

when changing order status back to pending/confirmed while testing this error came up:
Undefined variable: mosConfig_mailer .....httpdocs/administrator/components/com_phpshop/classes/ps_order.php on line 215
(update)
this error appears only when the status is set to confirmed. I don't get it.
I wonder if it has to do with the modified ps_order class or that it was the same with the original.
Anyway, before i installed the modified class, the order email notification showed status pending although they were confirmed.

this is growing over my head ...

(update)

after investigating some more it appears indeed to be 'your' function causing the error. The global $mosConfig_mailer was not defined. (wonder how this ever could have worked for you guys, but i'm not a php programmer)
Got rid of the error above, but i'm still not getting any serial email ....


Code: [Select]
/**************************************************************************
  * name: mail_product_serial
  * created by: ei
  * description: mails the product serial()s) to the customer
  **************************************************************************/
  function mail_product_serial ( &$d) {
    global $PHPSHOP_LANG, $mosConfig_live_site, [color=Red][b]$mosConfig_mailer[/b][/color]  ;

    if ($d["order_status"]==ENABLE_PRODUCT_SERIALS_STATUS) {

//we will need this class
  require_once( CLASSPATH. "ps_product_serial.php" );
  $p_serial = new ps_product_serial();

  $we_have_product_serial = $p_serial->create_serials($d);

      if ($we_have_product_serial) {

       $dbv = new ps_DB;
       $q = "SELECT * FROM #__pshop_vendor ";
       $q .= "WHERE vendor_id='1'";
       $dbv->query($q);
       $dbv->next_record();

       $db = new ps_DB;
       $q="SELECT first_name,last_name, email FROM #__users WHERE user_info_id = '".$d['user_info_id']."'";
       $db->query($q);
       $db->next_record();

       $message = _HI . $db->f("first_name") . " " . $db->f("last_name") . "\n\n";
       $message .= $d['product_serial_text']."\n";
       $message .= "\n\n____________________________________________________________\n";
       $message .= $PHPSHOP_LANG->_PHPSHOP_PRODUCT_SERIALS_SEND_MSG_1."\n";
       $message .= $dbv->f("vendor_name") . " \n" . $mosConfig_live_site."\n\n".$dbv->f("contact_email") . "\n";

       require_once( CLASSPATH . 'phpmailer/class.phpmailer.php');
       $mail = new mShop_PHPMailer();
       $mail->PluginDir = CLASSPATH ."phpmailer/";
       $mail->SetLanguage("en", CLASSPATH ."phpmailer/language/");
       $mail->From =  $dbv->f("contact_email");
       $mail->FromName = $dbv->f("vendor_name");
       $mail->AddReplyTo($dbv->f("contact_email"), $dbv->f("vendor_name"));

        /*
        TEST IF WE ARE RUNNING MAMBO 4.5 1.0.9
        */
        if( defined( '_RELEASE' ) )
          if( _RELEASE == '4.5' ) {
            $mosConfig_mailer = CFG_MAILER;
            $mosConfig_smtphost = CFG_SMTPHOST;
            $mosConfig_smtpauth = CFG_SMTPAUTH;
            $mosConfig_smtpuser = CFG_SMTPUSER;
            $mosConfig_smtppass = CFG_SMTPPASS;
          }

        $mail->Body = $message;
        $mail->Subject = $PHPSHOP_LANG->_PHPSHOP_PRODUCT_SERIALS_SEND_SUBJ;

       switch($mosConfig_mailer) {

          case "mail":
              $mail->IsMail();
              break;

          /*** tell the mailer objects to use SMTP ***/
          case "smtp":
              $mail->IsSMTP();
              $mail->Host = $mosConfig_smtphost;
              $mail->SMTPAuth = $mosConfig_smtpauth=='1' ? true : false;

              if ($mosConfig_smtpauth=='1') {
                  $mail->Username = $mosConfig_smtpuser;
                  $mail->Password = $mosConfig_smtppass;
              }
              break;

          case "sendmail":
              $mail->IsSendmail();
              break;

          default:
              $mail->IsMail();
              break;
       }
       $mail->AddAddress($db->f("email"));
       if ($mail->Send()) {

          $_REQUEST['mosmsg'] = $PHPSHOP_LANG->_PHPSHOP_PRODUCT_SERIALS_SEND_MSG. " ". $db->f("first_name") . " " . $db->f("last_name") . " ".$db->f("email");

       }else {

          $_REQUEST['mosmsg'] = $PHPSHOP_LANG->_PHPSHOP_PRODUCT_SERIALS_ERR_SEND." ". $db->f("first_name") . " " . $db->f("last_name") . " ".$db->f("email")." (". $mail->ErrorInfo.")";
       }
     }
}
return true;
  }




chaosvg

  • Beginner
  • *
  • Posts: 36
Re: Sending serial number by e-mail
« Reply #22 on: September 10, 2005, 04:05:06 am »
well, i updated the mail_product_serial function because for some reason it didn't work for me

more specifically:

Code: [Select]
$q="SELECT first_name,last_name, email FROM #__users WHERE user_info_id = '".$d['user_info_id']."'"; returns no results since $d['user_info_id']= ""

anyway, the modified code works for me ..

Code: [Select]
/**************************************************************************
  * name: mail_product_serial
  * created by: ei
  * description: mails the product serial()s) to the customer
  **************************************************************************/
  function mail_product_serial ( &$d) {
    //global $PHPSHOP_LANG, $mosConfig_live_site, $mosConfig_mailer ;
global $mosConfig_live_site, $mosConfig_absolute_path, $db,
           $PHPSHOP_LANG, $mosConfig_smtpauth, $mosConfig_mailer,
           $mosConfig_smtpuser, $mosConfig_smtppass, $mosConfig_smtphost;

    if ($d["order_status"]==ENABLE_PRODUCT_SERIALS_STATUS) {

//we will need this class
  require_once( CLASSPATH. "ps_product_serial.php" );
  $p_serial = new ps_product_serial();

  $we_have_product_serial = $p_serial->create_serials($d);

      if ($we_have_product_serial) {

       $dbv = new ps_DB;
       $q = "SELECT * FROM #__pshop_vendor ";
       $q .= "WHERE vendor_id='1'";
       $dbv->query($q);
       $dbv->next_record();

       //$db = new ps_DB;
       //$q="SELECT first_name,last_name, email FROM #__users WHERE user_info_id = '".$d['user_info_id']."'";
       //$db->query($q);
       //$db->next_record();
   
   // get user_id from phpshop_orders

$dbu = new ps_DB;
$q = "SELECT * FROM #__pshop_orders  WHERE";
$q .= " order_id = '" . $d["order_id"] . "'";
$dbu->query($q);
$dbu->next_record();
$userid = $dbu->f("user_id"); //checked, oke

//get user row from users

$db = new ps_DB;
$q = "SELECT * FROM #__users WHERE";
$q .= " id = '" . $userid . "'";
$db->query($q);
$db->next_record();
   

       $message = _HI . $db->f("first_name") . " " . $db->f("last_name") . "\n\n";
       $message .= $d['product_serial_text']."\n";
       $message .= "\n\n____________________________________________________________\n";
       $message .= $PHPSHOP_LANG->_PHPSHOP_PRODUCT_SERIALS_SEND_MSG_1."\n";
       $message .= $dbv->f("vendor_name") . " \n" . $mosConfig_live_site."\n\n".$dbv->f("contact_email") . "\n";

       require_once( CLASSPATH . 'phpmailer/class.phpmailer.php');
       $mail = new mShop_PHPMailer();
       $mail->PluginDir = CLASSPATH ."phpmailer/";
       $mail->SetLanguage("en", CLASSPATH ."phpmailer/language/");
       $mail->From =  $dbv->f("contact_email");
       $mail->FromName = $dbv->f("vendor_name");
       $mail->AddReplyTo($dbv->f("contact_email"), $dbv->f("vendor_name"));

        /*
        TEST IF WE ARE RUNNING MAMBO 4.5 1.0.9
        */
        if( defined( '_RELEASE' ) )
          if( _RELEASE == '4.5' ) {
            $mosConfig_mailer = CFG_MAILER;
            $mosConfig_smtphost = CFG_SMTPHOST;
            $mosConfig_smtpauth = CFG_SMTPAUTH;
            $mosConfig_smtpuser = CFG_SMTPUSER;
            $mosConfig_smtppass = CFG_SMTPPASS;
          }

        $mail->Body = $message;
        $mail->Subject = $PHPSHOP_LANG->_PHPSHOP_PRODUCT_SERIALS_SEND_SUBJ;

       switch( $mosConfig_mailer ) {

          case "mail":
              $mail->IsMail();
              break;

          /*** tell the mailer objects to use SMTP ***/
          case "smtp":
              $mail->IsSMTP();
              $mail->Host = $mosConfig_smtphost;
              $mail->SMTPAuth = $mosConfig_smtpauth=='1' ? true : false;

              if ($mosConfig_smtpauth=='1') {
                  $mail->Username = $mosConfig_smtpuser;
                  $mail->Password = $mosConfig_smtppass;
              }
              break;

          case "sendmail":
              $mail->IsSendmail();
              break;

          default:
              $mail->IsMail();
              break;
       }
       $mail->AddAddress($db->f("email"));
       if ($mail->Send()) {

          $_REQUEST['mosmsg'] = $PHPSHOP_LANG->_PHPSHOP_PRODUCT_SERIALS_SEND_MSG. " ". $db->f("first_name") . " " . $db->f("last_name") . " ".$db->f("email") ;

       }else {

          $_REQUEST['mosmsg'] = $PHPSHOP_LANG->_PHPSHOP_PRODUCT_SERIALS_ERR_SEND." ". $db->f("first_name") . " " . $db->f("last_name") . " ".$db->f("email")." (". $mail->ErrorInfo.")";
       }
     }
}
return true;
  }

esteve

  • Jr. Member
  • **
  • Posts: 65
Re: Sending serial number by e-mail
« Reply #23 on: September 12, 2005, 11:35:36 am »
Hi chaosvg,

thanks for feeedback and fixing. :)

I guess the reason of sql query had no result: table pshop_order_user_info was changed, and a new order cannot be inserted into it.

details from sql directory (UPDATE-SCRIPT_com_phpshop_1.2_stable-to-1.2_stable-pl3.sql)
Code: [Select]
# 23.08.2005
/** Extra fields */
ALTER TABLE mos_pshop_order_user_info ADD  `extra_field_1` varchar(255) default NULL;
ALTER TABLE mos_pshop_order_user_info ADD  `extra_field_2` varchar(255) default NULL;
ALTER TABLE mos_pshop_order_user_info ADD  `extra_field_3` varchar(255) default NULL;
ALTER TABLE mos_pshop_order_user_info ADD  `extra_field_4` char(1) default NULL;
ALTER TABLE mos_pshop_order_user_info ADD  `extra_field_5` char(1) default NULL;
On my mambo after updating this table it became ok.

Secondly, you have right: some globals were missing from the begining of the function.
I will create a new zip with the fix. (I hope today.)

Steve

esteve

  • Jr. Member
  • **
  • Posts: 65
Re: Sending serial number by e-mail
« Reply #24 on: September 12, 2005, 18:00:02 pm »
Hi John,

I've added the feature, what we were talking about.

Some remarks.
serials has 2 types:
1. for software: This type of product serial helps to activate a software, for example. Creation has usually an algorithm.
2. physical, to identify the product: This type is just to identify the product, it can be always seen by customer and it can be given manually. (Products/Other Product List/View Inventory)

It is based on cvs version (of phpshop), so there are changes not only from me. For example table mos_pshop_order_user_info has changed (by Soeren), so please update these tables (run UPDATE-SCRIPT_com_phpshop_1.2_stable-to-1.2_stable-pl3.sql).

I wonder your test results...

Steve

[attachment deleted by admin]

chaosvg

  • Beginner
  • *
  • Posts: 36
Re: Sending serial number by e-mail
« Reply #25 on: September 12, 2005, 18:09:49 pm »
Hi esteve

I'm glad to see you continue this mod.
Another thing I changed was to change the product code field type to text instead of int.
For software distribution, this field will probably used a lot to enter a product version id on which the serial will be based.

Thanx for the good work!

chaosvg

  • Beginner
  • *
  • Posts: 36
Re: Sending serial number by e-mail
« Reply #26 on: September 12, 2005, 22:15:28 pm »
Hi John,

I've added the feature, what we were talking about.

Some remarks.
serials has 2 types:
1. for software: This type of product serial helps to activate a software, for example. Creation has usually an algorithm.
2. physical, to identify the product: This type is just to identify the product, it can be always seen by customer and it can be given manually. (Products/Other Product List/View Inventory)

It is based on cvs version (of phpshop), so there are changes not only from me. For example table mos_pshop_order_user_info has changed (by Soeren), so please update these tables (run UPDATE-SCRIPT_com_phpshop_1.2_stable-to-1.2_stable-pl3.sql).

I wonder your test results...

Steve
SQL-query:

INSERT INTO `mos_pshop_function`
VALUES (

'2', 'ProductSerialUpdate', 'ps_product_serial', 'update', '', 'admin,storeadmin'
), (
'2', 'ProductSerialAdd', 'ps_product_serial', 'add', '', 'admin,storeadmin'
)
MySQL retourneerde: 

#1136 - Column count doesn't match value count at row 1


i'm running pl3

table looks like this:
#function_id#int(11)#Nee#auto_increment             
#module_id#int(11)#Ja#NULL               
#function_name#varchar(32)#Ja#NULL               
#function_class#varchar(32)#Ja#NULL               
#function_method#varchar(32)#Ja#NULL               
#function_description#text#Ja#NULL               
#function_perms#varchar(255)#Ja#NULL

so I changed to

CREATE TABLE `mos_pshop_product_serials` (
      `order_item_id` int(11) default NULL,
      `order_id` int(11) default NULL,
      `product_serial` varchar(128) default NULL,
      KEY `idx_order_id` (`order_id`)
        ) TYPE=MyISAM;


CREATE TABLE `mos_pshop_product_serial_attribute` (
      `id` int(11) default NULL,
      `product_code` int(11) default NULL,
      `duration` int(11) default 0,
      `robot_email` text default '',   
      KEY `idx_order_id` (`id`)
        ) TYPE=MyISAM;



#update (12.09.2005.)
ALTER TABLE `mos_pshop_product_serial_attribute` ADD  `type` varchar(1) default 'S';


ALTER TABLE `mos_pshop_product_serials` ADD  `product_id` int(11) default NULL;
ALTER TABLE `mos_pshop_product_serials` ADD  `issued` tinyint(1) default NULL;
ALTER TABLE `mos_pshop_product_serials` ADD  `id` int(11) NOT NULL PRIMARY KEY auto_increment;

INSERT INTO `mos_pshop_function` ( `function_id` , `module_id` , `function_name` , `function_class` , `function_method` , `function_description` , `function_perms` )
  VALUES
    ('2', 'ProductSerialUpdate', 'ps_product_serial', 'update', '', 'admin,storeadmin'),
    ('2', 'ProductSerialAdd', 'ps_product_serial', 'add', '', 'admin,storeadmin');

 

chaosvg

  • Beginner
  • *
  • Posts: 36
Re: Sending serial number by e-mail
« Reply #27 on: September 12, 2005, 22:52:10 pm »
hmmmmmmm

when shopping, the cart returns:
Cart

Fatal error: Call to undefined function: is_only_product_serial() in /home/httpd/vhosts/mcprep.net/httpdocs/administrator/components/com_phpshop/html/basket.php on line 126


the new ps_product_serial.php class has no function like that. Do I have to add this function from the previous class or shoud i call another function from basket.php ?

will try adding function first...

(update)

yep, that did the trick, not really sure if that't what was meant to be.
can you please update me on this

thx

chaosvg

  • Beginner
  • *
  • Posts: 36
Re: Sending serial number by e-mail
« Reply #28 on: September 12, 2005, 23:10:20 pm »
Hi chaosvg,

thanks for feeedback and fixing. :)

I guess the reason of sql query had no result: table pshop_order_user_info was changed, and a new order cannot be inserted into it.

details from sql directory (UPDATE-SCRIPT_com_phpshop_1.2_stable-to-1.2_stable-pl3.sql)
Code: [Select]
# 23.08.2005
/** Extra fields */
ALTER TABLE mos_pshop_order_user_info ADD  `extra_field_1` varchar(255) default NULL;
ALTER TABLE mos_pshop_order_user_info ADD  `extra_field_2` varchar(255) default NULL;
ALTER TABLE mos_pshop_order_user_info ADD  `extra_field_3` varchar(255) default NULL;
ALTER TABLE mos_pshop_order_user_info ADD  `extra_field_4` char(1) default NULL;
ALTER TABLE mos_pshop_order_user_info ADD  `extra_field_5` char(1) default NULL;
On my mambo after updating this table it became ok.

Secondly, you have right: some globals were missing from the begining of the function.
I will create a new zip with the fix. (I hope today.)

Steve

back to base. The new code is functionning, but there's db issues so the serial mail isn't sent out again.

i'm running v1.2 pl3 from the mambo ecommerce ed. The included UPDATE-SCRIPT_com_phpshop_1.2_stable-to-1.2_stable-pl3.sql script only shows:

Code: [Select]
#############################################
# SQL update script for upgrading
# from phpshop package 1.2 stable (-pl2) to 1.2 stable-pl3
#
#############################################

# 09.06.2005
INSERT INTO `mos_pshop_csv` VALUES
  ('', 'attributes', '', 24, 'N' ),  ('', 'attribute_values', '', 25, 'N' );


that's it !
when I save product (since i installed this hack), i get

Notice: Unknown column 'product_unit' in 'field list' in /home/httpd/vhosts/mcprep.net/httpdocs/includes/database.php on line 221

/home/httpd/vhosts/mcprep.net/httpdocs/administrator/components/com_phpshop/classes/ps_database.php:154
/home/httpd/vhosts/mcprep.net/httpdocs/administrator/components/com_phpshop/classes/ps_product.php:473
/home/httpd/vhosts/mcprep.net/httpdocs/components/com_phpshop/phpshop_parser.php(381) : eval()'d code:1
/home/httpd/vhosts/mcprep.net/httpdocs/components/com_phpshop/phpshop_parser.php:381
/home/httpd/vhosts/mcprep.net/httpdocs/administrator/components/com_phpshop/toolbar.phpshop.html.php:22
/home/httpd/vhosts/mcprep.net/httpdocs/administrator/components/com_phpshop/toolbar.phpshop.php:16
/home/httpd/vhosts/mcprep.net/httpdocs/administrator/modules/mod_toolbar.php:16
/home/httpd/vhosts/mcprep.net/httpdocs/administrator/includes/admin.php:117
/home/httpd/vhosts/mcprep.net/httpdocs/administrator/templates/mambo_admin_blue/index.php:72
/home/httpd/vhosts/mcprep.net/httpdocs/administrator/index2.php:102


the product is NOT saved, :'( ...
where's that cvs thing ....

will keep searching ...


(edit after finding out how the cvs thing works)

OK the sql update script you mention is from phpshop package 1.2 stable-pl3 to 1.2.1
ran it and i'm able to save products again.

But yet, no serials sent by email. That's because the user_info_id field in the order tables is empty. Are you sure this field is used in the current release?
I'm getting a bit version-soup-conflicts nervous.
Anyway, I stick to the workaround I did before

grtz

esteve

  • Jr. Member
  • **
  • Posts: 65
Re: Sending serial number by e-mail
« Reply #29 on: September 13, 2005, 10:42:30 am »
Hi chaosvg,

you are fast. :) Thanks for feedback!
Sorry for the mistakes: a create sql and function call was incorrect.
They are fixed.

CVS version has more changes (not by me), for example 2 new columns in table products, as you realised.

Feel free to use your workaround. :)
I guess that some colums are missing from table mos_pshop_order_user_info in your mambo.
You can check it easy: test the sql statement at the end of a shopping: in function ps_checkout::add() (line 879):
Code: [Select]
echo $q;If this sql can run without error => table contains data => mail can be sent. :)

Good luck!
Steve

[attachment deleted by admin]