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

Back to Top

Random Web Design Testimonials

“I worked with Hilary for a time and during that period I found her to be extremely helpful and articulate. Her work was of highest standard and I was also able to observe how she interacted with her clients. While providing a top class service she maintained friendly and helpful services with them, listened to what they wanted and made appropriate suggestions. Hilary also assisted me with my work and provides services to the local community at large. I have no hesitation in recommending Hilary for any work.”

Andrea Harte - Undergraduate at University of Limerick