afish

当前登录的客户买过此产品时,才显示评价按钮:

<?php
$rev_query = "select count(*) as count from orders o ,orders_products op" ."
where op.products_id = \'" . (int)$_GET[\'products_id\'] . "\'
and o.orders_id=op.orders_id
and o.customers_id = \'" . (int)$_SESSION[\'customer_id\'] . "\'" ;
$rev = $db->Execute($rev_query);
if ($rev->fields[\'count\']>0)
{
?>
<div id="productReviewLink" class="buttonRow back"><?php echo \'<a href="\' . zen_href_link(FILENAME_PRODUCT_REVIEWS_WRITE, zen_get_all_get_params(array())) . \'">\' . zen_image_button(BUTTON_IMAGE_WRITE_REVIEW, BUTTON_WRITE_REVIEW_ALT) . \'</a>\'; ?></div>
<br class=”clearBoth” />
<?php
}
?>

 

分类:

技术点:

相关文章:

  • 2021-09-06
  • 2022-03-02
  • 2022-12-23
  • 2022-12-23
  • 2021-09-03
  • 2021-12-06
  • 2021-12-12
  • 2022-01-14
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-16
  • 2021-12-15
  • 2022-12-23
  • 2022-01-03
  • 2021-12-08
相关资源
相似解决方案