I'm working on a store created with Drupal Commerce where I have first created a product variation, then I created a corresponding product display type and finally I created different products, e.g. mattresses.

Now I find myself stuck with this problem: I have mattresses of different size and I have a product attribute (within the product variation) accounting for the different sizes - I have the option "Enable this field to function as an attribute field on Add to Cart forms" already checked.

When I select a size from the select list, the product price changes and displays accordingly but other product attributes, i.e. the sku, displaying on the same page, does not update.

Now, if I move on to the cart summary I can find the right sku, it looks like the price updates without the need for a page reload, while other custom attribute fields don't (you can see all of this live at http://www.dormiplus.it/cms/?q=it/materassi/stella, where "codice" is equivalent to sku).

How can I have the right sku displaying correctly whenever I select a different mattress size?

1 Answer 1

  1. Why don't you have the clean urls enabled?

  2. I think for the ajax to function, we might require or at least assume clean urls. That may be all the problem is.

  3. The reason your injected fields aren't changing is because of a javascript error, and it is often not related to Drupal Commerce at all, could be a theme issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.