Jump to content

Shipping cost not applied for vistors in prestashop 1.6


Obada8

Recommended Posts

My problem is when i'm non-customer on my store and do add to cart for orders the cart block show free shipping cost, but if i'm customer and i registered the shipping cost is applied from getPackageShippingCost function which located in /classes/Cart.php

I tried to make getPackageShippingCost to return only 10, but no luck.

This is my edit for this function:

    public function getPackageShippingCost($id_carrier = null, $use_tax = true, Country $default_country = null, $product_list = null, $id_zone = null)
    {
        if ($this->isVirtualCart())
            return 0;

            $order_total = $this->getOrderTotal(true, Cart::ONLY_PHYSICAL_PRODUCTS_WITHOUT_SHIPPING, $product_list);

        if ($order_total >= 30)
            return 0;
        else
            return 10;
    }

This work for customers but not work for visitors, it show free shipping for visitors.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...