Joomla Modules in AWOCoupon Emails


  • Your avatar
    north40soap    
     7 years ago  last edited 7 years ago
    0

    I am using the following:

    HikaShop Essential: 2.6.4

    AWO Version: 2.5.4 pro

    Joomla! 3.6.5

    JCE 2.6.6


    As I am configuring my Profiles emails...I would like to insert a Joomla Module as well.  At this point I am looking to insert a Social Media module.
    When I send a confirmation email, the tag for the module appears....but not the module.  {loadmodule mod_favsocial,FavSocial}

    I am not a code writer by any stretch of the imagination so, if this tag needs to be placed in the code...I have no idea where to place it.  If there is a setting that needs to be changed....I need help with that.  If this would not work at all....someone please tell me...lol.

    Any help would be appreciated.



  • Your avatar
    seyi    
     7 years ago
    0

    Hello,

    The email is not processed through joomla content plugin.  Is this for gift certificate purchase or send a voucher?
  • Your avatar
    north40soap    
     7 years ago
    0

    I tested both ways and I am not able to see the module on either type. I was hoping to have this work on both types....like a template.
  • Your avatar
    seyi    
     7 years ago
    0

    Ok, try this.  Not tested but should work.

    in the file www/administrator/components/com_awocoupon/helpers/awolibrary.php, around line 492 is this:
    <?php
            $str 
    str_replace("href=\"..""href=\""$str);
            $str preg_replace('/href=\"(?!cid)(?!http).*/Uis'"href=\"".$siteUrl$str);
    ?>


    After that add this:
    <?php
            
    // trigger content plugin
                $article = new stdclass;
                $article->text $str;
                $article->event = new stdClass();

                jimport ('joomla.registry.registry');
                $params = new JRegistry('');
                
                $dispatcher 
    JDispatcher::getInstance ();
                JPluginHelper::importPlugin ('content');
                $results $dispatcher->trigger ('onContentPrepare', array('com_awocoupon.profile', &$article, &$params0));

                $str $article->text;
            }
    ?>


    That should do it.
  • Your avatar
    north40soap    
     7 years ago  last edited 7 years ago
    0

    That did not work all the way.  I was able to insert the code, and get the profile to stop showing the tag....but it did not show the module I wanted to insert.

    Remember...I am not experienced in writing code. My success was due to trial and error so, I may not have done it correctly.

    Any other thoughts?

  • Your avatar
    seyi    
     7 years ago
    0

    Hello,

    The code I gave you would run and check for content tags and change them as needed.  By the fact the tag no longer appears means that it is definitely running.  As to why it is not giving you the output you want, I am really not sure.
  • Your avatar
    north40soap    
     7 years ago
    0

    Hmmmm......I will investigate further. Thanks for getting back to me.