0

I am taking application fees for application processing for a real estate broker. When the user fills out an application, they need to submit payment immediately.

The issue is this isn't really a product. It's a processing fee. Am I stuck with using a product? Can I create an order without the product and just use the fee? I feel like I should create a line item for an order and do it that way, so the pricing rules flow normally.

When the user is ready to submit their application, I'm going to use the Drupal NoCart module to take the customer straight to payment.

I haven't been able to find a business case like this online anywhere.

For the new line item type, it looks like I should create a new one:

function mymodule_commerce_line_item_type_info() {
    $line_item_types = array();

    $line_item_types['appfee_type'] = array(
        'name' => t('Application Fee'),
        'description' => t('Line item type for app fee.'),
        'product' => FALSE,
        'base' => 'appfee_type'
    );
    return $line_item_types;
}
  • I'm not using the NoCart module. It seemed to be relevant to a product. – vintorg Jun 11 '15 at 19:13
0

The new line item type and adding it to the order was the way to go it seems. My code is posted in this post.

That code worked, however, I kept getting an access denied when trying to check out. DC runs a hook called hook_commerce_checkout_order_can_checkout(). The order is passed to this hook, and you can determine if you want to allow access. I did on all instances and didn't need to write any logic, so I just returned TRUE, and everything worked.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.