I have more then one product referenced from product display node. If user selects a product different from the first one then product picture should be changed and description and specification too. But only price changes. everithing else remains the same.
How this can be fixed?

Comments

VSZ created an issue. See original summary.

  • hxdef committed 1620fd8 on 7.x-1.x
    Issue #2560001 by VSZ: Product image, description and specification not...
hxdef’s picture

Status: Active » Fixed

Fixed in the last version.

VSZ’s picture

Thank you for the fix. But it has one drawback.
The code in commerce_profile_common.js does not respect translations. So it the site is in a language different from English and "Description" and "Specifications" are translated then quicktabs do not work.

I corrected the code related to quicktabs to look like this:

 $(document).ready(function() {

    var desc = Drupal.t('Description');
    if ($('a:contains(' + desc + ')').attr('id') != null) {
      var descriptionId = $('a:contains(' + desc + ')').attr('id').substr(-1);
      $('#quicktabs-tabpage-node_activities-' + descriptionId).append($('.commerce-product-field.commerce-product-field-field-description.field-field-description'));
    }

    var spec = Drupal.t('Specifications');
    if ($('a:contains(' + spec + ')').attr('id') != null) {
      var specificationId = $('a:contains(' + spec + ')').attr('id').substr(-1);
      $('#quicktabs-tabpage-node_activities-' + specificationId).append($('.commerce-product-field.commerce-product-field-field-specifications.field-field-specifications'));
    }

There is one more place in this file which does not respect translation

 var cart_quantity_html = "You have <span class = 'cart-quantity'>" + cart_quantity_html + '</span> in your shopping cart';

I just deleted it.

damir romanovsky’s picture

Hi, thanks for your report.

We've added the necessary changes to the dev version. It will be added in the stable version in the near future.

hxdef’s picture

Status: Fixed » Closed (fixed)