1
Answers
Vote up!
0
Vote down!

What is the function hook if the user change the default product?

Hi guys I want to know what is the function hook if the user change the default product?

When the user change the default product, the price is changing. what function is used to update the price? Basically I want to select the product programmatically. so i want that function to update the price in product display node.

Thanks

Asked by: iamfreelancer
on June 20, 2013

1 Answer

Vote up!
2
Vote down!

This all happens as part of the Add to Cart form refresh, so there is no direct hook involved. Instead the Add to Cart form is rebuilt, and our response from the function commerce_cart_add_to_cart_form_attributes_refresh() includes the AJAX commands to update the various price fields on the page.

Ryan Szrama
Answer by: Ryan Szrama
Posted: Jun 20, 2013