First of all, sorry for my english.
Hi everybody, I have been looking into the code of ubercart marketplace and ubercart, and finally I made a good copy paste (and editing some things) and solved the problem of the masspay made by the admin instead of done automatically.
Here's the file i modified: "uc_paypal.pages.inc" (I converted it into .txt in order I can attach it to this post)
Explanation:
When a user makes an order and pays with PayPal or does ExpressCheckout with PayPal and the system redirects him to "checkout/complete" the added code starts to work and makes masspay for all the orders done before that one. (Newest order not included)
Problems:
I did it for my webpage, I only use PayPal, and so I avoided all the verifications for the manual payment.
Things I will change:
I want to include also the latest order and maybe put the code in another place.
Lines in the new file that are new:
551 to 606
623 to the end of the document.
Version of the modules I used:
Drupal 6.17
Ubercart: 6.x-2.4
Ubercart Market-place:6.x-1.0-beta1
File:
The file is in "modules/ubercart/cart/"
I used the code from ubercart-marketplace.
I hope this will help somebody, I will report the changes I'm going to make.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | uc_cart.pages_.txt | 25.52 KB | rafinskipg |
| uc_paypal.pages_.txt | 17.63 KB | rafinskipg |
Comments
Comment #1
rafinskipg commentedTHE CORRECT FILE HERE!!
Somebody can help me, please?!
I don't understand drupal's execution very well, so i can't imagine what the hell is happening.
Where is going when finishing the execution of the function uc_cart_checkout_complete() {...} in the uc_cart-pages.inc ???
I need to call again the function, but i don't know where, i can't call it in the uc_order.ca.inc...
And Sorry I attached a bad file: This is the good one: UC_CART.PAGES.INC
-- I'll continue editing things
Comment #2
rafinskipg commentedIf somebody could help me telling me were to put that code instead of "uc_cart.." I'll be very gratefull
(I don't know if it is said like this)
The FUNCTION is called : make_masspayment_customized();
Comment #3
rafinskipg commentedComment #4
rafinskipg commentedIn uc_order.ca.inc
IF you have followed this post, now you can see a thing: If you put this two lines where you want to execute the masspayment, It will be correctly done:
You can try to put the "make_masspayment_customized" function in other place instead of uc_cart.pages.inc.
Now it's working for me, I leave all this code here for future implementations of the automatic masspay.
Comment #5
rafinskipg commentedGot it.
It works :
function mp_reports_make_masspay($form_state,$sellers) {>
Comment #6
tajindersingh commentedHey cool, thanks for sharing.
Comment #7
shunting commentedThanks!
Has this been tested on any sites? I'm curious, because I don't want my site to be an intermediary in the payment process at all. However, executing Mass Pay immediately after any payment would be a workaround, and I think that is what these functions do. Thanks again!
Comment #8
rafinskipg commentedThis code hadn't been tested.
I used in my page, but i cannot remember if it is the best way of doing it.
Nobody in the Ubercart Marketplace project has "examined" this code, and they should do that things..
Comment #9
Yuri commentedI'm willing to test the code, but it is not based on the latest marketplace dev version, which appears to have multiple submodules, i.e. for the mass payment too.
I'm happy to pay for a patch to make this work on the latest dev version of Ubercart Marketplace. Please contact me, I have a site that needs it now.
Comment #10
HJulien commentedWas the testing completed? Could someone provide a status on this please?
Comment #11
moonshdw8 commentedDoes anyone know if this issue has been attempted/solved for Drupal 7?
I want to do this exact thing for 7 but I don't want to commit the time into trying this solution if 1) I'm not sure if it would be compatible or 2) someone already addressed this for 7.
Comment #12
nyleve101 commentedHi moonshdw8,
I was using the Paypal Adaptive Payments to automatically split payments and take commission as the sales are made for D6 Marketplace.
The module has been ported to D7, I haven't tested the d7 version yet but here's the link http://www.ubercart.org/project/uc_adaptive_paypal?page=1#comment-69773