Download & Extend

Ubercart Userpoints Port to Drupal 7

Project:Ubercart Userpoints
Version:6.x-2.x-dev
Component:Miscellaneous
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

Hello,

Ubercart looks to be making headway towards a D7 version #696816: Drupal 7 Port Mega-issue
I was wondering if someone would be able to port this awesome module to D7 to be tested in alpha 2?

Thank you very much in advance!

Regards

Comments

#1

+1 subscribing - I really need this module to move to D7 as well.
Already testing D7 alpha 2 =)

#2

Title:Port to Drupal 7» Ubercart Userpoints Port to Drupal 7

betz & bmagistro - I was wondering if you would be able to kindly look into D7 version of this module?
Great module! Thank you for your hard work

#3

Hey Trupal218 and yaz085.
I won't look into a drupal7 port very soon, because i firstly will rewrite the d6 version.
The d6 version is quite bad code to be honest, and i made the decision to rewrite it firstly before we go on.
Think it will be the best way.

Anyone willing to help with the rewrite of the d6 version is offcoarse always welcomed ;)

#4

Status:active» postponed

#5

thanks betz! i look forward to following your work!

#6

Hi if help is needed rewriting D6 I would be willing to contribute. I have a fairly nasty bug right now that keeps this from working with Authorize.net (but works fine with test gateways) and will be digging into the code very soon.

#7

hi betz

i'm available to help with testing when you begin rewriting the module
please let me know when a version becomes available

thanks!

#8

NANERPUSS - I was wondering if you had the opportunity to work on fixes bugs in D6? Thanks!

#9

Subscribing

#10

This may sound rude, but...

Don't you think you should FIX the 6.x version before committing to the 7.x version? There are LOTS of problems with this module and it would be nice to get a working version for the current release.

I'm currently trying to get this module working, but if you don't answer our bug reports ( some are VERY stale ) but you say you're working on a 7.x version... that doesn't really sound to helpful.

#11

@bsmith451 - yes your post probably was rude since you did you even read the issue first, the maintainer postponed this issue and said they are still working on D6 in #3.

#12

yaz085
Turns out the 'bugs' were the fault of Authorize.net. Seems like a lot of potential issues can be solved by getting yourself a developer account and testing from there.

#13

Well, I think/hope that D6 is at a point where most of the bugs are resolved. I am waiting on confirmation on two still that I want to have a path forward/answer to before moving on. I am also thinking D7 will be a complete rewrite to clean up several things and bring in some new features. What I am wondering is if people would rather have a D7 release or keep tweaking and adding features to D6?

#14

It seems like it will be awhile until many other modules make it to D7 to allow many Drupal sites to make the move.
It would be great if we could see further work on D6 I think. Or is there a chance the newly rewritten D7 version be backported to D6? Thank you!

#15

I am agree with yaz085, it will take at least a good year before drupal 7 really works with port of modules.

#16

Subscribing

#17

subscribing

#18

subscribing... Newbie to Drupal, hope you can get this module up for v7, it's the last piece I'm needing for a web solution... Thanks!

#19

+1

#20

Status:postponed» needs review

Hi,

Attached is a patch against the (latest) 6.x-2.0-beta2 version, porting the entire package to
- Drupal 7.0 (several changes)
- Ubercart 3.x (just did a hook renaming)
- Userpoints... (v1 , v2?) I got no errors whatsoever so I guess it's v2?

I processed the package using Coder at first, then I had to make manual changes to port the database queries.

I don't have a way to do a proper testing of this. Please review the patch, apply it and test it in an isolated environment, things WILL break at first, this is very unstable code.

However, payments and product are kinda working, so I think it won't take long to debug and release a D7 version.

Will be looking forward to your comments, HTH

AttachmentSize
userpoints_ubercart.d7port.731026.20.patch 103.42 KB

#21

Great job mariano.barcia -- will test and see what could be fixed. I was going to start a port of my own this week, but I'll try and work of this one. :)

#22

Hi all,
Attached you will find the module folder in a ZIP archive, as I have it "working" on my installation. Hope this helps, salud

AttachmentSize
userpoints_ubercart-D7.zip 26.42 KB

#23

thx mariano!

#24

any reviews on that patch for 7 ? how is it?

#25

Hi,

I got uc_userpoints_product.module working, so I'm sending the attached zip with the files as I have them in my install.

