Closed (fixed)
Project:
UC Purchase Order
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
15 Sep 2011 at 15:40 UTC
Updated:
14 Dec 2016 at 08:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
samgreco commented+1
Comment #2
zincdesign commentedI would really be interested in a D7 port. I'd be will to pay. Can anyone help?
Comment #3
demma10 commentedI 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.
Comment #4
seanrHere'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.
Comment #5
Pedja Grujić commented@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
Comment #6
Pedja Grujić commentedAttached 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
Comment #7
demma10 commented+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.
Comment #8
zincdesign commentedHi 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).
Comment #9
demma10 commentedI've re-rolled the patch to fix the error message reported by @zincdesign.
Comment #10
philpro commentedDemma10, 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.
Comment #11
demma10 commentedThanks philpro. I've re-rolled the patch from comment #9 to include the fix for error reported in comment #10.
Comment #12
kmhanser commentedI 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....
Comment #13
kmhanser commentedOk, 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
Comment #14
demma10 commentedI've started an issue to discuss what to do with this module for Drupal 7. The issue is here: http://drupal.org/node/1564986
Comment #15
vinoth m commentedComment #17
vinoth m commented