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

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

YK85’s picture

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

YK85’s picture

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

betz’s picture

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 ;)

betz’s picture

Status: Active » Postponed
Bilmar’s picture

thanks betz! i look forward to following your work!

Anonymous’s picture

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.

YK85’s picture

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!

YK85’s picture

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

BenK’s picture

Subscribing

bsmith451’s picture

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.

univate’s picture

@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.

Anonymous’s picture

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.

bmagistro’s picture

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?

YK85’s picture

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!

MasterChief’s picture

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

danielm’s picture

Subscribing

shadowmihai’s picture

subscribing

eMathGuy’s picture

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!

hendrakieran’s picture

+1

mariano.barcia’s picture

Status: Postponed » Needs review
FileSize
103.42 KB

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

orendain’s picture

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. :)

mariano.barcia’s picture

FileSize
26.42 KB

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

kimlop’s picture

thx mariano!

patoshi’s picture

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

mariano.barcia’s picture

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 :-).

Aracon’s picture

@ #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

Aracon’s picture

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.

Aracon’s picture

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)

Aracon’s picture

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.

indigoblue’s picture

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!

indigoblue’s picture

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.

BarwonHack’s picture

Will this be formally released in July?

simonswiss’s picture

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).
mattlowe01’s picture

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

avishking’s picture

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).

Andy B’s picture

sub

MPankau’s picture

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

NathanM’s picture

subscribe

Jeffrey C.’s picture

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?

sir spliff’s picture

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!

mefisto75’s picture

sub

Taxoman’s picture

Subscribing

Quarantine’s picture

Subscribing!

j_smits’s picture

Category: task » feature

Subscribing

eric_marsh’s picture

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.

Jeffrey C.’s picture

Subscribe

Taxoman’s picture

@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 )

super.._..’s picture

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

Jeffrey C.’s picture

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

tsaks’s picture

Subscribing

indigoblue’s picture

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.

Quarantine’s picture

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.

Quarantine’s picture

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.

jdbener’s picture

Status: Needs review » Active

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

Jere Toivanen’s picture

Fix for ubercart payment by points:

I did have this error message on blank page, when going to checkout:

Fatal error: Cannot pass parameter 3 by reference in /home/xxxxxxx/domains/xxxxxxxxxx.com/public_html/xxxxxxxxx/sites/all/modules/ubercart/uc_cart/uc_cart.pages.inc on line 401

FIXED IT: open file /sites/all/modules/ubercart/uc_cart/uc_cart.pages.inc, and find line 401, change word "NULL" to word "$null".

This worked to me and now I can pay with points.

Btw, thanks to developers for this module! its great!

EDIT: sorry for comment, problem came later again (maybe becouse of new settings???) but when i changed the line back to "NULL", it worked again.

jdbener’s picture

Title: Ubercart Userpoints Port to Drupal 7 » Code!
Component: Miscellaneous » Code
FileSize
20.07 KB

hay all this is some code i've added a few changes to! this only includes the payment, discount, and product modules. :( i couldent find what was worng with the others! :( NOTE: it worked on my system it might work on yours! :)

Jeffrey C.’s picture

Title: Code! » Ubercart Userpoints Port to Drupal 7
Category: feature » task

I suppose the title should be clear and understandable.

Jere Toivanen’s picture

Tested: i got errors by enabling discount module:

Notice: Trying to get property of non-object funktiossa uc_line_items_calculate() (rivi 50 tiedostossa /home/xxxxxxxx/domains/xxxxxx.com/public_html/xxxxxxx/sites/all/modules/ubercart/uc_order/uc_order.line_item.inc).

Warning: urldecode() expects parameter 1 to be string, array given funktiossa uc_userpoints_discount_uc_order() (rivi 207 tiedostossa /home/xxxxxxx/domains/xxxxxxx.com/public_html/xxxxxxxx/sites/all/modules/userpoints_ubercart/uc_userpoints_discount.module).

Notice: Undefined property: stdClass::$quote funktiossa uc_userpoints_discount_uc_order() (rivi 212 tiedostossa /home/xxxxxxxxx/domains/xxxxxxx.com/public_html/xxxxxx/sites/all/modules/userpoints_ubercart/uc_userpoints_discount.module).

jdbener’s picture

Component: Code » Discount

i'm not sure what is worng but as my mentor tuought me when in dought disable the error! so i would recemend that you put a @ in front of all the errors. i also didnt very thoughly test the discount module becuse i don't activly use it in my site! you can see an example at http://tutorials64.net

nyleve101’s picture

Hi,

I stumbled across this module http://www.ubercart.org/project_project/ubercart_userpoints_invite_rewar... if this module is ported to D7 could it be included as a submodule?

