On October 28, 2019, new versions of the module for sending notifications from OpenCart/ocStore were published, which fixed a bug with incorrect work of the sender name selector if the client/partner uses more than 1 sender name. If you are using an older version of the module, we recommend that you reinstall the module.

If our module is not installed according to the standard procedure described below, then this is most likely due to the use of a non-standard template, edits to engine files, or due to the use of modules that use modifiers. In this case, contact our support and they will help you install the module for sending SMS/Email notifications.

Using the mailing integration module "site: SMS/Email mailings and notifications" and OpenCart/ocStore, you can send SMS and Email notifications on specified events to the administrator and customers of the online store.

2.Compatibility

  1. OpenCart: 2.0, 2.1, 2.2, 2.3, 3.0
  2. ocStore: 2.1, 2.2, 2.3, 3.0

3.Functional

  1. Automatic SMS/Email notification to administrators (one or more) of the online store about a new order (Email sending is only supported for version 3.0)
  2. Automatic sending of SMS/Email messages to users of the online store when changing order statuses
  3. Ability to configure any mode of sending notifications: only SMS, only Email or SMS and Email together
  4. Sending arbitrary SMS messages to any number from the module settings
  5. Sending arbitrary SMS messages from order cards
  6. Support for SMS/Email message templates (for example, notification of a new order, order status change, and much more), including standard and personalized ones
  7. Flexible notification settings: You can set up SMS/Email notifications only for certain order statuses
  8. Personalization of texts of SMS/Email messages (including subject line)
  9. Account balance online
  10. Saving the history of sent SMS/Email messages
  11. Ability to send Email through our SMTP server
  12. Filtering incorrect phone numbers (long, short);
  13. Recognition of phone numbers in a variety of formats, for example, +79001234567, 79001234567, 89001234567, etc.;
  14. Ignoring non-mobile phone numbers;
  15. Automatic loading of used sender names from your personal account of SMS mailings sms.site;
  16. Sending SMS to subscribers all over the world (Russia, Ukraine, Belarus, Kazakhstan, etc.) and much more.

4.Activation ( using ocStore 2.3 as an example.)

5.Setting


6.Features of installing the module for Opencart/ocStore 3.0

As you know, in OpenCart / ocStore 3.0 there is no possibility to install files in the system folder (and we need it), therefore:

  1. First you need to download and install the downloaded module in the administration panel of OpenCart/ocStore in the menu item "Add-ons installation"





  2. After that, go to the "Modifiers" and click the "Update" button

  3. Next, install the targetsms-opencart-3.0.ocmod.zip module (the version that only supports sending SMS notifications) or the targetsms_email-opencart-3.0.ocmod.zip module (the version that supports sending both SMS and Email notifications) exactly like this same as described in the example for version OpenCart/ocStore 2.3. above.











7.Creating a template for an SMS message about a new order for online store administrators


8. Creation of templates for SMS messages about the status of orders to customers of the online store

  1. Open the "Buyer SMS Templates" tab
  2. Enter the texts of the activated status SMS templates using personalization parameters, if necessary

9.Creating an email template about a new order for online store administrators


10.Creating templates for email messages about order statuses to online store customers

  1. Open the "Customer Email Templates" tab
  2. Activate the order statuses you need by checking the boxes
  3. Fill in the topics and enter the texts of the activated status email templates using personalization options, if necessary
  4. Click the "Save" button on the top right

11.Template support

  1. In processing
  2. Return
  3. Reimbursed
  4. Delivered
  5. Failed
  6. Expectation
  7. Cancellation and Cancellation
  8. Canceled
  9. Completely changed
  10. Full return
  11. Deal completed
  12. And also: SMS templates for arbitrary (custom) statuses

12.Personification of texts of SMS/Email messages

