Home >Backend Development >PHP Tutorial >织梦内容页文档页,php逻辑调用dede:field.price控制显示原价优惠价

织梦内容页文档页,php逻辑调用dede:field.price控制显示原价优惠价

WBOY
WBOYOriginal
2016-06-20 12:48:011017browse

 <p class="p2"><span>¥</span>{dede:field.trueprice/}   <em> {dede:field.price runphp='yes'}if (@me==0){@me = ''; }else{ @me='(原价 ¥ '.@me.')';}{/dede:field.price}</em>      </p>

逻辑是,如果原价为0,则前台不显示原价的相关代码,否则显示 原价为多少元

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn