Need free shipping to actually set shipping to 0 instead of using a coupon to take off the shipping price.


  • Default avatar
    christiana    
     7 months ago
    0

    I am currently on Hikashop 2.6.4 and AWO Coupon 2.5.5 pro.  However, I have an issue.  Whenever you want free shipping you can set the percentage to 100% and it will take the discount off via a coupon.  However, my client wants instead for the shipping to be set to free. There are a few reasons for this.


    The client is very large and gets 1000's of transactions a month.  When you are looking at the transactions the shipping does not actually show up as free, but instead you see a coupon of the value of the shipping being subtracted from the order.  This is both confusing to end user because they still see a shipping charge on the front end of the website and it is a management nightmare from a quickbooks or the avalara tax extension we use standpoint because the shipping is not showing up as free and therefore it is causing the clients to be taxed on the shipping even though the shipping is actually free because the coupon took the value off


    Can you please change awo coupon to where when you set a shipping coupon it actually takes the discount from the shipping itself and not as a coupon?


    Here is a picture of the setup to further clarify.


    Thanks,


    Josh


  • Your avatar
    seyi    
     7 months ago  last edited 7 months ago
    0

    Hello,

    AwoCoupon is a coupon extension, and so does not modify the shipping costs of an order, all discounts are shown in the coupon discount column of the order. 

    However if you want to just display the shipping as 0 in the cart, this can be done.  This will not affect the way awocoupon stores the discount, it only affects the display.  So here is how:

    Find the file:
    /templates/[YOUR_TEMPLATE]/html/com_hikashop/checkout/cart.php

    If it does not exist, copy it from:
    /components/com_hikashop/views/checkout/tmpl/cart.php

    Then find:
    <?php
    if($shipping_price !== null) {
    ?>


    Right after that add this:
    <?php
        $coupon_session 
    JFactory::getSession()->get('coupon''''awocoupon');
        if(!empty($coupon_session) ) {
            $coupon_session unserialize($coupon_session);
            foreach($coupon_session['processed_coupons'] as $item) {
                if(bccomp($taxes,0,5)==|| !$this->params->get('price_with_tax')) $shipping_price -= $item['shipping_discount_notax'];
                else $shipping_price -= $item['shipping_discount'];
            }
        }
    ?>


    That should do it.
  • Default avatar
    christiana    
     7 months ago
    0

    Thank you so much for the response. However, that is not going to work because there is still an issue because when an order email is submitted to a customer shipping still shows up as $6.00 since it is not actually modifying the value in the database.  So, for a customer to see shipping set to $0 on the front end of the site but then get an order email from the site that says shipping is $6.00 is even more confusing.  How would I display a different shipping price in the order email itself? Unless I can figure that out it makes no sense to set the shipping price to $0 only on display in the front end.  Attached is a screenshot of how the order email is showing.


    Thanks,


    Josh