Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在 Opencart 产品页面的库存状态下方添加一行文本。我认为一个简单的 PHP If Then 可以解决问题,但遗憾的是我一定做错了。有人可以帮我吗?
谢谢!
<?php if ($text_stock > 0) echo "If ordered before 5pm this product ships same day"; ?>
尝试使用
if ($product_info['quantity'] > 0) {
反而。也就是直接从数据库中拉取的数据