Mike101za Posted January 6, 2018 Share Posted January 6, 2018 Hi, I have setup the email in Cubecart, saved and tested. All works fine including when orders are placed. However I have added giftcard. When I go to accept and set to processing I get the following: Failed to send giftcard by email. Please check email configuration. (in Red bar) Order successfully updated. (in Blue bar) Any help please? Thank you Mike Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 6, 2018 Share Posted January 6, 2018 If that is all of the message (there may have been an additional part, "A specific error message may be found in the error log"), then the problem was probably not with the actual attempt at mailing, but rather with the parameters given to the mailer. From the point of view of the mailer, either the email address does not look like an email address, or the email content is not an array (meaning, there is a problem with the way the code that calls the mailer is providing the contents to mail). You've added a GC to an order administratively? Please refresh our memory of the exact version of CubeCart you are using. Quote Link to comment Share on other sites More sharing options...
Mike101za Posted January 6, 2018 Author Share Posted January 6, 2018 Hi, Yes, it has been added. Version 6.1.13 No other error. Looked at email log and nothing there neither. Only the email relating to the purchase. As per the config, message only appears when I Process the order. Seems email with gift cert sent then. Mike Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 6, 2018 Share Posted January 6, 2018 Technically, according to the code as I read it: * GC's only get emailed when the order goes to Completed (why? I don't know). * I see no way to actually administratively add a GC to an order. Please review with us the steps you take to administratively add a GC to an existing order. (Or an order you are creating.) How do you identify the GC? Quote Link to comment Share on other sites More sharing options...
Mike101za Posted January 6, 2018 Author Share Posted January 6, 2018 Hi, I enable the GC under settings. Complete the detail. GC then appears as a drop down menu on the store page. I select it and complete the fields. add it to the basket which it does. Go to Checkout and checkout. Invoice is displayed for printing. As Admin I then go to Orders. Select the order number and change from Pending to Processing. I then hit save and I get the error. Mike Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 6, 2018 Share Posted January 6, 2018 Ok, so you are NOT actually administratively adding a GC to an order. You are creating an order as a customer would. Now, if the customer actually paid for the order, that order should already be at Processing (if not already at Completed depending whether the GC has both a physical and digital component). Since the admin changes it to Processing, I assume the customer did not actually follow through and complete the transaction. That's fine, just getting a clear understanding. So that leaves us with why is CubeCart trying to email a GC when the order is administratively moved to Processing. The code suggests that emailing a GC happens only when the order moves to Completed. I will research this. Quote Link to comment Share on other sites More sharing options...
Mike101za Posted January 6, 2018 Author Share Posted January 6, 2018 When I move it from Pending to Processing and hit save, It automatically changes to order complete. I do not change it to order complete. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 6, 2018 Share Posted January 6, 2018 Ah! So CubeCart automatically moves the order to Complete - which is perfectly normal for 'digital-only' orders. Would the customer happen to be using a language on the storefront for which there is no translation of that language available at admin, Email Templates, for Cart: Gift Card? Quote Link to comment Share on other sites More sharing options...
Mike101za Posted January 7, 2018 Author Share Posted January 7, 2018 No, English only. I am testing this. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 7, 2018 Share Posted January 7, 2018 (edited) Let's add some tests to the code. Using a programmer's text editor: In classes/mailer.class.php, near line 163, find: $email_param = '&unsubscribe='.urlencode($email); } else { return false; } Change to: $email_param = '&unsubscribe='.urlencode($email); } else {$GLOBALS['gui']->setError('Sorry, but the email '.htmlentities($email).' does not look like a valid email address.', true); return false; } This is the first place where CubeCart will issue the error message you see. We are adding another error message explaining why there is a failure at this point. Test. If you do not see this error message, then (assuming the edit was correctly performed) we might guess that CubeCart may be having a problem with the aforementioned email template. Edited January 12, 2018 by bsmither Quote Link to comment Share on other sites More sharing options...
Mike101za Posted January 23, 2018 Author Share Posted January 23, 2018 Hi, I added this and still the GC with the GC code is not sent. No other message. Quote Link to comment Share on other sites More sharing options...
Mike101za Posted January 24, 2018 Author Share Posted January 24, 2018 Okay, I have changed the setting as per other threads and switched off " force order completed emails" saved, switched it on again, changed the password and saved. Now I get the following: Sorry, but the email does not look like a valid email address and the usual "check email config" in the line below. Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 24, 2018 Share Posted January 24, 2018 The issue in the Github has been updated. We found the code causing the problems. Quote Link to comment Share on other sites More sharing options...
Mike101za Posted January 24, 2018 Author Share Posted January 24, 2018 Link please? Quote Link to comment Share on other sites More sharing options...
bsmither Posted January 24, 2018 Share Posted January 24, 2018 https://github.com/cubecart/v6/issues/1854 Quote Link to comment Share on other sites More sharing options...
Mike101za Posted January 24, 2018 Author Share Posted January 24, 2018 Thank you Thank you kindly, it works. 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.