Notice: Undefined property: AwoCouponVirtuemartCouponHandler::$coupon_row line 3454


  • Default avatar
    jason66    
     6 years ago
    0

    Hi,
    I have an automatic discount applied for all products- save 10% if more than 3 products in cart.

    I receive error below if I have 3 or more products in cart and then empty cart.


    Product quantity successfully updated

    Notice: Undefined property: AwoCouponVirtuemartCouponHandler::$coupon_row in /home/all3hblocal/public_html/administrator/components/com_awocoupon/helpers/estore/estorecouponhandler.php on line 3454

    Notice: Trying to get property of non-object in /home/all3hblocal/public_html/administrator/components/com_awocoupon/helpers/estore/estorecouponhandler.php on line 3454

    Joomla 3.7
    VirtueMart 3.2.2
    php 7

  • Your avatar
    seyi    
     6 years ago  last edited 6 years ago
    0

    Hello,

    In that same file:
    /home/all3hblocal/public_html/administrator/components/com_awocoupon/helpers/estore/estorecouponhandler.php on line 3454

    You will find the code:
    <?php
                    $this
    ->error_msgs[$this->coupon_row->id] = (!empty($this->coupon_row) ? $this->coupon_row->coupon_code.': ' '').$err;
    ?>


    Please alter this code to:
    <?php
                    $this
    ->error_msgs[empty($this->coupon_row) ? -$this->coupon_row->id] = (!empty($this->coupon_row) ? $this->coupon_row->coupon_code.': ' '').$err;
    ?>


    That should fix the issue.

    Regards
    Seyi