Shipping cost issue


  • Default avatar
    sandra91    
     3 months ago
    0

    Hello,
    i'm using latest version of awocoupon and Virtuemart version 3.8.2 10325.


    The problem is about shipping cost: i want the shippin cost is calculated on total of cart without the amount of coupon. Now is calculated on total discounted. How can i achive this?


    Thanks

  • Your avatar
    seyi    
     3 months ago
    0

    Hello,

    In what context?  Are you calculating the shipping cost based on the amount total?  Then you must be using a shipping extension and in that case it would have to be configured in the extension you are using.
  • Default avatar
    sandra91    
     3 months ago
    0

    I update the info about vm version. The correct version is 3.8.8 10472.

    For shipping cost i'm using standard weight_countries plugin and i'm using min e max amount setting in the first page of plugin settings area.



  • Default avatar
    sandra91    
     2 months ago
    0

    Any idea on how fix this please?
  • Your avatar
    seyi    
     2 months ago
    0

    So if I understand you do not want the coupon discount to be taken into account when calculating the min or max amount of shipping?  If so you will need to make s core modification of virtuemart.  In file:

    www/administrator/components/com_virtuemart/plugins/vmpsplugin.php, around line 979 is this:
    <?php
                $amount 
    $this->getCartAmount($cart_prices);
    ?>

    After that add this:
    <?php
                if 
    ( class_exists( 'awocoupon' ) ) {
                    $coupon_session = AC()->storediscount->get_coupon_session();
                    if ( ! empty( $coupon_session->product_discount ) ) {
                        $amount += $coupon_session->product_discount;
                    }
                }
    ?>

    I believe that should do it.