Troubleshoot

This section describes the most common problems that customers report and how they can be resolved:

The email does not show the coupon code

The coupon code is not visible in the email.

Solution:

  1. Make sure the coupon code is enabled in the email settings of your trigger.
  2. If there are no available Cart Price Rules in the email settings, make sure that the option Use Auto Generation is checked at least in one rule.

    Note

    The Use Auto Generation checkbox is available in the Cart Price rules only when you choose the Specific Coupon option at the Coupon field of your Cart Price Rule.

The block with the selected cross-sell, related, or upsell products is not displayed in the email.

The products for the cross-sell block are selected based on the products associated with the customer's orders or shopping cart.
Before using one of the types as the source for cross-sell block, make sure that an appropriate type of product is configured.

Note

In the preview emails, the module shows random products in the cross-sell block.

Solution:

Make sure your products have the cross-sell, related, or upsell products:

  1. Open one of your products in the admin panel in edit mode.
  2. Scroll down and expand the Related Products, Up-Sells, and Cross-Sells section.
  3. You'll see products there if you have configured these settings earlier, but if there are no products, you should configure them.

For more information refer to Magento documentation: https://docs.magento.com/m2/ce/user_guide/catalog/settings-advanced-related-products.html. Also you may find interesting to insert our Related Products for Magento 2 in your emails.

How do I translate an email template?

There are several ways to translate emails:

  1. Separate email templates per language:

    1. Create a new email template in the desired language.
    2. Create a separate trigger per store and for emails using templates in the corresponding language.
  2. Use the Magento translation mechanism:
    For example, you want to translate the text Shop Now in the Welcome email template. To translate it, copy the source string with this text to the CSV file located in your theme directory. The translation may look as follows:

    Example

    <a href="{{ store.store_url }}">Shop Now</a>   
    <a href="{{ store.store_url }}">Shop Right Now</a>

    Or if you want translate the subject:

    Example

    Hello {{ customer_name }}!, Hola {{ customer_name }}!

    Note

    If the string you want to translate contains commas, then you should wrap the translation string with the double quotation mark ("). But if the string in addition to comma contains a double quotation mark, then you should replace all double quotes in the original text with the single quotation mark (').

After extension update php code in the templates stopped working

According to the Magento security policies starting with the module-email version 2.1.28 and module-email-designer version 1.1.31 ability to use php code in the templates was disabled.

If this ability is vital for your store, it is possible to revert the function code located at the file vendor/mirasvit/module-email-designer/src/EmailDesigner/Service/TemplateEngine/Php.php

  • Should be modified function getHtml with the next code:

    private function getHtml($tplPath)
    {
        ob_start();
        include $tplPath;
        $html = ob_get_clean();
    
        return $html;
    }