Пошук по сайту
Результати пошуку за тегами 'size_chart'.
Знайдено 1 результат
-
По сабжу пробую адаптировать модуль с ос2.3 на ос 3.2. Застрял в одном месте, но не могу найти решания. Не работает модуль только на продукте, в админке все подключило, в Uncaught Twig_Error_Syntax: Unknown "unserialize" function in "sitename/template/product/product.twig" at line 683. Оригинальный код <file path="catalog/view/theme/*/template/product/product.tpl"> <operation> <search><![CDATA[ <?php echo $footer; ?> ]]></search> <add position="befor"><![CDATA[ <!-- Modal --> <div id="sizeChartModal" class="modal fade" role="dialog"> <div class="modal-dialog" style="overflow-y: initial !important"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title"><?php echo $get_size_chart_detail['chart_title']; ?></h4> </div> <div class="modal-body" style="height: auto;overflow-y: auto;"> <?php echo $get_size_chart_detail['chart_description_top']; ?> <!-- Table Header --> <table class="sizechart"> <tr class="chart-header-bg"> <?php $kk=0; foreach(unserialize($get_size_chart_detail['chart_headings']) as $chart_headings) if(isset($chart_headings) && $chart_headings!='') { echo '<th class="chart-header">'.$chart_headings.'</th>'; $kk++; } ?> </tr> <tr class="chart-data"> <!-- Table Chart Data --> <?php $i = 1; foreach(unserialize($get_size_chart_detail['chart_data']) as $chart_data){ if(isset($chart_data) && $chart_data!='') { echo '<td>'.$chart_data.'</td>'; if($i % $kk == 0){ echo '</tr><tr class="chart-data">'; } $i++; } } ?> </tr> </table> <br /> <?php echo $get_size_chart_detail['chart_description_bottom']; ?> </div> </div> </div> </div> ]]></add> </operation> </file> Код который был переделан через phptotwig.com <file path="catalog/view/theme/*/template/product/product.twig"> <operation> <search><![CDATA[ {{ footer }} ]]></search> <add position="before"><![CDATA[ <!-- Modal --> <div id="sizeChartModal" class="modal fade" role="dialog"> <div class="modal-dialog" style="overflow-y: initial !important"> <!-- Modal content--> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal">×</button> <h4 class="modal-title">{{ get_size_chart_detail['chart_title'] }}</h4> </div> <div class="modal-body" style="height: auto;overflow-y: auto;"> {{ get_size_chart_detail['chart_description_top'] }} <!-- Table Header --> <table class="sizechart"> <tr class="chart-header-bg"> {% set kk=0 %} {% for chart_headings in unserialize(get_size_chart_detail['chart_headings']) %} {% if (chart_headings is defined and chart_headings != '') %} {{ '<th class="chart-header">'~chart_headings~'</th>' }} {% set kk = kk + 1 %} {% endfor %} {% endif %} </tr> <tr class="chart-data"> <!-- Table Chart Data --> {% set i = 1 %} {% for chart_data in unserialize(get_size_chart_detail['chart_data']) %} {% if (chart_data is defined and chart_data != '') %} {{ '<td>'~chart_data~'</td>' }} {% if (i % kk == 0) %} {{ '</tr><tr class="chart-data">' }} {% endif %} {% set i = i + 1 %} {% endif %} {% endfor %} </tr> </table> <br /> {{ get_size_chart_detail['chart_description_bottom'] }} </div> </div> </div> </div> ]]></add> </operation> </file> Так как я особо не знаю PHP, а с twig знаком только с jekyll кто-то может подсказать или помочь?