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.
This is relatively straightforward but after days of research I'm still at a loss as to how to achieve it.
If I have a custom module which presents a customer with a form where they fill out various details, my code then calculates a price based on these inputs.
So my module has a calculated price, we just need to add a generic pre-defined product to the cart and modify the price...done. Can anyone provide a couple of snippets on how to do this? I've looked at various hooks and cant find any clear information on how to do this.
Comments
Comment #1
TR CreditAttribution: TR commentedYou could try https://drupal.org/project/uc_custom_price or https://drupal.org/project/uc_varprice