我有自定义实现-在那里我可以添加到产品项,我可以获得如下产品项:
<?php if(!empty($cart_item[\'more_product\'])) :
$first_array = array_slice($cart_item[\'more_product\'],0,4);
$second_array = array_slice($cart_item[\'more_product\'],4);
?>
<div class="products__includes">
<div class="products__includes__btn active">
Set includes
</div>
<div class="products__includes__wrap">
<div class="products__includes__inner">
<table>
<tbody>
<?php foreach($first_array as $piece): ?>
<tr>
<th><?php echo $piece[\'title\'];?></th>
<th><?php echo $piece[\'count\'];?></th>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php if(!empty($second_array)):?>
<table>
<tbody>
<?php foreach($second_array as $piece): ?>
<tr>
<th><?php echo $piece[\'title\'];?></th>
<th><?php echo $piece[\'count\'];?></th>
</tr>
<?php endforeach;?>
</tbody>
</table>
<?php endif; ?>
</div>
</div>
</div>
<?php endif; ?>
我需要把一切都安排好,我该怎么办?