Пример #1
0
<?php

/*
  osCommerce Online Merchant $osCommerce-SIG$
  Copyright (c) 2010 osCommerce (http://www.oscommerce.com)

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License v2 (1991)
  as published by the Free Software Foundation.
*/
use osCommerce\OM\Core\Site\Shop\Reviews;
use osCommerce\OM\Core\OSCOM;
use osCommerce\OM\Core\DateTime;
$Qreviews = Reviews::getListing();
?>

<?php 
echo osc_image(DIR_WS_IMAGES . $OSCOM_Template->getPageImage(), $OSCOM_Template->getPageTitle(), HEADING_IMAGE_WIDTH, HEADING_IMAGE_HEIGHT, 'id="pageIcon"');
?>

<h1><?php 
echo $OSCOM_Template->getPageTitle();
?>
</h1>

<?php 
while ($Qreviews->next()) {
    ?>

<div class="moduleBox">
  <div style="float: right; margin-top: 5px;"><?php 
</div>

<?php 
}
if ($OSCOM_Product->getData('reviews_average_rating') > 0) {
    ?>

<p><?php 
    echo OSCOM::getDef('average_rating') . ' ' . HTML::image(OSCOM::getPublicSiteLink('images/stars_' . $OSCOM_Product->getData('reviews_average_rating') . '.png'), sprintf(OSCOM::getDef('rating_of_5_stars'), $OSCOM_Product->getData('reviews_average_rating')));
    ?>
</p>

<?php 
}
$counter = 0;
$reviews_listing = Reviews::getListing($OSCOM_Product->getID());
foreach ($reviews_listing['entries'] as $r) {
    $counter++;
    if ($counter > 1) {
        ?>

<hr style="height: 1px; width: 150px; text-align: left; margin-left: 0px" />

<?php 
    }
    ?>

<p><?php 
    echo HTML::image(OSCOM::getPublicSiteLink('images/stars_' . (int) $r['reviews_rating'] . '.png'), sprintf(OSCOM::getDef('rating_of_5_stars'), (int) $r['reviews_rating'])) . '&nbsp;' . sprintf(OSCOM::getDef('reviewed_by'), HTML::outputProtected($r['customers_name'])) . '; ' . DateTime::getLong($r['date_added']);
    ?>
</p>
Пример #3
0
<?php

/**
 * osCommerce Online Merchant
 * 
 * @copyright Copyright (c) 2011 osCommerce; http://www.oscommerce.com
 * @license BSD License; http://www.oscommerce.com/bsdlicense.txt
 */
use osCommerce\OM\Core\DateTime;
use osCommerce\OM\Core\HTML;
use osCommerce\OM\Core\OSCOM;
use osCommerce\OM\Core\PDO;
use osCommerce\OM\Core\Site\Shop\Reviews;
$reviews_listing = Reviews::getListing();
?>

<h1><?php 
echo $OSCOM_Template->getPageTitle();
?>
</h1>

<?php 
foreach ($reviews_listing['entries'] as $r) {
    ?>

<div class="moduleBox">
  <div style="float: right; margin-top: 5px;"><?php 
    echo sprintf(OSCOM::getDef('review_date_added'), DateTime::getLong($r['date_added']));
    ?>
</div>