Reward point and automatic payout to balance, functional but appear error msg


  • Default avatar
    wen127    
     a year ago
    0

    Hello Seyi,


    I've set a reward rule: Reward 25points to every order over $100.
    And I set automatic payout in configuration to AwoCoupon Balance with 1:1 ratio.

    --> That make customers get $25 directly from every order over $100. Which is perfect!


    However, while I tested to checkout.
    After I apply the Gift Certificate Balance, everything works fine, the total price was correctly reduce and I can checkout no problem.
    Except, it keep showing annoying error message.
    http://www.awesomescreenshot.com/image/1832105/759580eb7348603b6c09c1d8f086aa1d


    How can I keep the wrong error message from showing?
    Thank you very very much.

  • Your avatar
    seyi    
     a year ago  last edited a year ago
    0

    Hello,

    This is a virtuemart installation with rupostel opc right?  If so then this should fix it:

    in www/administrator/components/com_awocoupon/helpers/estore/virtuemart/couponhandler.php, around line 900 is this:P

    <?php
        
    public function get_submittedcoupon() {
            if(empty($this->vmcoupon_code)) return '';
            if (version_compare($this->vmversion'2.9.8''>=') && $this->vmcoupon_code==JText::_('COM_VIRTUEMART_COUPON_CODE_CHANGE')) return '';
    ?>

    Right after that add this:

    <?php
             $is_rupostel_opc 
    class_exists('OPCloader') ? true :false;
            if($is_rupostel_opc && $this->vmcoupon_code == JText::_('COM_AWOCOUPON_GC_GIFTCERT')) return '';
    ?>
    :

    That should fix it

  • Default avatar
    wen127    
     a year ago  last edited a year ago
    0

    Yes, you are right.

    I follow your instruction and the gift certificate can apply with no error message. :D


    However, I've enable multiple coupons for 1 coupon max and no limited gift certificates.  If I apply a coupon (10% OFF) and apply gift certificate at the same time, the error message shows again. 


    Also, if I cancel the gift certificate after apply it (with no other coupon been applied),

    http://www.awesomescreenshot.com/image/1836066/2ee8bd7a4eb161594d2ce73a0b9b5d34
    the error msg (system) appear once more.
    http://www.awesomescreenshot.com/image/1836067/fc6e1d85641221ee1493733665c4a172

    Is there another code line should insert the same code?

    Really appreciate your help, Seyi.


    Joomla 3.6.4
    Virtuemart 3.0.16
    AwoCoupon 2.5.2
    AwoReward 2.2.9

  • Your avatar
    seyi    
     a year ago  last edited a year ago
    0

    Ok, so disregard my previous solution.  The problem is somewhere along the line opc strips out the html code, causing issues with AwoCoupon.  So the solution that should work is to make sure no html code is used.  To do this, you need to override the template.  You will need to create this file if it does not already exist:

    www/templates/[YOUR_TEMPLATE]/html/com_awocoupon/coupondelete/default.php

    In the file, you should only have this:

    <?php
    echo $this->coupons_original_text;
    ?>

    Make sure you include the <?.. and ?>
  • Default avatar
    wen127    
     a year ago  last edited a year ago
    0

    Hello Seyi,


    Thank you for your help. The problem resolved!
    (Consider the code you provided, I created default.php instead of default.html, am I doing right?)

    Yet a new issue occur, the "x" icon which customer can cancel to using a coupon or gift certificate is disappear.
    http://www.awesomescreenshot.com/image/1836066/2ee8bd7a4eb161594d2ce73a0b9b5d34

    Could I add the "x" icon back?
    Thank you so much for your help!

  • Your avatar
    seyi    
     a year ago
    0

    Hello,

    Yes, default.php is correct, corrected post.

    Something in opc is stripping out the html, and removing the code we did would remove the html x that allows deleting.  I think at this point you should contact rupostel.

  • Default avatar
    wen127    
     a year ago  last edited a year ago
    0

    Dear Seyi, 

    Sure, I will do that.

    Thank you so much for your help!