|
魔扣币兑换比例:【 50以下 : ¥1 = 10 魔扣币 】丨【 50 - 100 :¥1 = 20 魔扣币】丨【 100以上:¥1 = 30 魔扣币 】
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?立即注册
x
如果你已经安装了zencart免注册写评论插件最好,因为我会对一个共同的文件做修改,如果没有,请看下面:
1,直接显示评论框,在tpl_product_info_display.php调用代码:
- <?php require($template->get_template_dir('tpl_product_reviews_write_default.php', DIR_WS_TEMPLATE, $current_page_base,'templates'). '/' . 'tpl_product_reviews_write_default.php');?>
复制代码 注意:引用此段代码之后,还要将此文件中的</form>移到<!--eof Add to Cart Box-->后面。
2,修改tpl_product_reviews_write_default.php文件。默认这个文件会将产品的图片,名字,价格都显示出来。但是评论框就在此页显示,所以不需要,将其删掉。以及开头的<div id="reviewsWrite">和结尾的</div>也要删掉。至此之后,产品页面的详细评论是不是就正常了呢,没有。
3,页面会出现PHP的静态常量,类似SUB_TITLE_REVIEW这样的字段,这是因为没有声明,打开 includes/languages/english/你的模板目录/product_info.php,在里面加入以下代码:
- //write review default
- define('NAVBAR_TITLE', 'Reviews');
-
- define('SUB_TITLE_FROM', 'Written by:');
- define('SUB_TITLE_REVIEW', 'Please tell us what you think and share your opinions with others. Be sure to focus your comments on the product.');
- define('SUB_TITLE_RATING', 'Choose a ranking for this item. 1 star is the worst and 5 stars is the best.');
-
- define('TEXT_NO_HTML', '<strong>NOTE:</strong> HTML tags are not allowed.');
- define('TEXT_BAD', 'Worst');
- define('TEXT_GOOD', 'Best');
- define('TEXT_PRODUCT_INFO', '');
-
- define('TEXT_APPROVAL_REQUIRED', '<strong>NOTE:</strong> Reviews require prior approval before they will be displayed');
-
- define('EMAIL_REVIEW_PENDING_SUBJECT','Product Review Pending Approval: %s');
- define('EMAIL_PRODUCT_REVIEW_CONTENT_INTRO','A Product Review for %s has been submitted and requires your approval.'."\n\n");
- define('EMAIL_PRODUCT_REVIEW_CONTENT_DETAILS','Review Details: %s');
复制代码 这样就会显示正常了,评论之后会进入审核。后台Catlog---Reviews 进行通过审核,如果想评论之后直接显示出来,不用审核,后台Configuration---Product Info---Product Reviews Require Approval 设置为0即可。
设置过程中碰到任何问题,请在本博客留言,我会耐心为你解答!
|
|