1

We're using Magento 1.9.2.4, Configurable products which has assigned multiple simple products. Each simple product has two attributes, "heel height" and "shoe size". Heel height works as intended, but we're having problem with "shoe size". If we access the store from EU, everything works correctly, but if we access it from US, all shoe size options are shown as "null". Option value is still there, just label is wrong. When I view source from page opened through US, I see this (formatted for easier readability):

 <script type="text/javascript">
        var spConfig = new Product.Config({
   "attributes":{
      "133":{
         "id":"133",
         "code":"heel_size",
         "label":"Heel size",
         "options":[
            {
               "id":"21",
               "label":"7.5",
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "561",
                  "562",
                  "563",
                  "564",
                  "565",
                  "566",
                  "567",
                  "568",
                  "818",
                  "819",
                  "820",
                  "821",
                  "822",
                  "823",
                  "824"
               ]
            },
            {
               "id":"9",
               "label":"10",
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "569",
                  "570",
                  "571",
                  "572",
                  "573",
                  "574",
                  "575",
                  "576",
                  "825",
                  "826",
                  "827",
                  "828",
                  "829",
                  "831",
                  "832"
               ]
            }
         ]
      },
      "134":{
         "id":"134",
         "code":"size",
         "label":"Size",
         "options":[
            {
               "id":"57",
               "label":null,
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "561",
                  "569"
               ]
            },
            {
               "id":"45",
               "label":null,
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "818",
                  "825"
               ]
            },
            {
               "id":"12",
               "label":null,
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "562",
                  "570"
               ]
            },
            {
               "id":"46",
               "label":null,
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "819",
                  "826"
               ]
            },
            {
               "id":"13",
               "label":null,
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "563",
                  "571"
               ]
            },
            {
               "id":"47",
               "label":null,
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "820",
                  "827"
               ]
            },
            {
               "id":"14",
               "label":null,
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "564",
                  "572"
               ]
            },
            {
               "id":"48",
               "label":null,
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "821",
                  "828"
               ]
            },
            {
               "id":"15",
               "label":null,
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "565",
                  "573"
               ]
            },
            {
               "id":"49",
               "label":null,
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "822",
                  "829"
               ]
            },
            {
               "id":"16",
               "label":null,
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "566",
                  "574"
               ]
            },
            {
               "id":"50",
               "label":null,
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "823",
                  "832"
               ]
            },
            {
               "id":"22",
               "label":null,
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "567",
                  "575"
               ]
            },
            {
               "id":"51",
               "label":null,
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "824",
                  "831"
               ]
            },
            {
               "id":"23",
               "label":null,
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "568",
                  "576"
               ]
            }
         ]
      }
   },
   "template":"\u20ac#{price}",
   "basePrice":"365",
   "oldPrice":"365",
   "productId":"11",
   "chooseText":"Choose a Size ",
   "taxConfig":{
      "includeTax":true,
      "showIncludeTax":true,
      "showBothPrices":false,
      "defaultTax":21,
      "currentTax":21,
      "inclTaxTitle":"Incl. Tax"
   }
});
    </script>

If I access the same page through EU, I see this:

<script type="text/javascript">
        var spConfig = new Product.Config({
   "attributes":{
      "133":{
         "id":"133",
         "code":"heel_size",
         "label":"Heel size",
         "options":[
            {
               "id":"21",
               "label":"7.5",
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "561",
                  "562",
                  "563",
                  "564",
                  "565",
                  "566",
                  "567",
                  "568",
                  "818",
                  "819",
                  "820",
                  "821",
                  "822",
                  "823",
                  "824"
               ]
            },
            {
               "id":"9",
               "label":"10",
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "569",
                  "570",
                  "571",
                  "572",
                  "573",
                  "574",
                  "575",
                  "576",
                  "825",
                  "826",
                  "827",
                  "828",
                  "829",
                  "831",
                  "832"
               ]
            }
         ]
      },
      "134":{
         "id":"134",
         "code":"size",
         "label":"Size",
         "options":[
            {
               "id":"57",
               "label":"35",
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "561",
                  "569"
               ]
            },
            {
               "id":"45",
               "label":"35.5",
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "818",
                  "825"
               ]
            },
            {
               "id":"12",
               "label":"36",
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "562",
                  "570"
               ]
            },
            {
               "id":"46",
               "label":"36.5",
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "819",
                  "826"
               ]
            },
            {
               "id":"13",
               "label":"37",
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "563",
                  "571"
               ]
            },
            {
               "id":"47",
               "label":"37.5",
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "820",
                  "827"
               ]
            },
            {
               "id":"14",
               "label":"38",
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "564",
                  "572"
               ]
            },
            {
               "id":"48",
               "label":"38.5",
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "821",
                  "828"
               ]
            },
            {
               "id":"15",
               "label":"39",
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "565",
                  "573"
               ]
            },
            {
               "id":"49",
               "label":"39.5",
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "822",
                  "829"
               ]
            },
            {
               "id":"16",
               "label":"40",
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "566",
                  "574"
               ]
            },
            {
               "id":"50",
               "label":"40.5",
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "823",
                  "832"
               ]
            },
            {
               "id":"22",
               "label":"41",
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "567",
                  "575"
               ]
            },
            {
               "id":"51",
               "label":"41.5",
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "824",
                  "831"
               ]
            },
            {
               "id":"23",
               "label":"42",
               "price":"0",
               "oldPrice":"0",
               "products":[
                  "568",
                  "576"
               ]
            }
         ]
      }
   },
   "template":"\u20ac#{price}",
   "basePrice":"365",
   "oldPrice":"365",
   "productId":"11",
   "chooseText":"Choose a Size ",
   "taxConfig":{
      "includeTax":true,
      "showIncludeTax":true,
      "showBothPrices":false,
      "defaultTax":21,
      "currentTax":21,
      "inclTaxTitle":"Incl. Tax"
   }
});
    </script>

As you can see, all option's labels in the US have been turned into "null" values, while EU still shows proper labels. We're not using multistore view, nor multi languages, single store and single language. And out of ideas what could cause this ...

And help and clues would be greatly appreciated.

  • Are you using any type of cache or load balancing? – Zivorad Dec 16 '17 at 10:05
  • As far as I know, Redis only. – Kristjan O. Dec 16 '17 at 10:14
  • Did you perform the usual routine with cache clearing, static content deploy and DI compile? – Zivorad Dec 16 '17 at 10:20
  • Yes, yes and no, this is Magento 1.9, not 2. – Kristjan O. Dec 16 '17 at 10:25
  • So issue is based on visitor's ip address? – Zivorad Dec 16 '17 at 10:33
0

After digging into the code, I found out that one of previous maintainers added a code to translate the labels. Since this wasn't documented anywhere and backend wasn't updated with this functionality, no one didn't even think of looking into this.

Modified file was found by looking for modified function getJsonConfig(), found in /app/code/local/.../Catalog/Block/Product/View/Type/Configurable.php.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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