The following personification variables are available in the message text:

  1. (CUSTOMER_NAME) - full name of the customer
  2. (CUSTOMER_FIRSTNAME) - customer name
  3. (CUSTOMER_LASTNAME) - last name of the customer
  4. (CUSTOMER_EMAIL) - customer email
  5. (CUSTOMER_PHONE) - customer phone
  6. (NUMBER) - order number
  7. (TOTAL_ORIGINAL_PRICE) - order price without discount
  8. (TOTAL_PRICE) - order cost
  9. (TOTAL_AMOUNT) - quantity of goods
  10. (STATUS_CHANGE_DATE) - date of the last status change
  11. (ORDER_DATE) - date of placing an order
  12. (ORDER_DISCOUNT_VALUE) - discount amount for the order
  13. (DELIVERY_PRICE) - shipping cost
  14. (COMMENT_ADMIN) - the "Comment" field (for example, to insert the order's mail track)

13. Sending an arbitrary SMS message from the module settings

  1. Open the "Send SMS" tab
  2. Enter the recipient's phone number and message text
  3. Click "Submit"

14. Sending an arbitrary SMS message from the order card

  1. Open the card of the order you need
  2. At the very bottom of the page, in the "Message" field, enter the SMS text you need
  3. Click the "Send" button (the sender's name will be automatically taken from the module settings, the buyer's phone number - from the order card)

15.SMS history

You can view the history of sent SMS messages on the "SMS History" tab

16. Email History

You can view the history of sent email messages in your personal sms mailing account.

17. Topping up the balance of SMS mailings

You can check and replenish the balance on the "Settings" tab

18. Typical problems and difficulties

The most popular problems and questions about working with integration are described.

Test messages for free

From the author: hello friends. So, we continue the series of articles devoted to acquaintance with one of the most popular CMS for creating online stores - OpenCart (Opercart). In this article, we will talk about how to set up mail in OpenCart.

One of the needed features in OpenCart is sending mail. After each placed order, information about it should be sent to the site manager's mail so that he can promptly process the incoming order. It is also desirable to send a letter to the client and the perfect order, this will be a good form in relation to the client. Let's see how and where to set up mail in OpenCart.

As you understand, this is done in the admin panel, where we go. Go to the menu System - Settings and go to edit store settings. Here we are primarily interested in the Showcase tab. Open it and find the E-Mail field.

There is already an email address here, this is the address that was specified when installing the engine. If it is suitable for notifications from the site, then leave it, if it is not suitable, then specify another one instead.

Excellent! Now all notifications from the site should come to this email. Just in case, be sure to test this moment by creating a test order. If you received an email with order details, then everything is working. If there is no letter (be sure to check the Spam folder), then you can try to specify another mailbox, preferably on a different domain. If there is the same problem with the second mailbox, then, most likely, the mail function is disabled on your hosting and letters are simply not sent.

It doesn't matter, there is a solution for this situation. On the same settings editing page there is a Mail tab, go to it.

This tab allows you to configure mail sending using the SMTP protocol. To do this, you must have a mailbox that allows you to send mail from email clients. For example, it can be a mailbox yandex.ru, mail.ru, gmail.com, ukr.net and others. You need to allow sending mail from mail clients in the mailbox settings and get the SMTP settings: host and port. You enter all the necessary settings in the proposed fields, guided by the prompts. Select SMTP as the mail protocol instead of Mail. To make it clearer how to work with SMTP, I recommend looking at it, from it you will understand what these settings are and how to use them.

The customer set the task to change the incoming message to the admin mail. Sending email messages opencart. I thought it was a very simple task, but it took me 2 days to do it. The first difficulty arose when sending mail to mail.ru. For some reason, messages simply did not come to this postal service.

So I got the task. Then I began to configure opencart, changed the mail for the site and for the admin in the settings. Began to test, but the messages did not come. Until the moment of change, I tried the form simply from the bulldozer. The customer wrote that the message had arrived, but the essence of his task was to change the message from: email in the header, in other words, he received messages with the sender's mail and the recipient's mailing address.

I don’t know why this picture is needed at all, but oh well.

opencart messages not coming

And so the customer unsubscribed the mail, I received it after changing the postal address to a resource from mail.ru, I could not receive a letter in any way, I won’t write to the customer that I don’t understand what’s wrong. It ended up taking a whole day. I didn’t understand what the question was, I just changed the postal address to yandex.

The next moment there was complete confusion where something comes from, although I already worked on opencart. The next day was spent on understanding the structure of the CMS.

Main send file:

system\library\mail.php

By analogy, we find similar fields in contact.tpl and duplicate them. Then we find the contact.php controller, the same name, only the php extension. In this case, it was written in the line

$mail->setFrom($this->config->get("config_email"));

Replaced with

$mail->setFrom($this->request->post["email"]);

If you need to pass values ​​from the form to the body of the letter, then add it to the controller

$mail->setText($this->request->post["name"]); $mail->setText($this->request->post["phone"]); $mail->setText($this->request->post["subject"]);

I just deal with Opencart 3 and I don’t really like to put incomprehensible additions, but I like to disassemble and study everything, and now after the site was launched for the client and on the same day after the first order, it was decided to rework the letter that comes to the admin and manager about the order, namely, what would be in the letter:

  • surname
  • telephone
  • address
  • city
  • payment method
  • delivery method

In total, you need all the fields that the buyer fills in on the site.

In the end, here's what I came up with.

When a customer places an order, he receives an email with all the information:

while the administrator receives such a sad letter (((


Well, as you understand, or rather, who has ever kept their online stores, they will immediately say that this is no good, do not call or find out some information and in order to get more detailed information you need to go to the admin panel, and if you are on the way and can't login to admin?

Well, in the end, I went the other way and just made a substitution of letters, i.e. the admin will receive the same letter as the client)

and now a little magic and it's in the bag)

Opencart 3 order letter to admin

In order for all the information to be sent in the letter to the admin about the order in opencart, you need to edit two files:

  1. /catalog/controller/mail/ order.php
  2. /catalog/view/theme/yourtheme/template/mail/ order_alert.twig

order.php

Opening the file order.php and look for line 270 where there is this text:

$mail->setTo($order_info['email']);
$mail->setFrom($from);
$mail->
$mail->setSubject(html_entity_decode(sprintf($language->get('text_subject'), $order_info['store_name'], $order_info['order_id']), ENT_QUOTES, 'UTF-8'));
$mail->setHtml($this->load->view('mail/order_add', $data));
$mail->send();

Paste this code below it:

$mail->setTo($this->config->get('config_email'));
$mail->setFrom($this->config->get('config_email'));
$mail->setSender(html_entity_decode($order_info['store_name'], ENT_QUOTES, 'UTF-8'));
$mail->setSubject(html_entity_decode(sprintf($this->language->get('text_subject'), $this->config->get('config_name'), $order_info['order_id']), ENT_QUOTES, ' UTF-8'));
$mail->setHtml($this->load->view('mail1/order_alert', $data));
$mail->send();

This code insert was inserted into the section where a letter is generated and sent to the buyer, and we send the same letter to the administrator as you can see, we have substituted the letter template order_alert )))

order_alert.twig

What we have done above will not actually change anything, we will still receive the same miserable letter, and all because we have not yet changed the letter template that should be sent to the administrator!

Look, I did everything on the standard Opencart template with the default theme, and therefore I created the mail1 folder specifically for this and create the order_alert.twig file in it, if you have your own theme, then just create the mail folder if it is not there

The data for the order_alert.twig file is completely copied from the file order_add.twig (which is located at /catalog/view/theme/default/template/mail)

After that, we will receive the following letter in the mail)


Well, as usual, the video))

There are no related posts.