Leo Clark Posted June 19, 2006 Share Posted June 19, 2006 hi there, i am getting this warning Warning: sprintf(): Too few arguments in /home/creativebrazil/www/includes/content/gateway.inc.php on line 253 everytime i hit on continue to select the paypal payment. below is the code: ################################################################################ ## ## Admin E-Mail Fix by Sir William -- http://www.swscripts.com/ // notify shop owner of new order if($basket['mailSent']==0){ // send only if not sent already for current order number include("classes/htmlMimeMail.php"); $mail = new htmlMimeMail(); if($basket['shipCost']>0){ $emailShipCost = $basket['shipCost']; } else { $emailShipCost = "0.00"; } $text = sprintf($lang['front']['gateway']['admin_email_body_1'], $cart_order_id, formatTime(time()), $ccUserData[0]['title']." ".$ccUserData[0]['firstName']." ".$ccUserData[0]['lastName'], $ccUserData[0]['email'], priceFormat($basket['subTotal']), priceFormat($emailShipCost), priceFormat($basket['tax']), priceFormat($basket['grandTotal']), $ccUserData[0]['title']." ".$ccUserData[0]['firstName']." ".$ccUserData[0]['lastName'], $ccUserData[0]['add_1'], $ccUserData[0]['add_2'], $ccUserData[0]['town'], $ccUserData[0]['county'], $ccUserData[0]['postcode'], countryName($ccUserData[0]['country']), $basket['delInf']['title']." ".$basket['delInf']['firstName']." ".$basket['delInf']['lastName'], $basket['delInf']['add_1'], $basket['delInf']['add_2'], $basket['delInf']['town'], $basket['delInf']['county'], $basket['delInf']['postcode'], countryName($basket['delInf']['country']), str_replace("_"," ",$_POST['gateway']), str_replace("_"," ",$basket['shipMethod'])); if(!empty($_POST['customer_comments'])){ $text .= sprintf($lang['front']['gateway']['admin_email_body_2'], $_POST['customer_comments']); } $text .= $lang['front']['gateway']['admin_email_body_3']; $text .= $prodtext; $mail->setText($text); // uncomment the following two lines to have the order message come from customer // $mail->setReturnPath($ccUserData[0]['email']); // $mail->setFrom($ccUserData[0]['firstName']." ".$ccUserData[0]['lastName'].' <'.$ccUserData[0]['email'].'>'); // uncomment the following two lines to have the order message come from store admin $mail->setReturnPath($config['masterEmail']); $mail->setFrom($config['masterName'].' <'.$config['masterEmail'].'>'); $mail->setSubject($lang['front']['gateway']['newOrderSubj'].$cart_order_id); $mail->setHeader('X-Mailer', 'CubeCart Mailer'); $send = $mail->send(array($config['masterEmail']), $config['mailMethod']); } ################################################################################ ## i searched the forum and could not find the problem listed. please help. thanks! leo Quote Link to comment Share on other sites More sharing options...
Guest Posted August 22, 2006 Share Posted August 22, 2006 I have seen this error too. The problem may be that you changed the language file for the admin_email_body_1 message and now the number of %s does not have the same number as the number of parameters in the sprintf. When I saw it the person added a % as text, but if you want that you should use %%. Quote Link to comment Share on other sites More sharing options...
Leo Clark Posted August 25, 2006 Author Share Posted August 25, 2006 I have seen this error too. The problem may be that you changed the language file for the admin_email_body_1 message and now the number of %s does not have the same number as the number of parameters in the sprintf. When I saw it the person added a % as text, but if you want that you should use %%. thanks robix, i understood what you said, but i dont believe i changed the language. i will check the %s. i will let you know. cheers. Quote Link to comment Share on other sites More sharing options...
Leo Clark Posted August 27, 2006 Author Share Posted August 27, 2006 I have also seen this when there has been an error uploading a skin, try uploading that again too thanks anzuk. i use legend. so, even an original skin? i will try it and post here later. leo Quote Link to comment Share on other sites More sharing options...
Leo Clark Posted September 14, 2006 Author Share Posted September 14, 2006 I have also seen this when there has been an error uploading a skin, try uploading that again too thanks anzuk. i use legend. so, even an original skin? i will try it and post here later. leo i finally realilzed something that may be obvious. what happens is that the email sent to the store owner goes without any customer information. it only shows the itens. i have this problem since my first install. i even thought to suggest a more complete email to the store owner. now i will have to check all the variables to find out which one is missing empty/invalid. lets see. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.