Jump to content

Get final price of product for specific user.


AdrianM2
 Share

Recommended Posts

Hi.

 

I'm trying to figure out a way to get final price of product (after all discounts, specific prices, discounts created by modules etc.) for specific customer ID.

 

I can get that price using:

Product::getPriceStatic($productid);

but it takes customer ID only from current session cookie of logged in customer.

 

Is there a way to get final price of product by giving customer ID?

 

something like:

Product::getPriceStatic($productid, $customerid);

Share this post


Link to post
Share on other sites

 

Hi.

 

I'm trying to figure out a way to get final price of product (after all discounts, specific prices, discounts created by modules etc.) for specific customer ID.

 

I can get that price using:

Product::getPriceStatic($productid);

but it takes customer ID only from current session cookie of logged in customer.

 

Is there a way to get final price of product by giving customer ID?

 

something like:

Product::getPriceStatic($productid, $customerid);

 

Please check all the parameters of the function:

public static function getPriceStatic($id_product, $usetax = true, $id_product_attribute = null, $decimals = 6, $divisor = null,
        $only_reduc = false, $usereduc = true, $quantity = 1, $force_associated_tax = false, $id_customer = null, $id_cart = null,
        $id_address = null, &$specific_price_output = null, $with_ecotax = true, $use_group_reduction = true, Context $context = null,
        $use_customer_price = true)
  • Like 2

Share this post


Link to post
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
 Share

×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More