hello

any plans for a Drupal 7 port?
would be great ^^

Comments

This will be done when I have time, and when a usable version of Ubercart 7.x-3.x is available. Apparently, Ubercart 7.x-3.x will also include more Views integration in core, so perhaps best to wait and see what the maintainers decide to include themselves: http://drupal.org/node/960228#comment-3746032

I have recieved the following from the UC crew:

Dear Maintainer,

Ubercart 3.0 is coming close to a Beta release with the Drupal 7.0 final release just around the corner. The alpha3 version is ready for testing with all the modules updated according to Drupal 7 API changes and with all the promised requirements implemented. Rules is integrated, facilitating the ease to work with other modules’ events and actions. More info is available at http://www.ubercart.org/docs/roadmaps/15780/ubercart_3x_road_map.
The Ubercart core modules are upgraded to Drupal 7 using the Coder module and Coder Review modules.
We have included in Ubercart 3 a set of coder review rules specifically for changes in Ubercart 3 which will help automate the process of updating Ubercart related modules. As part of updating the modules, we would like to know about your Ubercart contributed module(s) update status. Let us know if you need any help or need a test site set up to work on.

Please send us a reply mentioning one of the status options below:
Help needed in updating modules
D7 update In progress
Updating completed
Bug fix in progress
Help needed in writing patches
Ready to integrate with Ubercart 3.0

Your valuable feedback will help us track all the contributed modules which have made Ubercart more powerful.

Thank you for your contributions.

Regards,
Ubercart Team.

Yeah, I got the same message. Lyle has already added more Views support to Ubercart core in 7.x, including catalog module and order views so uc_views may have to drop some features, but I'll make a new branch soon - probably after I release uc_views 6.x-3.1.

After Ubercart and Ubercart Views is working well, consider taking a look at Drupal Commerce =P
http://drupal.org/project/commerce
http://www.drupalcommerce.org/

subscribing

Subscribe

Title:Drupal 7 portUbercart Views » D7 port

subscribing

subscribe

Subscribing - would love to see a D7 port!

subscribe

Subscribing

Status:Active» Needs work
StatusFileSize
new20.95 KB

Attached is a patch to port uc_views_attribute partly to drupal 7. So far I've implemented and tested uc_views_attribute_handler_field_order_product_attribute (Fields -> add -> Ubercart order product: Product attributes). This field displays any selected options on a particular order.

Notes for testers: I've removed the dependency of uc_views_attribute on uc_views. It works standalone now. The rest of uc_views will still show up in the module list as incompatible with d7. Maybe I should open a new project but there may be reasons for it staying in uc_views.

I would be happy for uc_views_attribute to be included directly in Ubercart core (as part of uc_attribute) once it has been successfully tested.

Subscribing

subscribing and very much looking forward to this.

I have installed and patched, and attributes seems to work, though I must admit I am not sure how it is supposed to work. What it does successfully is list the selected attributes with each order.

However, what I am really looking for (and which might constitute a new feature) is the ability to use views to create a CSV export that lists selected options in a table. Example:

Members register for a conference, and select meals or no meals. I would like a view that has a column of name, main order, and then columns for selected options. In other words, I am sort of hoping that attributes function more like fields. This may be beyond the purview of this module (and you can point me to a better place to post this if so).

Is this possible? To be able to break out selected options? I have tried to do this by putting products in a kit rather than simply add attributes, but this is cumbersome in its own way.

Happy to test...
Maria

Is the issue that the selected options all end up in the same field? I'm using this in a very similar way (which by the way is surely not how it was intended..)

@miiimoo: Exactly. All selected options are in the same field, just a list. I would prefer that each selected option gets a column so that export to CSV is easier. An entire table of selected options per product purchase (in my case, an event) would be very very very helpful.

subscribing

@tomate2010 you can now use the Follow button

StatusFileSize
new4.08 KB

I have ported the submodule uc_views_bulk_operations to D7. It allows process, print, and delete actions on orders and add_to_cart for nodes, which should mirror the functionality of the module in D6.

