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

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

WBOY
Release: 2016-06-20 12:48:01
Original
1021 people have browsed it

 <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>
Copy after login

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

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template