Closed (cannot reproduce)
Project:
Commerce Core
Version:
7.x-1.4
Component:
Contributed modules
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
29 Nov 2012 at 21:28 UTC
Updated:
9 Jul 2013 at 03:03 UTC
I have a problem when I create products, I'm not sure since which version because I haven't added new products since a couple of months but the thing is that for new products the event "Check if a product add to cart form should be enabled (is in stock)" is not called and the button is by default disabled even if I change the configuration to disable and enable the product. I discover that in the rules log. But for all the old products there is no problem.
Could someone give me a clue of how can I fix this, if I'm missing something or any ideas.
I'm attaching two screenshots to see the difference.
Thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| new_product.png | 206.7 KB | pompetardo | |
| old_product.png | 163.95 KB | pompetardo |
Comments
Comment #1
rszrama commentedI'd check with the Stock module, as this is not a core Drupal Commerce feature. There may already be open issues or updates to correct this behavior, so be sure to search the queue at http://drupal.org/project/issues/commerce_stock before posting.
Comment #2
pompetardo commentedOk, I wasn't sure in which module was that functionality, thanks.
Comment #3
pompetardo commentedI made some test and determined that the problem is in fact in the commerce module or at least something changed that affects the stock module. I tested it with a backup where everything worked, it had commerce 7.x-1.3 and commerce-stock 7.x-2.0-alpha2.
First I upgraded commerce-stock to 7.x-2.0-alpha3 and averything worked fine but when I upgraded commerce to 7.x-1.4 the issue appeared.
I read the release notes and maybe the minor API change has not been taked into account in the stock module. I also saw there are 3 changes related to the "add to cart" form that may affect:
#1759494 by rszrama, andyg5000: change the AJAX refresh code for profile copying to use an alterable commands array similar to the Add to Cart form.
#1343192 by rszrama: unset product_select element input when building the Add to Cart form if we detect that an attribute form element has been changed resulting in a potentially new set of #options for the product_select element.
#1029002 by kotnik, rszrama: allow single product Add to Cart forms to optionally show attribute field widgets via a new Add to Cart form display formatter setting.
I'm posting this also in the stock module queue. I reopened the issue here because I'm not sure how to find the API changes to fix the stock module.
Comment #4
pompetardo commentedApparently the problem is not in the stock module because the new product are disabled by default. When I try to edit them, it shows as it is enabled. I tried disabling and enabling but nothing changes.
Comment #5
rszrama commentedI know of nothing that should cause a new product to default to being disabled on the Add to Cart form. My best guess is still an incompatibility with some contributed module, but I don't have anything new to add. I haven't seen any other reports of similar behavior in the past 6 months.