I had to introduce modifications to the way it added or updated a product feature to the DB. I think it inserted new pfids on updates, but I didn't have time to verify the D6 version, I just got the D7 working on my install.

For those who had the previous version, just download this new one and overwrite the previous version. There's no need for an upgrade since the product module didn't work at all when I tried it, so I guess this new version is all goodness :-).

AttachmentSize
userpoints_ubercart-D7-May27.zip 26.56 KB

#26

@ #25

http://************/admin/store/reports/sales-points:
Fatal error: Call to undefined method DatabaseStatementBase::extend() in /home/magicfoc/domains/magicfocus.ru/public_html/sites/all/modules/userpoints_ubercart/uc_userpoints_seller.module on line 102

#27

The module uc_userpoints_seller from #25 seems not to be working because conditional actions module was removed from Ubercart. I am now working on the uc_userpoints_seller module to make it up-to-date.

#28

Here's the module with fixed uc_userpoints_seller for D7.
I also need to note that functional of seller module could be added via just Rules module. (But, when I tried, I get some strange fatal error in entity.wrapper.inc - more info here: http://drupal.org/node/1178746)

AttachmentSize
userpoints_ubercart-D7-June4.zip 27.07 KB

#29

Several new features in uc_userpoints_seller.module:
* You can now choose types of products which authors you want to award with userpoints
* You can now select the category of awarded userpoints
* You can now customize the transaction comment, and tokens can be used in these comments

If you already installed the version from my previous archive, please don't forget to activate module rule in Rules! In this version it is active by default.

AttachmentSize
userpoints_ubercart-D7-June4-01.zip 27.66 KB

#30

I've been testing #29. I get the following error when I checkout using the test gateway ( purchasing points ) ...

Fatal error: Call to undefined method EntityValueWrapper::getIdentifier() in /home/common/drupal/sites/all/modules/userpoints/userpoints_rules.module on line 52

Everything is current. Rules module is active. I'm new to this module and user-points so I can't be of much help. But I'll keep testing. Let me know if I can provide any more info - or if I've forgotten to do something obvious!

#31

I thought everything was updated but there was a newer version of Entity API that fixed this problem. Everything looks like it's working really well! Thanks.

#32

Will this be formally released in July?

#33

Just installed the last version(#29) and getting the following error:

Error message
Notice: Undefined variable: curUserId in include_once() (line 219 of /home/clients/websites/w_shpic/public_html/shpic/sites/all/modules/userpoints_ubercart/uc_userpoints_award.module).
Notice: Undefined variable: refUserId in include_once() (line 249 of /home/clients/websites/w_shpic/public_html/shpic/sites/all/modules/userpoints_ubercart/uc_userpoints_award.module).
Notice: Undefined variable: curUserId in include_once() (line 219 of /home/clients/websites/w_shpic/public_html/shpic/sites/all/modules/userpoints_ubercart/uc_userpoints_award.module).
Notice: Undefined variable: refUserId in include_once() (line 249 of /home/clients/websites/w_shpic/public_html/shpic/sites/all/modules/userpoints_ubercart/uc_userpoints_award.module).

#34

When I add an item to my cart that is assigned userpoints, and when I click checkout, I get this error thrown at me

Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain() (line 1476 of /var/www/undiscovered/includes/bootstrap.inc).
Recoverable fatal error: Argument 2 passed to t() must be an array, null given, called in /var/www/undiscovered/modules/userpoints_ubercart/uc_userpoints_product.module on line 281 and defined in t() (line 1406 of /var/www/undiscovered/includes/bootstrap.inc).

This is using #29, on 7.0

#35

Everything seems to be functional, but i am getting errors/notices all over the place:

Notice: A non well formed numeric value encountered in uc_currency_format() (line 997 of C:\xampp\htdocs\drupal\sites\all\modules\ubercart\uc_store\uc_store.module).
Notice: A non well formed numeric value encountered in uc_currency_format() (line 997 of C:\xampp\htdocs\drupal\sites\all\modules\ubercart\uc_store\uc_store.module).

#36

sub

#37

subscribing! This is the only thing holding me back from a site move to D7

#38

subscribe

#39

Hi I installed the latest "userpoints_ubercart-D7-June4-01.zip" and when I proceed to checkout the page just died. It's a almost-blank page with my site name, and a "Checkout" word on the page. After disabling this module, the checkout page just turned back to the original correct one. Any help or fix?

#40

had the same problem as #39. It might have something to do with the store>configuration>store settings I noticed when i selected points as payment option via the points configuration settings my pricings disappeared from my current products, though in the actual store settings there doesn't seem to be a way to designate points as a payments option at all, it just asks for the currency format (USD, EUR, ect). Thanks for all the hard work into trying to port this project to 7! subscribe!

#41

sub

#42

Subscribing

#43

Subscribing!

#44

Category:task» feature request

Subscribing

#45

Thanks for posting - I just installed and will start looking at it.

It looks like there may be a mismatched paren at line 214 in uc_userpoints_award.module which is causing some of the error messages cited above.

I was getting a complaint about USERPOINTS_AWARD_CATEGORY in uc_userpoints_award.module until I added

define('USERPOINTS_AWARD_CATEGORY', 'userpoints_award_category');

at line 10. I just guessed about what would be a good value. Will see if it burns me later.

I'm looking at the "Notice: A non well formed numeric value encountered in uc_currency_format() (line 866" problem - evidently the string "[Points branding name]:[number of points]" is being passed instead of a numeric value. I'll see if I can find out why....

Looks like the problem is in uc_userpoints_payment.module in lines 136-140. $node->content['display_price']['#value'] expects a number but it's being passed a string complete with HTML formatting.

#46

Subscribe

#47

@legendm33066: have you noticed the green "Follow" button in the upper-right corner here? Use that if you only want to "subscribe" (ref. "Stop subscribing, start following": http://drupal.org/node/1306444 )

#48

Anybody knows what's the status on this? i wanna help....

#49

Oh I know that but I am just used to subscribing :) Will remember that next time

#50

Subscribing

#51

Recently upgraded to

Drupal 7.9
Rules 7.x-2.0
ubercart 7.x-3.0-rc2
userpoints 7.x-1.0

Sad to report that this seems to completely break the D7 patch, which until now has been working well. The order remains pending and no user points get assigned.

I noticed that the Rules module reported problems on its upgrade - and I think this may have something to do with it. The log error messages ( issued by rules ) where

The reaction rule Update order status on full payment (uc_payment_received) fails the integrity check and cannot be executed. Error: Unknown condition uc_payment_condition_order_balance.

The reaction rule Complete non-shippable order after payment received (uc_checkout_complete_paid) fails the integrity check and cannot be executed. Error: Unknown condition uc_order_condition_is_shippable.

The reaction rule Notify customer when a role is renewed (uc_role_notify_renew) was marked dirty, but passes the integrity check now and is active again.

The reaction rule Notify customer when a role is renewed (uc_role_notify_renew) fails the integrity check and cannot be executed. Error: Data selector expiriation for parameter expiration is invalid.

Anyone any idea on what needs to be done to fix this up?

EDIT: Fixed Itself! I think some of the errors listed above come from deprecated D6 stuff that might still be hanging around in the patch, but had no significance. Visiting the rules and resaving them seemed to help. I guess things just got a bit confused in the updates.

#52

Hi guys,

I'm having trouble getting this to work for my D7 Ubercart site, and I'm using Drupal 7.9, Rules 7.x-2.0, Ubercart 7.x-3.x-dev (2011-Dec-01), and User Points 7.x-1.0 (along with the D7 port of this module in comment #29). When trying to "Review Order" in my checkout page, I encounter the following error message (white page with the error message) at this page /cart/checkout/review:

Fatal error: Cannot pass parameter 3 by reference in E:\htdocs\URL.com\sites\all\modules\ubercart\uc_cart\uc_cart.pages.inc on line 343

I'm also encountering the following errors throughout the site:

Notice: Undefined variable: curUserId in include_once() (line 219 of E:\htdocs\URL.com\sites\all\modules\userpoints_ubercart\uc_userpoints_award.module).
Notice: Undefined variable: refUserId in include_once() (line 249 of E:\htdocs\URL.com\sites\all\modules\userpoints_ubercart\uc_userpoints_award.module).

I'd like to offer a $50 bounty if you could help me to get the errors fixed and get this module working perfectly on my site.

#53

I think this module has to get a rewrite from a ground up for D7. I've posted a topic here, so if anyone would like to share the costs to have a developer to develop this for us, feel free to contact me and let me know.

#54

Status:needs review» active

hi all when i try to checkout with points it gives me a blank page

nobody click here