Fee information displaying on all products. Patch checks active status.

CommentFileSizeAuthor
active_check_for_fee_display.patch591 bytesmrf

Comments

mrf’s picture

Status: Active » Needs review
matthand’s picture

I installed the patch and I'm still experiencing the bug. I don't think it solved it. Thank you.

*Update*

I see that it did correct a bug, just not the one I'm experiencing. Different bug. Sorry! Nice Job.

agileadam’s picture

This may be not be related, but I have a Shipping Surcharge fee on all products. It defaults to $0.00. I figure, if the value of a fee on a product is $0.00 it should be hidden from the add-to-cart form.

Here's my hook_form_alter() code to do that. Maybe it'll help someone else out.

/**
 * Implementation of hook_form_alter().
 */
function mymodule_form_alter(&$form, &$form_state, $form_id) {
  if (strpos($form_id, 'uc_product_add_to_cart_form') == 0) {
    if ($form['fees']) {
      foreach ($form['fees'] as $key => $value) {
        if ($value['#value'] == '$0.00') {
          unset($form['fees'][$key]);
        }
      }
    }
  }