Any plans on porting this to Drupal 7?

Comments

cayenne’s picture

I've been hiding from D7. My hope is that the improved attribute handling of UCD7 will make this obsolete and that "views" will do the trick. Have you tried that?

I need to take another run at a D7 install and check it out....

cayenne’s picture

Okay, finally got time to do my D7 installation. Yup, looks like we still need this. Good news is it looks pretty straightforward.

Maybe we can drop the dependency on reports while we do it.

mrfreshly’s picture

I needed this for a project I'm working on that is in Drupal 7. So, I migrated it and now have a working Drupal 7 / UC 3 version. If you like, I can post a copy of it. (It's 90% complete but I'll need to polish up my hacking a little before it's ready for public view).

cayenne’s picture

Dude! That is awesome. Yeah, post it. I'll give it a runthrough, polish up my feeble git skills and get a (pre) alpha version up!

It looks like D7UC did not solve our problem, so this is great.

mrfreshly’s picture

StatusFileSize
new10.94 KB

Here is my migrated to Drupal 7.2 version. It has pretty much all the original functionality, tested with Ubercart 7.X-3.0-beta3 / Druapl 7.2. All dated 5/26/2011. I'm not aware of any issues atm.

I'm new to this community. I'll probably do some more additions later and perhaps a port to Commerce since I'll be migrating over to Commerce as it matures.

cayenne’s picture

Okay, cool, it basically seems to be working! I get one error message (notice message).

I'd like to add the buyer's address and break the dependency on the report module in both the D6 and D7 versions.

Now to try it with attributes!

Edit: Yup, that works too!

cayenne’s picture

StatusFileSize
new10.62 KB

I seem to be too stupid to figure out git.

Meanwhile, I have tightened up some code and removed the dependency on report.

The csv and regular report generation code is still very intertwined, but it's better.

cayenne’s picture

Version: 6.x-2.x-dev » 7.x-1.x-dev
Assigned: Unassigned » cayenne
Status: Active » Needs review

Posted to git. Once I switched to linux command line, all was well.

cayenne’s picture

Status: Needs review » Closed (fixed)

Well, nobody is complaining about this!

mrfreshly’s picture

I've been out of town, I'll git the updated version and check it out over the next few days.

Regards,
Chris

mariagwyn’s picture

I just installed, this is a GREAT module! I will get back with test results as I browse, but so far, so good. Might have some feature requests though...

mrfreshly’s picture

StatusFileSize
new10.56 KB

Another update here. Fixes permission hook issue and a few missing attribute errors.

trillex’s picture

Status: Closed (fixed) » Active

Regarding the latest upgrade, I seem to run into an error - but I can't say whether or not it's because of me doing this on a test site

PDOException: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'devnimbus.uc_order_products' doesn't exist: SELECT COUNT(uc_order_products.qty) AS ordcount, SUM(uc_order_products.qty) AS grandtotal FROM uc_order_products JOIN uc_orders ON uc_order_products.order_id = uc_orders.order_id AND uc_order_products.nid = :product_id WHERE order_status <> 'in_checkout' AND order_status <> 'canceled' ; Array ( [:product_id] => 1 ) in uc_who_bought_what_report() (line 43 af dev/nimbus/sites/all/modules/uc_who_bought_what/uc_who_bought_what.module).

devnimbus.uc_order_products does exist and have content (1 order). Any other information required?

I am using it as an event thing, so the product is not shippable.

(Damn, I just saw that this was last updated in 2011. Is there another, more up to date topic?)

end user’s picture

Which version are you trying? Seem the last updated one is April 26 2012 http://drupal.org/node/493436/git-instructions/7.x-1.x

trillex’s picture

I just updated to the latest 7.x.1.x from git and the error is still there. (Though the line causing the issue is now line 42, instead of 43).

cayenne’s picture

Okay, that is very puzzling.
To be honest, I have not seen that come up ANYWHERE
Just to be clear, are you using a prefix or anything, on your table names?

trillex’s picture

Yes, prefix is devnimbus_ - I did, however, port this over using backup and migrate module to a different dev site. I hadn't tried using who bought what on the previous site, though.

cayenne’s picture

Hmmm. I wonder if I screwed up the code so that it does not append the prefix. Can you try it with a database without a prefix, or it it too late for that.

I have to tell ya, I have this nagging fear that that is what happened.

trillex’s picture

I honestly have no idea why I used a prefix this time around, but for this setup, it's too late - deploying soon. If I have some time, I will give it a spin.

trillex’s picture

It's definitely because of the prefix. A quick setup without any prefix worked just wonders.

cayenne’s picture

Oh heck. Okay, that should be a straightforward cleanup, but it's a darned oversight.
Pending that, a quick workaround would be, I suppose, to create a mySQL view (not a drupal "view") with the name of the missing table

I'd SELECT * from [yourprefix]uc_order_products and call it just plain uc_order_products
and do the same with uc_order

Of course, this will trash another site using the same database.

Meanwhile, I will get on the cleanup, or if someone wants to beat me to it and post a patch.....

Michael

trillex’s picture

I'd help since it'd be awesome to have but I wouldn't know where to start, sorry.

JmsCrk’s picture

Some notes on getting this to work with table prefixes.

Use this SQL code for each of the tables listed below to create a MySQL 'view' that replicates each without the prefix.

CREATE OR REPLACE VIEW uc_orders AS
SELECT * from drupal_uc_orders

Tables required:

  • uc_order_products
  • uc_orders
  • uc_zones
  • uc_countries
  • uc_attributes
  • uc_product_attributes

I also found that it has needs the UC Reports module even thought it's not listed as an official dependency, I needed this switched on before I could see the report.

Hannu’s picture

Category: task » bug

Hi.

I got an "undefined variable attrlist" from line 130 of uc_who_bought_what.module.

The message went away when I changed line 130 from

if (!is_null($attrlist)){
to

if (isset($attrlist)){

Hope this helps someone. :)

Hannu

cayenne’s picture

Thanks Hannu.

I realize I am behind on maintenance. Truthfully, I am having trouble with the code repository.

cayenne’s picture

Status: Active » Needs review

Got to git. Got the last rev posted, and now working thru the bugs.
Hmm, looks like the next one is the table prefixing.

cayenne’s picture

Status: Needs review » Fixed

yeah, this works on D7, it seems

cayenne’s picture

Category: bug » task
Status: Fixed » Closed (fixed)