Jump to content

Giftcard not sending email


Mike101za

Recommended Posts

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

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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

 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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 by bsmither
Link to comment
Share on other sites

  • 3 weeks later...

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...