Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hello,
I'm working on a custom module for calculate VAT on prices provided by Customizable product.
So, i use hook_commerce_tax_type_calculate_rates but if when i want work around $line_item or $tax_type variables, thats seems ajax request (changing country or using a coupon) are broken (Error 200).
Some body coul'd help me to use this hook properly ?
This a very simplified code, but it's enought for ajax breaking.
function tva_cousin_commerce_tax_type_calculate_rates($tax_type, $line_item) {
drupal_set_message($line_item->line_item_label, 'status', FALSE);
}
Thanks a lot !
Comments
Comment #1
rszrama CreditAttribution: rszrama commentedThere's no way to tell, to be honest - there isn't enough info here to understand your intent or expected output (or why AJAX comes into it at all). I'd start by looking in your site's watchdog and PHP error logs for clues - could be a simple case of missing data.
Comment #2
benj91 CreditAttribution: benj91 commentedThanks for your answer rszrama and you get right, i apologize for my poor explanations.
But i just found a solution.
My module works width a simple condition :