bhans@zoominternet.net’s picture

I get the following error when attempting to edit the checkout configuration:
Fatal error: Cannot pass parameter 3 by reference in /xxxx.../ubercart/uc_cart/uc_cart.admin.inc on line 320

There is no pane to apply points in the checkout page.

Userpoints Discount is enabled.

nyleve101’s picture

Hi,

here is a D7 port of this module http://www.ubercart.org/project_project/ubercart_userpoints_invite_rewar.... Perhaps it can be included?

P.S Juan did the hard work I just sponsored

himagarwal’s picture

Has someone got this working?

I want to add points (credits in dollars) to user account manually which can used to make purchase at ubercart store. And, if the credits are low then user can make the payment of remaining amount through paypal/credit card. Can this be done through this module?

himagarwal’s picture

I am getting following errors on cart/checkout page.

  • Notice: Undefined index: ptamt in uc_checkout_pane_uc_userpoints_discount() (line 129 of /home/xxxxxx/xxxxxxx/xxxxxxx/sites/all/modules/userpoints_ubercart/uc_userpoints_discount.module).
  • Notice: Trying to get property of non-object in uc_line_items_calculate() (line 50 of /home/xxxxxx/xxxxxxx/xxxxxxx/sites/all/modules/ubercart/uc_order/uc_order.line_item.inc).
  • Warning: urldecode() expects parameter 1 to be string, array given in uc_userpoints_discount_uc_order() (line 207 of /home/xxxxxx/xxxxxxx/xxxxxxx/sites/all/modules/userpoints_ubercart/uc_userpoints_discount.module).
  • Notice: Trying to get property of non-object in uc_line_items_calculate() (line 50 of /home/xxxxxx/xxxxxxx/xxxxxxx/sites/all/modules/ubercart/uc_order/uc_order.line_item.inc).
  • Warning: urldecode() expects parameter 1 to be string, array given in uc_userpoints_discount_uc_order() (line 207 of /home/xxxxxx/xxxxxxx/xxxxxxx/sites/all/modules/userpoints_ubercart/uc_userpoints_discount.module).
  • Notice: Undefined index: render element in theme() (line 1065 of /home/xxxxxx/xxxxxxx/xxxxxxx/includes/theme.inc).

And in the points discount table in /cart/checkout I see the following things. I applied 6 points to myself (admin) and I was trying to checkout but I see following problem

Enter the amount to discount this order with points by. This field will be ignored if paying with points.
Discountable total from this order: Array
Maximum you can discount the order by: 0
Your points available to use: 0
Liliplanet’s picture

Hi! Using the zip file in #25 receive the following errors:

    Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain() (line 1572 of /home/public_html/includes/bootstrap.inc).
    Recoverable fatal error: Argument 2 passed to t() must be an array, null given, called in /home/public_html/sites/all/modules/userpoints_ubercart/uc_userpoints_product.module on line 275 and defined in t() (line 1478 of /home/public_html/includes/bootstrap.inc).

Prepared to pay bounty for a working version, that is the ability to buy userpoints via ubercart .. most appreciated, thx!

nyleve101’s picture

FileSize
28.14 KB

Juan's patched version works for me.

zeezhao’s picture

@nyleve101 - thanks for the zip. Looks like uc_userpoints_seller.install needs to have uc_up_seller_log table and not uc_up_award_log table. This gave an installation error.

Also: uc_userpoints_seller.module is referring to "orders" table whcih should probably be "uc_orders"

remkovdz’s picture

There are a lot op ZIP-files on this page, most of them having several errors if I understand correctly, which one is safe to use?

Or even better: will this soon be commited as an official release?

jvizcarrondo’s picture

FileSize
28.54 KB

I have made the corrections to uc_userpoints_seller submodule.

Juan

anjjriit’s picture

I found this error in empthy rows

Notice: Undefined variable: rows in uc_seller_history_all() (line 115 of ../sites/all/modules/userpoints_ubercart/uc_userpoints_seller/uc_userpoints_seller.module).
Jeffrey C.’s picture

Hello there!

Thank you all for your contributions! Since 7.x-1.x branch has been created, I'm going to close this issue, please file a separate issue for every bug you experienced. Thanks!

Jeffrey

Jeffrey C.’s picture

Status: Active » Fixed
rebolomo’s picture

Component: Discount » Code

for 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]" warning, here in the uc_userpoints_payment.module, it appends some string:
$node->content['sell_price']['#value'] .= '

' . t('!Points: ' . $pointCost, userpoints_translation()) . '

';

Jeffrey C.’s picture

Component: Code » Miscellaneous

Please post a new issue.

Status: Fixed » Closed (fixed)

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