Вход • Регистрация

Всего найдено: 15

  • 15 декабря 2015 г.
  • Добрый день. Возникла следующая ситуация.
    В админке мы выставили сортировку дополнительных параметров по очереди начиная с наименьшего размера и заканчивая максимальными размерами. Но на сайте все отображается вразброс. Как это поправить??
  • 16 декабря 2015 г.
  • Код


    echo "<!-- ";
    print_r($result["row"]["price_arr"]);
    echo " -->";

    $i0=1;

    foreach($result["row"]["price_arr"] as $row){
    //print_r($row);
    if($i0==1){
    echo '<div class="allProd g" id="'.$row['id'].'">';
    $i0++;
    }
    elseif($i0==2){
    echo '<div class="allProd w" id="'.$row['id'].'">';
    $i0--;
    }
    else{}

    foreach($result["result"]["depends_param"][0]['values'] as $a) {
    if ($a['id'] == $row["param"][0]['value']) {
    //echo $a['name']."<BR/>";
    //echo $a['id'];
    //print_r($a);
    echo '<div class="prodColRazm">'.$a['name'].'</div>';
    echo '<input type="hidden" id="one" name="param'.$row["param"][0]['id'].'" value="'.$row["param"][0]['value'].'" />';
    break;
    }
    }
    foreach($result["result"]["depends_param"][1]['values'] as $b){
    if($b['id'] == $row["param"][1]['value']){
    //echo $b['name']."<BR/>";
    //echo $b['id'];
    //print_r($b);

    echo '<div class="prodColVes">'.$b['name'].'</div>';
    echo '<input type="hidden" id="two" name="param'.$row["param"][1]['id'].'" value="'.$row["param"][1]['value'].'" />';
    break;
    }
    }

    echo "
    <div class=\"prodColPrice\">".$row["price"]."</div>
    <div class=\"prodColBuy\">
    <a onClick=\"addBsket($(this).parent().parent().attr('id'))\">Купить</a>
    </div>
    </div>
    ";
    $price = $this->diafan->_shop->price_get($row["good_id"], array($row["param"][0]["id"]=>$row["param"][0]["value"]));

    }
    echo '</div></div>';

  • 16 декабря 2015 г.
  • И возможно ли обойтись малой кровью???
    Вот аутпут
    Код


    <!-- Array
    (
    [0] => Array
    (
    [id] => 922
    [good_id] => 21
    [price] => 4&nbsp;200
    [old_price] => 0
    [count_goods] => 0
    [price_id] => 922
    [date_start] => 0
    [date_finish] => 0
    [discount] => 0
    [discount_id] => 0
    [person] => 0
    [role_id] => 0
    [currency_id] => 0
    [import_id] =>
    [trash] => 0
    [param] => Array
    (
    [0] => Array
    (
    [id] => 1
    [value] => 1
    )

    [1] => Array
    (
    [id] => 2
    [value] => 59
    )

    )

    [count] => 1
    [image_rel] =>
    [price_no_format] => 4200
    [count_in_cart] =>
    )

    [1] => Array
    (
    [id] => 923
    [good_id] => 21
    [price] => 4&nbsp;300
    [old_price] => 0
    [count_goods] => 0
    [price_id] => 923
    [date_start] => 0
    [date_finish] => 0
    [discount] => 0
    [discount_id] => 0
    [person] => 0
    [role_id] => 0
    [currency_id] => 0
    [import_id] =>
    [trash] => 0
    [param] => Array
    (
    [0] => Array
    (
    [id] => 1
    [value] => 2
    )

    [1] => Array
    (
    [id] => 2
    [value] => 60
    )

    )

    [count] => 1
    [image_rel] =>
    [price_no_format] => 4300
    [count_in_cart] =>
    )

    [2] => Array
    (
    [id] => 927
    [good_id] => 21
    [price] => 4&nbsp;600
    [old_price] => 0
    [count_goods] => 0
    [price_id] => 927
    [date_start] => 0
    [date_finish] => 0
    [discount] => 0
    [discount_id] => 0
    [person] => 0
    [role_id] => 0
    [currency_id] => 0
    [import_id] =>
    [trash] => 0
    [param] => Array
    (
    [0] => Array
    (
    [id] => 1
    [value] => 109
    )

    [1] => Array
    (
    [id] => 2
    [value] => 61
    )

    )

    [count] => 1
    [image_rel] =>
    [price_no_format] => 4600
    [count_in_cart] =>
    )

    [3] => Array
    (
    [id] => 926
    [good_id] => 21
    [price] => 4&nbsp;600
    [old_price] => 0
    [count_goods] => 0
    [price_id] => 926
    [date_start] => 0
    [date_finish] => 0
    [discount] => 0
    [discount_id] => 0
    [person] => 0
    [role_id] => 0
    [currency_id] => 0
    [import_id] =>
    [trash] => 0
    [param] => Array
    (
    [0] => Array
    (
    [id] => 1
    [value] => 2
    )

    [1] => Array
    (
    [id] => 2
    [value] => 61
    )

    )

    [count] => 1
    [image_rel] =>
    [price_no_format] => 4600
    [count_in_cart] =>
    )

    [4] => Array
    (
    [id] => 925
    [good_id] => 21
    [price] => 4&nbsp;600
    [old_price] => 0
    [count_goods] => 0
    [price_id] => 925
    [date_start] => 0
    [date_finish] => 0
    [discount] => 0
    [discount_id] => 0
    [person] => 0
    [role_id] => 0
    [currency_id] => 0
    [import_id] =>
    [trash] => 0
    [param] => Array
    (
    [0] => Array
    (
    [id] => 1
    [value] => 106
    )

    [1] => Array
    (
    [id] => 2
    [value] => 61
    )

    )

    [count] => 1
    [image_rel] =>
    [price_no_format] => 4600
    [count_in_cart] =>
    )

    [5] => Array
    (
    [id] => 924
    [good_id] => 21
    [price] => 4&nbsp;600
    [old_price] => 0
    [count_goods] => 0
    [price_id] => 924
    [date_start] => 0
    [date_finish] => 0
    [discount] => 0
    [discount_id] => 0
    [person] => 0
    [role_id] => 0
    [currency_id] => 0
    [import_id] =>
    [trash] => 0
    [param] => Array
    (
    [0] => Array
    (
    [id] => 1
    [value] => 104
    )

    [1] => Array
    (
    [id] => 2
    [value] => 61
    )

    )

    [count] => 1
    [image_rel] =>
    [price_no_format] => 4600
    [count_in_cart] =>
    )

    [6] => Array
    (
    [id] => 928
    [good_id] => 21
    [price] => 4&nbsp;900
    [old_price] => 0
    [count_goods] => 0
    [price_id] => 928
    [date_start] => 0
    [date_finish] => 0
    [discount] => 0
    [discount_id] => 0
    [person] => 0
    [role_id] => 0
    [currency_id] => 0
    [import_id] =>
    [trash] => 0
    [param] => Array
    (
    [0] => Array
    (
    [id] => 1
    [value] => 105
    )

    [1] => Array
    (
    [id] => 2
    [value] => 61
    )

    )

    [count] => 1
    [image_rel] =>
    [price_no_format] => 4900
    [count_in_cart] =>
    )

    [7] => Array
    (
    [id] => 929
    [good_id] => 21
    [price] => 4&nbsp;900
    [old_price] => 0
    [count_goods] => 0
    [price_id] => 929
    [date_start] => 0
    [date_finish] => 0
    [discount] => 0
    [discount_id] => 0
    [person] => 0
    [role_id] => 0
    [currency_id] => 0
    [import_id] =>
    [trash] => 0
    [param] => Array
    (
    [0] => Array
    (
    [id] => 1
    [value] => 110
    )

    [1] => Array
    (
    [id] => 2
    [value] => 61
    )

    )

    [count] => 1
    [image_rel] =>
    [price_no_format] => 4900
    [count_in_cart] =>
    )

    [8] => Array
    (
    [id] => 930
    [good_id] => 21
    [price] => 5&nbsp;300
    [old_price] => 0
    [count_goods] => 0
    [price_id] => 930
    [date_start] => 0
    [date_finish] => 0
    [discount] => 0
    [discount_id] => 0
    [person] => 0
    [role_id] => 0
    [currency_id] => 0
    [import_id] =>
    [trash] => 0
    [param] => Array
    (
    [0] => Array
    (
    [id] => 1
    [value] => 111
    )

    [1] => Array
    (
    [id] => 2
    [value] => 62
    )

    )

    [count] => 1
    [image_rel] =>
    [price_no_format] => 5300
    [count_in_cart] =>
    )

    [9] => Array
    (
    [id] => 931
    [good_id] => 21
    [price] => 5&nbsp;700
    [old_price] => 0
    [count_goods] => 0
    [price_id] => 931
    [date_start] => 0
    [date_finish] => 0
    [discount] => 0
    [discount_id] => 0
    [person] => 0
    [role_id] => 0
    [currency_id] => 0
    [import_id] =>
    [trash] => 0
    [param] => Array
    (
    [0] => Array
    (
    [id] => 1
    [value] => 112
    )

    [1] => Array
    (
    [id] => 2
    [value] => 63
    )

    )

    [count] => 1
    [image_rel] =>
    [price_no_format] => 5700
    [count_in_cart] =>
    )

    [10] => Array
    (
    [id] => 932
    [good_id] => 21
    [price] => 5&nbsp;900
    [old_price] => 0
    [count_goods] => 0
    [price_id] => 932
    [date_start] => 0
    [date_finish] => 0
    [discount] => 0
    [discount_id] => 0
    [person] => 0
    [role_id] => 0
    [currency_id] => 0
    [import_id] =>
    [trash] => 0
    [param] => Array
    (
    [0] => Array
    (
    [id] => 1
    [value] => 113
    )

    [1] => Array
    (
    [id] => 2
    [value] => 64
    )

    )

    [count] => 1
    [image_rel] =>
    [price_no_format] => 5900
    [count_in_cart] =>
    )

    )

  • 19 ноября 2015 г.
  • Добрый день. Обнаружилась следующая проблема:
    В админке установил "Шаблон для списка элементов" -> list_products.php и shop.view.list.php
    В list_products.php вызываю
    Код
    <insert name="show_body">

    В shop.view.list.php
    Код
    print_r($result);
    if (!empty($result["rows"]))
    {
    echo $this->get('rowsnews', 'shop', $result);
    }

    в shop.view.rownews.php
    Код

    foreach ($result["rows"] as $row => $value)
    {
    if($t > $number_columns - 1) $t = 0;
    $rows[$t][] = $value;
    $t++;
    }
    и т.д.


    В итоге в выводе "print_r($result)" выводит следующее:
    Код

    Array
    (
    [breadcrumb] => Array
    (
    [0] => Array
    (
    [link] => katalog/
    [name] => Каталог
    )

    )

    [view] => list
    [children] => Array
    (
    )

    [img] => Array
    (
    [0] => Array
    (
    [link] => userfiles/shop/large/8_koptilni.png
    [type] => animation
    [id] => 8
    [height] => 96
    [width] => 103
    [alt] => Коптильни
    [title] => Коптильни
    [src] => http://st-ochag.ru/userfiles/shop/preview/8_koptilni.png
    [vs] => Array
    (
    [large] => http://st-ochag.ru/userfiles/shop/large/8_koptilni.png
    [medium] => http://st-ochag.ru/userfiles/shop/preview/8_koptilni.png
    )

    )

    )

    [timeedit] => 1447852013
    [titlemodule] => Коптильни
    [edit_meta] => Array
    (
    [id] => 3
    [table] => shop_category
    )

    [title_meta] =>
    [keywords] =>
    [descr] =>
    [theme] => list_products.php
    [id] => 3
    [text] => Коптильни
    [anons] =>
    [name] => Коптильни
    [previous] => Array
    (
    [text] => Наши товары
    [id] => 2
    [link] => katalog/nashi-tovary/
    )

    [next] => Array
    (
    [text] => Прочее
    [id] => 4
    [link] => katalog/prochee/
    )

    [paginator] =>
    [rows] => Array
    (
    )

    [currency] => руб.
    [comments] =>
    [rating] =>
    [link_sort] => Array
    (
    [1] => katalog/koptilni/sort1/
    [2] => katalog/koptilni/sort2/
    [3] => katalog/koptilni/sort3/
    [4] => katalog/koptilni/sort4/
    )

    [sort_config] => Array
    (
    [sort_fields_names] => Array
    (
    [1] => Цена
    [3] => Наименование товара
    )

    [sort_directions] => Array
    (
    [1] => pr.price ASC
    [2] => pr.price DESC
    [3] => s.name1 ASC
    [4] => s.name1 DESC
    )

    [param_ids] => Array
    (
    )

    [use_params_for_sort] =>
    )

    [shop_link] => katalog/
    [cart_link] => korzina/
    [wishlist_link] =>
    [access_buy] =>
    [hide_compare] => 1
    [buy_empty_price] => 1
    [one_click] => Array
    (
    [form_tag] => cart_one_click
    [error] =>
    [rows_param] => Array
    (
    [0] => Array
    (
    [id] => 1
    [name] => ФИО или название компании
    [type] => text
    [required] => 1
    [text] =>
    [config] =>
    [info] => name
    )

    [1] => Array
    (
    [id] => 3
    [name] => Контактные телефоны (с кодом города)
    [type] => text
    [required] => 1
    [text] =>
    [config] =>
    [info] => phone
    )

    )

    [user] => Array
    (
    [p1] => admin
    [p3] =>
    )

    [error_p1] =>
    [error_p3] =>
    [use] => 1
    )

    )


    Намека на список товаров тут и нет((
    Как сделать список товаров???

Новости

  • 18 июня
  • В сборке большое обновление demo-шаблона, дополнительная защита от спама, улучшение YML-импорта и еще много важного и интересного.
  • 24 апреля
  • В новой сборке совершили революцию в структурировании кастомизированной информации в шаблонах, добавили авторегистрацию пользователей, усовершенствовали защиту от спама, актуализировали накопительную скидку, а также улучшили производительность и стабильность работы системы.
  • 12 января
  • После выхода сборки 7.1 мы выпустили уже три патча, в каждом из которых улучшаем административную часть сайта. Сборка DIAFAN.CMS 7.1.3 уже доступна к установке. 

Форум