/** * This function is used to get the product review . * * @param array $Err * * @return array */ function showProductReview($Err) { if ($_GET['prodid'] != '') { $productid = $_GET['prodid']; } else { if ($_POST['prodid'] != '') { $productid = $_POST['prodid']; } } $obj = new Bin_Query(); $sql2 = "select count(*) as temp from product_reviews_table where product_id=" . $productid . " and review_status=1"; $obj->executeQuery($sql2); $totreview = $obj->records[0]['temp']; if ($totreview == 0) { $sql = "select product_id,title,thumb_image from products_table where product_id=" . $productid; } else { $sql = "SELECT a.review_caption, a.review_txt, a.review_date,a.rating,b.user_display_name, c.product_id, c.title, c.thumb_image FROM product_reviews_table a INNER JOIN products_table c ON a.product_id = c.product_id inner join users_table b on a.user_id = b.user_id WHERE a.product_id =" . $productid . " and a.review_status=1"; } $breadcrumb = Core_CProductReview::breadCrumb(); if ($obj->executeQuery($sql)) { $output = Display_DProductReview::showProductReview($obj->records, $Err, $totreview, $breadcrumb); } else { $output = "<div class='exc_msgbox'>No Record Found</div>"; } return $output; }
/** * This function is used to Display the compare product page * * @return string */ function compareProduct() { include "classes/Lib/HandleErrors.php"; $output['val'] = $Err->values; $output['msg'] = $Err->messages; include 'classes/Core/CProductReview.php'; include 'classes/Display/DProductReview.php'; include 'classes/Display/DWishList.php'; include 'classes/Core/CUserRegistration.php'; include 'classes/Display/DUserRegistration.php'; include 'classes/Core/CWishList.php'; include_once 'classes/Core/CNewProducts.php'; include_once 'classes/Display/DNewProducts.php'; include 'classes/Core/CKeywordSearch.php'; include 'classes/Display/DKeywordSearch.php'; include 'classes/Core/CHome.php'; include 'classes/Core/CAddCart.php'; include 'classes/Display/DAddCart.php'; include_once 'classes/Core/CLastViewedProducts.php'; include_once 'classes/Display/DLastViewedProducts.php'; include_once 'classes/Core/CCurrencySettings.php'; Core_CCurrencySettings::getDefaultCurrency(); $output['signup'] = Display_DUserRegistration::signUp(); $default = new Core_CLastViewedProducts(); $output['lastviewedproducts'] = $default->lastViewedProducts(); $output['sitelogo'] = Core_CHome::getLogo(); $output['pagetitle'] = Core_CHome::pageTitle(); $output['timezone'] = Core_CHome::setTimeZone(); $output['currentDate'] = date('D,M d,Y - h:i A'); $output['skinname'] = Core_CHome::skinName(); $output['googleanalytics'] = Core_CHome::getGoogleAnalyticsCode(); $output['footer'] = Core_CHome::footer(); $output['footerconnect'] = Core_CHome::getfooterconnect(); $output['sociallink'] = Core_CHome::showSocialLinks(); $output['dropdowncat'] = Core_CKeywordSearch::categoryDropDown(); $output['reviewproduct'] = Core_CProductReview::showProductReview($Err); $output['cartSnapShot'] = Core_CAddCart::cartSnapShot(); $output['viewProducts'] = Core_CWishList::addtoCompareProduct(); $default = new Core_CWishList(); $output['wishlist'] = $default->addtoWishList(); $output['loginStatus'] = Core_CUserRegistration::loginStatus(); $output['headermenu'] = Core_CUserRegistration::showHeaderMenu(); $output['headermenuhidden'] = Core_CUserRegistration::showHeaderMenuHidden(); $output['headertext'] = Core_CUserRegistration::showHeaderText(); $default = new Core_CNewProducts(); $output['newproducts'] = $default->newProducts(); $output['wishlistsnapshot'] = Core_CWishList::wishlistSnapshot(); Bin_Template::createTemplate('reviews.html', $output); }