Ubercart modules: Manual shipping quote & payment after checkout

I have been working with a client to setup an Ubercart store customized to their needs and one of the things we came across as we launched the store is that because of the nature of the items being sold, it was very difficult to give a accurate shipping estimate. Thus, I set off to find a way to enable customer payments after checkout and to enter the shipping quotes manually.

These two modules, uc_manual_shipping and uc_payafter, are the fruit of these efforts. I hope you find them useful!

Note that this is my first release of these modules and the code should be considered a beta and work in progress. They are untested so far and not recommended for use on a production site just yet. All information about installation, configuration and further development is available in the README.txt file, DEVELOPERS.txt file and/or source code comments. If you have made some changes or improvements, please let me know in the comments! I would love to hear about your changes and I would be more than happy to apply any patches or bugfixes.

uc_manual_shipping enables the store administrators to manually enter shipping quotes on orders after a user has passed through checkout. It can be used in combination with uc_payafter to have users create go through regular checkout without paying, and then pay later once a shipping quote has been submitted by a store administrator.
Download uc_manual_shipping-6.x-1.0.tar.gz

uc_payafter duplicates the checkout process and allows users to perform payments on their orders after checkout at the URL cart/checkout/pay/$ORDER_ID. Store administrators can email users different invoice templates after payment.
Download uc_payafter-6.x-1.1.tar.gz

Update 2011-06-08: A user in the comments, Moises, has pointed out that in the 6.x-1.0 release of uc_payafter there was a typo that would prevent users from being able to select the request shipping invoices in the conditional actions configuration. I have updated uc_payafter below to fix this bug.

Update 2011-11-08: uc_payafter has a new home! I have created a Drupal Sandbox project for the code here. Once I have the chance to work on the code a bit more, I will promote it to full project status and update the download links in this post.

Comments

r u planning on committing these to d.o?

I am, although I would like to put them through a bit more rigorous testing first when I have the time. In about a month hopefully I'll setup a projectpage on drupal.org for these and submit bugs to Ubercart as well for some of the workarounds I make in the code.

Thanks so much for working on this!!

I'm going to try testing it on a development snapshot this evening. Any feedback I have, I will be in touch.

If you need any additional help, let me know.

Hi All,

I'm kind of new to drupal and wanted to know if this fix is correct.
I had an issue selecting the template in ca. after looking at uc_payafter.module, I found this function on line 144:
function custommod_uc_invoice_templates()

after changing this function to:
function uc_payafter_uc_invoice_templates()
it seems to work.

Thank you for pointing this out, you're right - on my development machine I originally coded the module under "custommod" so I must have forgotten to replace this function name. Good catch!

wel, I must thank you for this great contribution which i am sure saved lots of time for 100s of guys. The only 1 issue i am facing i really dont know how to make it working,

I installed and actiaved both of the modules but really dont know how to utilize them as i did not see anything related to this anywhare in the admin, but just an option for the manual shipping to assign it a name, where to use it and how to use it have no clue.

According to the readme file, i am moving ahead but really dont know how to assign this to the product so a product using this manual shipping quote and at the time of checkout the user and the admin gets an email and the checkout process resumes as the admin quote for a price and user move ahead to complete the order.

Me and lots of more will love to see your few lines input over this issue.
Thanks in advance.

Regards.

