def calculate_price(request, id):
    product = Product.objects.get(pk=id)
    property_price = _calculate_property_price(request)

    if product.for_sale:
        for_sale_standard_price = product.get_standard_price(request, with_properties=False)
        for_sale_standard_price += property_price

        for_sale_price = product.get_for_sale_price(request, with_properties=False)
        for_sale_price += property_price
    else:
        for_sale_standard_price = 0
        for_sale_price = 0

    price = product.get_price(request, with_properties=False)
    price += property_price

    if product.get_active_packing_unit():
        packing_result = calculate_packing(request, id, with_properties=True, as_string=True)
    else:
        packing_result = ""

    result = json.dumps({
        "price": lfs_tags.currency(price, request),
        "for-sale-standard-price": lfs_tags.currency(for_sale_standard_price),
        "for-sale-price": lfs_tags.currency(for_sale_price),
        "packing-result": packing_result,
        "message": _("Price has been changed according to your selection."),
    }, cls=LazyEncoder)

    return HttpResponse(result, content_type='application/json')
Calculates the price of the product on base of choosen properties after
dataset/ETHPy150Open diefenbach/django-lfs/lfs/catalog/views.py/calculate_price