AdrianM2 Posted October 2, 2017 Share Posted October 2, 2017 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); Link to comment Share on other sites More sharing options...
Scully Posted October 2, 2017 Share Posted October 2, 2017 You needed to overwrite the corresponding class function, add a parameter and check wheter this new parameter is supplied. Link to comment Share on other sites More sharing options...
joseantgv Posted October 2, 2017 Share Posted October 2, 2017 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) 2 Link to comment Share on other sites More sharing options...
AdrianM2 Posted October 2, 2017 Author Share Posted October 2, 2017 @joseantgv Thanks. It seems that there already is a parameter for "$id_customer". Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now