Apart from the setup mentioned in the README file, there is no additional configuration needed (ie, you won't find any module configuration options through the Drupal interface). Most of the setup work required is just getting the template files in place which is outside of Drupal's control.

If you have installed the modules and setup the template files, then all you should have to do now is configure the appropriate invoice template in the Ubercart conditional actions interface. After this is complete, the workflow is like this:

  1. Customer check out, they get a confirmation email and you get a notification email
  2. You must edit the order and change the "Shipping" line item (this label is configurable). Once finished, at the bottom select the checkbox to notify user of updated order status to send them the email with the updated shipping quote.
  3. They will either accept and pay via uc_payafter, or decline the order and it will be marked as cancelled.

Hi There,

I must thank you for the prompt reply that really worked for me to configure everything properly.

What’s the main issue i am facing now is that i don’t get any of the order / checkout completion email nor any email message over the Order Updation from the admin to the customer. However i can see a new line of shipping at the order when i am going to edit the order manually from the admin and i can apply the shipping manually which updates the order but no email notification to admin or customer.

I only get one way to email the customer is, to send them an invoice manually, but i don’t see any of the payment ( payafter ) link over there which I am sure is not the proper way to make this working as this should work on order / checkout completion from the customer from front end and Order Updation on backend so the customer gets the email having the PayAfter link to continue and pay to complete the order.

Okay I guess i am making it longer, so the bottom line is what is the issue that there is no email / notification however the notifications are enabled and everything is fine.

Also I am sure that, at the checkout process the customer will never be redirected to the PayPal Page( as i am suing PayPal as a Payment gateway) unless the quote is manually sent to the customer and he agree to move ahead and complete the order using the PayAfter link included in the email sent by the admin over the order updation from the back end.

Just looking your few line expert opinion from your end.

Thanks in advance, I appreciate your hard time to help.
Regards.

I was notified of a bug in uc_payafter-6.x-1.0 that could cause the problem you're describing - I have updated the main link above since for version 1.1... If you're not using it already, please try updating. I didn't make any changes except to the source files so all you have to do is re-upload the module to your site (and possibly clear the cache).

Thank you for your valuable input. But i am using the latest package.

The only confusion is still there and i am sure lots of guys will be having this, How i can assign this to any specific Product as i dont want all of the items should have the same manual shipping quote, as we all know there is no interface for this but at least there should be a way to assign this to any specific product, for example if i want to assign this shipping method to Product A then how we will move on with that ?

Also I have done everything according to your instructions, I also get an extra line of Shipping in the Order updations interface.
Also the process of the order placement should be :

"At the checkout process the customer will never be redirected to the PayPal Page( as i am suing PayPal as a Payment gateway) unless the quote is manually sent to the customer and he/she agree to move ahead and complete the order using the PayAfter link included in the email sent by the admin over the order updation from the back end."

I hope you will put your expert and valuable input over this.
Thanks in advance.

Unfortunately, in its current state you are not able to assign the "pay after" functionality to specific products. All the module does is create a secondary, site-wide checkout process that you can take advantage of. You will need to write some additional code in order to have it apply to only specific items (as far as I know, at the moment this will be very difficult to implement because you Ubercart does not support setting the shipping method per-item within an order).

Hi,

I would appreciate to know more details about the state of the module, if there is any new. I have the same problem mentioned before: "I don’t get any of the order / checkout completion email nor any email message over the Order Updation from the admin to the customer." I also can see the aditional new shipping line.

Any solution related to it?

Thank you

There has not been any new releases apart from the update to uc_payafter listed in the original article. I will try to perform some additional testing soon to verify that everything is still working.

Have you performed the instructions listed in the README file for copying the invoice templates to your theme directory?

..on how to get a customer to check out without their card being charged?

I ran one test and the card was charged so there was no opportunity to add a shipping quote before the order was processed.

I turned off the option to process a credit card during check out and that sorta worked. I was able to checkout without the card being charged. I could then add a shipping quote and use the pay after link to complete the order. However, once the user completes the pay later form, the card has to be manually processed.

Is there any way to not collect credit card info during the initial checkout? Or to make it process automatically after they receive their quote and pay via the pay by later link? It'd be great to not collect any CC information until in the pay after checkout flow. As you're probably aware, Drupal doesn't store the whole CC # so users have to enter their cards twice.

If your module isn't currently supporting these features, you may be getting some revised code from me shortly. I'll need this functionality and if it's not there, I'll probably be building it in to your current modules.

Hi Sean,

This is possible by modifying the checkout pane preferences for the regular and payafter checkout. Simply disable the payment pane during regular checkout and enable it for the payafter checkout process and then Ubercart should only ask & process credit cards during the payafter checkout process. However, please note that I did not do any additional testing on card processing apart from a payment gateway that I had developed internally... This should work for any credit card gateway, but I have not tested with gateways such as Authorize.net or PayPal.

Regards,
Stewart

Stewart,

I figured that out after some playing around with the modules.

One bug I found was when you go to pay after a shipping quote has been supplied, the cart contents pane is empty because it's checking the user's current cart, not the products in their order. I'm going to try to put together a pane that will display the products and a sub-total for an order to use on the pay after page.

If it helps, I might write up some help text/documentation, too? I think you have a lot of solid functionality and it just needs a little guidance to get people pointed in the right direction.

Thanks for the modules!

-Sean

Hi Sean,

That would be great! I would be more than happy to apply those patches. The site for which I originally wrote this module for did not require a cart contents pane on payafter checkout, but this is feature I can envision many users wanting.

It should be fairly straightforward to achieve as well; I would start by copying the core Ubercart code for the cart pane, then rename it and strip out all references to the cart so that it can retrieve the product information from the uc_order_products database table instead. If there is an $order object readily available in that code (I suspect there will be), you can use $order->products to do this easily. If $order->products isn't present, then be sure to call uc_order_load() to get the product data loaded into the object.

Cheers,
Stewart

Hi,
any updates on populating the cart content pane ?
I know a fair bit of php but not very conversant with drupal; so where would the code for showing the cart pane content go?
thank you for the great module

These modules sound like exactly what we need! The only problem is we're on Drupal 7.15 and Ubercart 7.x-3.2. Is there any word on if/when these will be ported? If I knew any programming I would help. I wish I could! Thank you so much.

Any chance this module could be update for drupal 7? I have searched all over and it looks like I am not the only one seeking this functionality but there are no solutions for this on D7 & Ubercart 3x

Fortunately, somebody has sponsored the development of uc_payafter on 7.x and it will be released shortly. Keep an eye out on the project page!

Hi there!
I recently wrote you on ubercart.org forum. I looking the modules for payafter for D7. Im not a code geek. Can you help me. I dont have lots of cash but ...

Thank you for these modules !

Can you confirm that they are OK to use on live shop ?

No bug reported ?

Thank you a lot again !

Hi,

While I have been using them for a little while now on a 6.x install, please test them thoroughly in your setup before going live. I have not yet had any problems with them, but that doesn't mean necessarily that there aren't any!

Regards,
Stewart