Неверное значение $product на странице товара Не принято

-1

Запускаю в приложении Разработка код:

// wa('shop');
// $product = new shopProduct(7, true);
var_dump($product['sku_features'])
var_dump($product['features_selectable']);

получаю:

array (size=4)
  38 => 
    array (size=2)
      'color' => 
        object(shopColorValue)[114]
          private 'code' => string '16777215' (length=8)
          private 'value' => string 'белый' (length=10)
          private 'id' => string '1' (length=1)
          private 'sort' => string '1' (length=1)
          private 'internal_data' => null
          public 'feature_id' => string '7' (length=1)
      'top_material' => string 'кожа' (length=8)
  39 => 
    array (size=2)
      'color' => 
        object(shopColorValue)[114]
          private 'code' => string '16777215' (length=8)
          private 'value' => string 'белый' (length=10)
          private 'id' => string '1' (length=1)
          private 'sort' => string '1' (length=1)
          private 'internal_data' => null
          public 'feature_id' => string '7' (length=1)
      'top_material' => string 'ткань' (length=10)
  40 => 
    array (size=2)
      'color' => 
        object(shopColorValue)[116]
          private 'code' => string '16776960' (length=8)
          private 'value' => string 'желтый' (length=12)
          private 'id' => string '2' (length=1)
          private 'sort' => string '2' (length=1)
          private 'internal_data' => null
          public 'feature_id' => string '7' (length=1)
      'top_material' => string 'кожа' (length=8)
  41 => 
    array (size=2)
      'color' => 
        object(shopColorValue)[116]
          private 'code' => string '16776960' (length=8)
          private 'value' => string 'желтый' (length=12)
          private 'id' => string '2' (length=1)
          private 'sort' => string '2' (length=1)
          private 'internal_data' => null
          public 'feature_id' => string '7' (length=1)
      'top_material' => string 'ткань' (length=10)

array (size=2)
  'color' => 
    array (size=12)
      'id' => string '7' (length=1)
      'parent_id' => null
      'code' => string 'color' (length=5)
      'cml1c_id' => null
      'status' => string 'public' (length=6)
      'name' => string 'Цвет' (length=8)
      'type' => string 'color' (length=5)
      'selectable' => string '1' (length=1)
      'multiple' => string '1' (length=1)
      'count' => string '13' (length=2)
      'values' => 
        array (size=13)
          1 => 
            object(shopColorValue)[119]
              ...
          2 => 
            object(shopColorValue)[117]
              ...
      'selected' => int 2
  'top_material' => 
    array (size=12)
      'id' => string '36' (length=2)
      'parent_id' => null
      'code' => string 'top_material' (length=12)
      'cml1c_id' => null
      'status' => string 'public' (length=6)
      'name' => string 'Материал' (length=16)
      'type' => string 'varchar' (length=7)
      'selectable' => string '1' (length=1)
      'multiple' => string '1' (length=1)
      'count' => string '4' (length=1)
      'values' => 
        array (size=4)
          120 => 
            array (size=2)
              ...
          121 => 
            array (size=2)
              ...
      'selected' => int 2

А теперь на странице товара product.html

{var_dump($product.sku_features)}
{var_dump($product.features_selectable)}

и получаем совсем другой результат

array (size=2)
  7 => int 1
  36 => int 120

array (size=2)
  7 => 
    array (size=13)
      'id' => string '7' (length=1)
      'parent_id' => null
      'code' => string 'color' (length=5)
      'cml1c_id' => null
      'status' => string 'public' (length=6)
      'name' => string 'Цвет' (length=8)
      'type' => string 'color' (length=5)
      'selectable' => string '1' (length=1)
      'multiple' => string '1' (length=1)
      'count' => string '13' (length=2)
      'sort' => int 1
      'values' => 
        array (size=2)
          1 => 
            object(shopColorValue)[27]
              ...
          2 => 
            object(shopColorValue)[41]
              ...
      'selected' => int 0
  36 => 
    array (size=13)
      'id' => string '36' (length=2)
      'parent_id' => null
      'code' => string 'top_material' (length=12)
      'cml1c_id' => null
      'status' => string 'public' (length=6)
      'name' => string 'Материал' (length=16)
      'type' => string 'varchar' (length=7)
      'selectable' => string '1' (length=1)
      'multiple' => string '1' (length=1)
      'count' => string '4' (length=1)
      'sort' => int 2
      'values' => 
        array (size=2)
          120 => string 'кожа' (length=8)
          121 => string 'ткань' (length=10)
      'selected' => int 0

0 комментариев

    Добавить комментарий

    Чтобы добавить комментарий, зарегистрируйтесь или войдите