晓天 商品生成代码 横排竖排 还是有问题!

2016-07-07 15:28 来源:www.chinab4c.com 作者:ecshop专家



http://192.168.1.100/1j1h/goods_script.php?intro_type=is_promote&need_image=true&goods_num=3&arrange=h&rows_num=1&charset=UTF8&sitename=flow

http://192.168.1.100/1j1h/goods_script.php?intro_type=is_promote&need_image=true&goods_num=3&arrange=v&rows_num=1&charset=UTF8&sitename=flow
$goodsinfo = '<table>商品信息表格</table>';

arrange => h 和 v生了两次代码
是一样的格式:

<table>
<tr><td>$goodsinfo </td></tr>
<tr><td>$goodsinfo </td></tr>
<tr><td>$goodsinfo </td></tr>
</table>

按理h应该生成这样的吧?
<table>
<tr>
<td>$goodsinfo </td>
<td>$goodsinfo </td>
<td>$goodsinfo </td>
</tr>
</table>

你上次给我生成了有一次,不知道你是怎么生成的。麻烦看下是不是goods_script.html 和新版本代码一样。
goods_script.html 源码:
  1. <table width="100%" border="0" cellspacing="0" cellpadding="0">

  2. {foreach from=$goods_list item=goods_item}
  3. {foreach from=$goods_item item=goods}
  4. <tr>

  5. <td><table width="100%">
  6. {if $need_image}
  7. <tr>
  8. <td align="left"><a href="{$goods_url}{$goods.goods_id}" target="_blank"><img src="{$url}{$goods.goods_thumb}" alt="{$goods.goods_name}" border="0" {if $thumb_width and $thumb_height}width="{$thumb_width}" height="{$thumb_height}"{/if}></a></td>
  9. </tr>
  10. {/if}
  11. <tr>
  12. <td align="left" style="color:red;"><a href="{$goods_url}{$goods.goods_id}" target="_blank">{$goods.goods_name}</a><br />{$goods.goods_price}</td>
  13. </tr>
  14. </table></td>

  15. </tr>
  16. {/foreach}
  17. {/foreach}

  18. </table>
复制代码
老版本在goods_script.html 里直接对arrange进行了控制很明了,那个多好。