Read more about web design Cork and drop us a message!

POA Button Leading to Webform for Enquiry

Use your template.php to access the price field, replace with your code if sell price equals zero. Then link to webform module content where people apply for price with product automatically filled in.

function mytheme_uc_product_add_to_cart( $variables ) {
$sell_price = $variables['form']['node']['#value']->price;
if ($sell_price <= 0) {
return '<form action="http://www.mydomain.com/mywebformpath/price-application" method="post"><input type="hidden" name="product" value="' . drupal_get_title() . '" /><input type="submit" class="form-submit" value="' . t('POA') . '" /></form>';
}
else {
return theme_uc_product_add_to_cart($variables);
}
}

Webform Post

Inside your previously created webform, you are allowed to take a ‘POST’ value like below, just adapt for your input name

Price on application Drupal Ubercart

- Posted - Categories

Back to Top

Random Web Design Testimonials

Hilary at her Company Proximo Design created a webpage for me at Gourmet Burger Bistro this year. I wanted to get it up and running quickly and I could not have been more satisfied with the speed and quality of her results.
Best of luck in the future Hilary and I look forward to continuing our business relationship.
Michael Condon
Gourmet Burger Bistro

Michael Condon Owner, Gourmet Burger Bistro