I installed the module (comment #22 above; Thank you goodeit!) for the bulk add to cart function. Looks great and flexible, but on my install, it only adds the first node (and its quantity) in the views list to the cart even when they're all selected. Does anybody know what might cause that?

The parts of the module relating to the 'Add to cart' function (as far as I can tell [still learning]) are:

function uc_views_bulk_operations_action_info() {
  return array(
.................
'uc_views_bulk_operations_add_to_cart_action' => array(
      'type' => 'node',
      'label' => t('Add to cart'),
      'configurable' => FALSE,
  'aggregate' => FALSE,
    ),
  );
}
.........
/**
* "Add to cart" node action.
*/
function uc_views_bulk_operations_add_to_cart_action($node, $params) {
  uc_cart_add_item($node->nid);
}

My procedure for adding this functionality was:

  • Added field 'Bulk Operation: Content' and configured it as follows:
  • Under 'Display operations as', I selected 'Each action as separate button'
  • Unchecked 'Enable "Select all items on all pages"
  • Selected Operations: Checked 'Add to cart', then checked/customized 'Override label'
  • * I added 'Content: Nid' field, just in case it was needed, though it seemed to work, but have the same problem without it.

Is there a step I missed? If not, is there something that should be added to the code?

I'm using Views 7.x-3.3 and Ubercart 7.x-3.0, with Drupal version 7.12.

Thanks so much!

Responding to my own comment #23 above....

I figured out what the problem was, but I do think a workaround is still required. I was using the 'Content: Add to cart form' field. When I removed that, it added one of each of the products as expected.

I was hoping that I could use both though so:
a) the user could specify multiple quantities of multiple products at the same time
b) or, if they only wanted to add a single product, they could still do it with a single click of the 'Add to cart' button next to the product (and completing the quantity field there), instead of needing to check the box, then click the other 'Add to cart' button, then change the quantity and then update the cart.... it's very involved for those users.

I think that flexibility would be very useful. Alternatively, just adding a quantity field next to the checkboxes would be nice.

This is probably a discussion for when the D7 version is being actively developed. Hope that happens soon!

@areikiera: There's no easy way to make a) possible. The concept is 'bulk' operations, i.e. the same operation applied to every node. It is conceivable that the module could be extended to allow a user to add the same quantity of multiple items to the cart, but I don't see a way to facilitate adding one of item c, two of item d, etc all in one go.

There shouldn't be any conflicts using the "add to cart" bulk operation and the "add to cart form" on the same view (please let me know if there is), but they will only work for their specific functions (add to cart form can set quantity but only add one item at a time; bulk operation can add multiple items at a time, but all have qty = 1).

With the mention of uc_views_bulk_operations_add_to_cart_action in #23

I just have highlighted issues with that function in: http://drupal.org/node/867686#comment-6013524

subscribing

How do I apply the patch?

And will this patch allow displaying unserialized attributes in a view?

Following this issue. I am also in need for this module. Is there any way we can help to speed up the development process?

The same goed here, willing to Pitch in financielly too

subscribing

If you are using Global PHP as a field in Views for Drupal 7, this may help display the unserialized attributes for each order. Our application was for text field attributes.

<?php
$request
= db_query("SELECT data FROM {uc_order_products } WHERE order_id= $row->order_id")->fetchField();
$att $request;
   
$data = unserialize($att);
    if (
is_array($data['attributes'])) {
      foreach (
$data['attributes'] as $attribute => $option) {
        echo
$attribute . ':   ' . implode(', ', (array)$option) . '<br>';
      }
    }
?>

I need to be able to display uc file attachments in a view - is there any news on porting the module to D7?

Just chiming in to say would love to see a D7 version. Have a robust site that needs upgrading but the client would not be happy to lose his custom views of orders . . . so holding off.

Thanks a lot @miiimooo,

