/** * Controller for Deleting Records. */ function delete_review(&$d) { $record_id = $d["review_id"]; if (is_array($record_id)) { foreach ($record_id as $record) { if (!ps_reviews::delete_record($record, $d)) { return false; } } return true; } else { return ps_reviews::delete_record($record_id, $d); } }
$product_name .= " (" . $VM_LANG->_('CMN_UNPUBLISHED', false) . ")"; } if (empty($product_name) && $product_parent_id != 0) { $product_name = $dbp->f("product_name"); // Use product_name from Parent Product } $product_s_desc = $db_browse->f("product_s_desc"); if (empty($product_s_desc) && $product_parent_id != 0) { $product_s_desc = $dbp->f("product_s_desc"); // Use product_s_desc from Parent Product } $product_details = $VM_LANG->_('PHPSHOP_FLYPAGE_LBL'); if (PSHOP_ALLOW_REVIEWS == '1' && @$_REQUEST['output'] != "pdf") { // Average customer rating: xxxxx // Total votes: x $product_rating = ps_reviews::allvotes($db_browse->f("product_id")); } else { $product_rating = ""; } // Add-to-Cart Button if (USE_AS_CATALOGUE != '1' && $product_price != "" && !stristr($product_price, $VM_LANG->_('PHPSHOP_PRODUCT_CALL')) && !ps_product::product_has_attributes($db_browse->f('product_id'), true) && $tpl->get_cfg('showAddtocartButtonOnProductList')) { $tpl->set('i', $i); $tpl->set('product_id', $db_browse->f('product_id')); $tpl->set('product_in_stock', $db_browse->f('product_in_stock')); $tpl->set('ps_product_attribute', $ps_product_attribute); $products[$i]['form_addtocart'] = $tpl->fetch('browse/includes/addtocart_form.tpl.php'); $products[$i]['has_addtocart'] = true; } else { $products[$i]['form_addtocart'] = ''; $products[$i]['has_addtocart'] = false; }
$ask_seller_href = $sess->url($_SERVER['PHP_SELF'] . '?page=shop.ask&flypage=' . @$_REQUEST['flypage'] . "&product_id={$product_id}&category_id={$category_id}"); $ask_seller_text = $VM_LANG->_('VM_PRODUCT_ENQUIRY_LBL'); $ask_seller = '<a class="button" href="' . $ask_seller_href . '">' . $ask_seller_text . '</a>'; /* SHOW RATING */ $product_rating = ""; if (PSHOP_ALLOW_REVIEWS == '1') { $product_rating = ps_reviews::allvotes($product_id); } $product_reviews = $product_reviewform = ""; /* LIST ALL REVIEWS **/ if (PSHOP_ALLOW_REVIEWS == '1') { /*** Show all reviews available ***/ $product_reviews = ps_reviews::product_reviews($product_id); /*** Show a form for writing a review ***/ if ($auth['user_id'] > 0) { $product_reviewform = ps_reviews::reviewform($product_id); } } /* LINK TO VENDOR-INFO POP-UP **/ $vend_id = $ps_product->get_vendor_id($product_id); $vend_name = $ps_product->get_vendorname($product_id); $link = "{$mosConfig_live_site}/index2.php?page=shop.infopage&vendor_id={$vend_id}&output=lite&option=com_virtuemart&Itemid=" . $Itemid; $text = $VM_LANG->_('PHPSHOP_VENDOR_FORM_INFO_LBL'); $vendor_link = vmPopupLink($link, $text); // Avoid JavaScript on PDF Output if (@$_REQUEST['output'] == "pdf") { $vendor_link = "<a href=\"{$link}\" target=\"_blank\" title=\"{$text}\">{$text}</a>"; } if ($product_parent_id != 0 && !$ps_product_type->product_in_product_type($product_id)) { $product_type = $ps_product_type->list_product_type($product_parent_id); } else {