Pricing Rule on Shopping Cart

Hi. How can I show the Price based on pricing riule on Shopping Cart? The function on shopping art to get prices is as follows:

def get_price(item_code, template_item_code, price_list):
if price_list:
price = frappe.get_all(“Item Price”, fields=[“price_list_rate”, “currency”],
filters={“price_list”: price_list, “item_code”: item_code})

            if not price:
                    price = frappe.get_all("Item Price", fields=["price_list_rate", "currency"],
                            filters={"price_list": price_list, "item_code": template_item_code})
            if price:
                    return price[0]

I want to integrate the “apply_pricing_rule_on_item” on this function. How can I dot it?

is this the function that you are looking for?

in line 6

I am not sure if that could be used. I just want to show the price based on pricing rule on Shopping Cart.

I can’t get this working. I have seen API of pricing rule and I can’t seem to use it with all the arguments it require. I have already raised an issue on GitHub for this.

hi jeffbangquil, did you get your shopping cart with pricing rule worked? Mine was working before , but this week, for the new added items, the price is not showing. And I did not change set for the items. It is really strange for me.

----it is somehow working now