I would love to have this module with full release, meanwhile could someone please add the patch (suggested on #13) and upload the module?

or attach the D7 patched module if you have already.

Thanks a lot.

using the code mentioned on #32. I get below error:

SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1

I'm just so stupid when it comes to patching. I've spent an hour trying to figure it out this time. Could anyone post a patched version?

Okay, applied the patch from #13 manually to uc_views-6.x-3.1. Here is the result for anyone who wants it: (see http://drupal.org/node/908944#comment-7033968, three comments down)

It works for me (Drupal 7.17), but there are no guarantees. You can see the output at http://endracing.com/uff-da/roster.

Any chance of getting an official D7 branch out there so we can dig into this a little quicker?

@mattbk - the link to your patched version is no working. Is it still available?

Subscribe ........

Try this one. I guess I deleted the file on my server.

#42

I'm trying to add field "Sell price w/attributes adjustment" in views and raising an error:

( ! ) Fatal error: Class 'uc_views_handler_field_money_amount' not found in /home/vvs/projects/htdocs/70.my/sites/all/modules/uc_views/uc_views_attribute/views/uc_views_attribute_handler_field_combination_price.inc on line 12
Call Stack
#TimeMemoryFunctionLocation
10.0001445824{main}(  )../index.php:0
20.843147427732menu_execute_active_handler( $path = ???, $deliver = ??? )../index.php:21
30.856048791944call_user_func_array
( &#39;views_ui_ajax_form&#39;, array (0 =&gt; TRUE, 1 =&gt; &#39;add-item&#39;, 2 =&gt; class view { public $db_table = &#39;views_view&#39;; public $base_table = &#39;node&#39;; public $base_field = &#39;nid&#39;; public $name = &#39;catalog&#39;; public $vid = &#39;4&#39;; public $description = &#39;Каталог товаров&#39;; public $tag = &#39;Catalog&#39;;
.................

Thanks!

Sorry, I'm found atrributes in field "Add to cart form"!

I am still a novice with Drupal. I tried to load the patch. I received uc_views-6.x-3.1-with-patch-d7port-908944-13.zip does not contain any .info files.

Modified the info file to core 7.x and added a R7 version number nothing changed.

@VVS: I didn't write the patch, I just applied it, so I don't know where your error is coming from.

@sibro: the file in #42 is not a patch, it is already patched.

Category:task» support

i am dead keen to see this module available. Holding thumbs

is #42

ready for production sites on drupal 7?

Subscribing... I would to see this coming to Drupal 7 officially as well. #HoldingThumbs.

Hi, I have installed the module above #42, these are the only views created...

uc_orders_user

uc_orders

uc_products

While installing, I got the error below, may you please assist:


PDOException: SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'uc_order_products_qty_vw' already exists: CREATE VIEW {uc_order_products_qty_vw} (nid,order_count,avg_qty,sum_qty,max_qty,min_qty) AS SELECT op.nid AS nid, COUNT(op.nid) AS order_count,AVG(op.qty) AS avg_qty, SUM(op.qty) AS sum_qty,MAX(op.qty) AS max_qty, MIN(op.qty) AS min_qty FROM {uc_order_products} op GROUP BY op.nid ORDER BY op.nid; Array ( ) in uc_views_marketing_install() (line 170 of /var/www/vhosts/y/u/11530040_m0270820/sites/all/modules/uc_views/uc_views_marketing/uc_views_marketing.install).

Anyone have a good working version of this port. I am in dire need of this module for d7 uc3 and I am not a programmer. HELP.!

Also getting Same error as above.

If I installed drupal 6 and installed this module etc. would I be able to replicate(not export) the views from there to dupal 7 and it would work?

Please help!

4fs
when you update from D6 to D7 you must rebuild all your views (at least that's how I understand it).

I am getting a error any ideas?

Notice: Undefined index: description in uc_views_attribute_views_data() (line 38 of /home/content/05/10175405/html/sites/all/modules/uc_views/uc_views_attribute/views/uc_views_attribute.views.inc).

StatusFileSize
new56.06 KB

I am also getting the attached error when I go to filter by a product attribute in views... has anyone else had this issue?

Fatal error: Call to undefined function db_fetch_object() in /home/content/05/10175405/html/sites/all/modules/uc_views/uc_views_attribute/views/uc_views_attribute_handler_filter_attr.inc on line 27
On that line it starts as so:
while ($row = db_fetch_object($result)) {
$options[$row->oid] = $row->name;
}

this is pulling all the options of a product from my database. for some reason it hates the while..... if I remove the whole function I get no errors but none of my values are pulled for the drop down menu. Sound like something you might know how to fix?

Anyone from the team monitoring this issue?

"The team" for this module is just me!

The core parts of uc_views are already in Ubercart 7.x-3.x, and uc_views_bulk_operations are also in Ubercart core now.

uc_views_attributes will be added in #895236: Expose assigned attributes to views - anyone working on attribute support should post there.

uc_views_addresses should be added to uc_addresses module directly, if this hasn't already been done.

uc_views_marketing never worked very well and I do not intend to upgrade it to Drupal 7; instead I recommend upgrading something like https://drupal.org/project/uc_views_upsell to replace it.

The db_fetch_object() function has been removed in Drupal 7, so line 27 in uc_views_attribute_handler_filter_attr.inc should be changed from
while ($row = db_fetch_object($result)) {
to
foreach ($result as $row) {

@longwave (#54), thanks for the status update, and all the work of course!

I installed only the module: uc_views_attribute from #42
and am using this to simply display the attributes' selected options for a product in a view and it works perfectly. many thanks!