Desimals in gift card template


  • Default avatar
    jarkko    
     24 days ago
    0

    Hi,


    Is there way to display gift card amount in template picture just by 10 € instead of 10.00 € ?

    Jake

  • Your avatar
    seyi    
     22 days ago
    0

    Hello,

    It is not a feature.

    You can alter the function that returns it.  In the file:
    \administrator/components/com_awocoupon\awocoupon\library\class-awocoupon-library-coupon.php around line 490 is this:
    <?php
            
    if ( in_array$coupon_row->coupon_value_type, array( 'amount''amount_per' ) ) ) {
                $display AC()->storecurrency->format$coupon_row->coupon_value );
            }
    ?>

    You could alter it to something like this
    <?php
            
    if ( in_array$coupon_row->coupon_value_type, array( 'amount''amount_per' ) ) ) {
                $display AC()->storecurrency->format$coupon_row->coupon_value );
                if ( substr$display, -) == '.00' ) {
                    $display substr$display0, -);
                }
            }
    ?>

  • Default avatar
    jarkko    
     21 days ago
    0

    Thanks, I will add that and try.