Adding partial payment functionality in ubercart module

modmaker - October 7, 2009 - 13:15

Hello,
I am trying to create a module for ubercart that will allow partial payments, a kind of, booking a product/ service. Presently with ubercart, one is required to pay the full amount to buy a product or service. There is a recurring fee module but that is not what I am after. In my scenario where the product or service is costing more than 10000USD, customers may prefer to pay a partial amount as booking and pay the rest in person.

Approach:
--------------
The way I am trying to achieve this by a custom module for ubercart which will allow the admin to enter two prices. One is the full product price (already in ubercart) and another one new price box (created by the custom module) that stores the partial payment (booking price) in a new database table. So far I have managed to get an additional button "Make partial payment" on each product besides add to cart button. I have used a form_alter hook in 'add to cart form' to modify the submit handler of add to cart form so that I can detect which button is clicked. ("add to cart" or "make partial payment").

The problem:
------------------

The problem I am facing is that I cannot add the products to the cart with partial payments. When I call the function Uc_add_to_cart, it reads the original product price (sell price ) and i dont find a way to change the value to my partial payment value.

I tried using sessions and tried an "if" clause in hook_nodeapi to check if the price to be loaded is sell price or partial price. But the idea is bit clumsy and does not work out well.

I am looking for:
----------------------

I am looking for a solution which enables me to set the sell price of the product dynamically in node load so that I can add the product to cart with partial amount. If there is any other solution for the same, I am willing to try that.

Thanks in advance for your help.

I'm pretty sure...

PepeMty - October 7, 2009 - 13:47

...it would be better if you post this at ubercart.org.

Although the uberdudes do check the threads here at DO, ubercart issues are better followed at their own site.

Warm regards from sunny México!
Pepe
:-)

Did you find a solution? (Need Help TOO)

valdesma - November 27, 2009 - 21:19

I am looking for a solution (either a module or a workaround) that allows me to accept a downpayment so the user can pay the rest in person.
I tried recurring and set the events to 1 but since I am only using paypal, there is a restriction on regards to only be able to create one product with recurring payment per cart, and I want to take a part of the total...

A workaround would work wonders as I need the functionality to launch my site

Thanks for the help

 
 

Drupal is a registered trademark of Dries Buytaert.