Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

Shipping costs problem at checkout

By
hans W
on 1/6/15, 4:41 PM 1,215 views

I have my webshop set up with Odoo 8.0 online version. I have a problem with setting up my shipment costs at the check out page.

I made a delivery pricelist: orders below €50 --> €6.95 shipping costs order above €50 --> €0 shipping costs.

At the checkout page you have 4 main blocks (review order / shipping & blling / payment / confirmation). When a client is choosing from the first time the correct quantity there is no problem. The problem is that when a customer is adjusting quantities in block "review order" the shipping costs don't follow the new order value. Odoo does not adjust the shipping costs directly and that is very confusing for customers. 

Has anybody got a solution?

 

 

0
Kazim Mirza
On 1/6/15, 5:23 PM

Hello Hans

Its not working because whenever you update the cart it will not trigger any delivery cost method right now .

You need to add the code in website_sale module .

The code is below . either you can change the code and you can make a new module for inherit the website_sale mathod.

@http.route(['/shop/cart/update_json'], type='json', auth="public", methods=['POST'], website=True)
    def cart_update_json(self, product_id, line_id, add_qty=None, set_qty=None, display=True):
        cr, uid, context = request.cr, request.uid, request.context
        order = request.website.sale_get_order(force_create=1)
        order._check_carrier_quotation(order, force_carrier_id=order.carrier_id)
        value = order._cart_update(product_id=product_id, line_id=line_id, add_qty=add_qty, set_qty=set_qty)
        if not display:
            return None
        value['cart_quantity'] = order.cart_quantity
        value['website_sale.total'] = request.website._render("website_sale.total", {
                'website_sale_order': request.website.sale_get_order()
            })
        return value

Hope that this answer will help you.

Please don't hesitate to ask any question regarding this.

If you get the answer as you need then please accept the answer.

Thank You

 

This code it doesn't work on Odoo 8.0-20160607

Nobody has a solution.. This is still happening on 2016........ Incredible..

Laura
on 6/28/16, 5:40 AM
0
hans W
On 1/6/15, 7:38 PM

Dear Kazim,

Thanks for your quick response. But I'm not familar with adding codes to modules. Can somebody explain what I should do? Like a said I'm an Odoo 8 web client.

Hans W

 

Sorry but the only way is to make a module if you dont want to loss the code.

Kazim Mirza
on 1/7/15, 4:47 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 1/6/15, 4:41 PM
Seen: 1215 times
Last updated: 6/2/16, 10:07 AM