When I went to edit the module's views I get this message:

> Status message
This view has been automatically updated to fix missing relationships. While this View should continue to work, you should verify that the automatic updates are correct and save this view.

The commerce_rec_product_display is not showing any relationships, but from the code I can see it ought to have one to Content: Referenced product.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dwkitchen’s picture

Assigned: Unassigned » dwkitchen

It must be dependant on some other module not in the info file probably something in commerce kickstart (are you using it?) as that is what I was testing it on.

joachim’s picture

Nope, I don't have commerce kickstart. But I probably have most of the modules in it.

Ah got it:

> $handler->display->display_options['relationships']['field_product_product_id']['id'] = 'field_product_product_id';

That's presumably the field made by the CK installation process. Whereas without CK you're making one of those by hand (IIRC -- at least, on my site it's got a custom machine name I gave it).

It might be feasible to fix this by sniffing product ref fields on nodes and defining the relationship programmatically. Or by saying in the docs this has to be added by hand.

Frando’s picture

Title: views are broken » Fix views and make commerce_rec work
Status: Active » Needs review
FileSize
3.44 KB

After some struggling I got commerce_rec to work.

1. Install recommender-7.x-4.0-alpha4 (most recent release)
2. Apply the patch in https://drupal.org/node/1611716#comment-6105088 to recommender
3. Install most recent dev of commerce_rec-7.x-1.x
4. Apply the attached patch to commerce_rec

The attached patch fixes the relationships in the default product similarity view shipped commerce_rec.