我是prestashop的新手,我正在尝试自己创建一个ecomm,我正在使用市场,并将产品参考添加为作者姓名,并成功显示在后端。但我的问题是它没有显示在前端(产品页面)。 但是,当管理员创建这些字段时,所有字段都显示在产品页面中。 前端和后端的屏幕截图位于下方。the author and isbn fields are appearing
But here the author and isbn are empty
PLEASEE HELP
答案 0 :(得分:0)
As you can see, you have some problem in your code. First of all you should read something about prestashop and creating shops. Next step is to fix a problem in a file smarty_internal_templatebase.php in line 53.
As I can see you have a problem with product's publisher. I assume your code looks like this:
<p id="publisher">{$product->publisher}</p>
// in other words
<p id="publisher">[show publisher no matter what]</p>
In the scenario above, we can clearly see that if a product we want to show doesn't have a publisher, then we are stuck.
I recommend your code to look this way:
<p id="publisher">{if $product->publisher}{$product->publisher}{else}No publisher{/if}</p>
// again in other words
<p id="publisher">[if publisher exists, show it, else write something else]</p>
Try to check on that and let us know what you've found.
Cheers, Mentozz.