Comments

samgreco’s picture

+1

zincdesign’s picture

I would really be interested in a D7 port. I'd be will to pay. Can anyone help?

demma10’s picture

StatusFileSize
new12.06 KB

I need this module for two of my sites so I've started the port to D7 for this module. The attached patch should make this module work in D7 but it needs a lot of testing.

This patch was rolled against the master branch of the git repository, which appears to be the 6.x-1.0 version of this module. The patch won't work against the 6.x-2.x version.

seanr’s picture

Version: 6.x-1.0 » 6.x-2.x-dev
Status: Active » Needs review
StatusFileSize
new5.52 KB

Here's a 7.x port of the 2.x branch. Sorry no patch since I wasn't working off a git checkout, but I can do that later if necessary.

Pedja Grujić’s picture

@seanr

we got your port and for most part it works, some issues when trying to do a search, I think you are using d6 db_fetch_object() which is not used in d7.

Second issue we encountered is when editing an order it gives error "Fatal error: Cannot use object of type stdClass as array"

We will try and fix and post back our fixes. Hoping to have it done this week.

Maybe you should start a d7 version and we can contribute.

Thanks

Pedja

Pedja Grujić’s picture

StatusFileSize
new4.28 KB

Attached is D7 port provided by seanr.

We fixed issues with Search by PO option and Edit option.

Replaced deprecated d6 db_fetch_object while loop with d7 foreach loop to fix the search.

Please review and if there is interest in this module we can start a d7 port branch.

Thanks

Pedja

demma10’s picture

StatusFileSize
new25.83 KB

+1 for interest in this module. I actually need this functionality for our online store, most of our customers use purchase order numbers which then need to appear on the invoice.

I've taken the zip code provided by pgrujic and rolled it into a patch against the 6.x-2.x branch of the git repository. I haven't had a chance to test this code yet as my test site uses the 1.x branch not the 2.x branch.

zincdesign’s picture

Hi have tried the patched version and at the checkout screen, i am getting the following error. Its still seems to work though!

Notice: Undefined property: UcOrder::$po_number in uc_payment_method_po_form() (line 339 of /home/******/public_html/******/sites/all/modules/uc_po/uc_po.module).

demma10’s picture

StatusFileSize
new26.05 KB

I've re-rolled the patch to fix the error message reported by @zincdesign.

philpro’s picture

Demma10, I got an error message undefined variable 'methods' in function uc_po_uc_payment_method() {

Looks like the $methods array needs to be set before the conditional statement in case the statement evaluates to false.

demma10’s picture

StatusFileSize
new26.92 KB

Thanks philpro. I've re-rolled the patch from comment #9 to include the fix for error reported in comment #10.

kmhanser’s picture

StatusFileSize
new14.06 KB

I needed this functionality for a site I was working on too; didn't see anything on the project page about D7, so I did a port of the 6.x-1.0 version. I didn't realize anyone else was doing anything on this, since the project page said "no further development", so I took the 6.x-1.0 version and ported it to D7 today. Guess I should have checked here first as I see ppl have already been working on the D7 port of the 2.x version. (I used 1.0 as my start for the port because the 2.x seemed to be in development still, and I figured I'd start with something that was working since this was my first attempt at a D6 -> D7 port)

Anyway, here's a port of 6.x-1.0 to D7 if anyone is interested. I've tested it out on the site we're getting it ready for and it seems to be working. Requires views now for the "search by po" functionality from the admin interface. If anyone's interested in this please check it out and let us know if you find any bugs, or if you have any suggestions on how to better do anything :)

-kevin hanser
Energy Web Design
http://energywebdevelopment.com

edit: might not quite be ready, I just ran into an AJAX error during final testing; seems it's calling my hook_uc_order with an $op of save when I change the payment type to purchase order. Causing a sql constraint violation... interesting....

kmhanser’s picture

StatusFileSize
new14.34 KB

Ok, I think I may have worked out those remaining bugs; new version attached.

EDIT: since my port is based on the 1.0 branch, I created a new thread for it, further updates can be found here: http://drupal.org/node/1526056

demma10’s picture

I've started an issue to discuss what to do with this module for Drupal 7. The issue is here: http://drupal.org/node/1564986

vinoth m’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

  • Vinoth M committed f52772f on 7.x-1.x
    Issue #1280502 by pgrujic, seanr, Vinoth M: Drupal 7 port
    
vinoth m’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.