I have a view set up with the "stock:active" field set to show "yes" if stock is active and "no" if stock is inactive but no matter what I do it always says no.

What am I doing wrong? I have dumped the cache, I have disabled stock and re-enabled it, I have tried re-adding the field and a have tried checking and unchecking active on the product.

I swear it was working before.

CommentFileSizeAuthor
stock-3.png34.71 KBesquareddesign
stock-2.png28.14 KBesquareddesign
stock-1.png73.56 KBesquareddesign
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

TR’s picture

Status: Active » Postponed (maintainer needs more info)

I can't reproduce this - it works fine for me. Are you still having this problem?

longwave’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

No further information provided.

gardy’s picture

I ran into the same problem.

As I found it appers when a SKU is changed or product SKU is not unique.

The problem is that the product editing and product display uses the NID for stock lookup, but the views handler uses the SKU.

I can't find quick fix for it, becasuse the stock table data becomes corrupt. So I think stock should use the NID for product identification.

gardy’s picture

By the way this solves the consistency problem:
https://www.drupal.org/node/1398448

And you can simply check the stock table by hand for duplicated nids.