Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
stock-3.png | 34.71 KB | esquareddesign | |
stock-2.png | 28.14 KB | esquareddesign | |
stock-1.png | 73.56 KB | esquareddesign |
Comments
Comment #1
TR CreditAttribution: TR commentedI can't reproduce this - it works fine for me. Are you still having this problem?
Comment #2
longwaveNo further information provided.
Comment #3
gardy CreditAttribution: gardy as a volunteer commentedI 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.
Comment #4
gardy CreditAttribution: gardy as a volunteer commentedBy 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.