/** * Function displays a edit template for updating a product * * * @return array */ function editProduct() { include 'classes/Core/CRoleChecking.php'; include_once 'classes/Core/Settings/CManageProducts.php'; include 'classes/Core/CAdminHome.php'; include 'classes/Core/CProductEntry.php'; include 'classes/Display/DManageProducts.php'; include 'classes/Display/DProductEntry.php'; $chkuser = Core_CRoleChecking::checkRoles(); if ($chkuser) { $default = new Core_Settings_CManageProducts(); $output['username'] = Core_CAdminHome::userName(); $output['currentDate'] = date('l, M d, Y H:i:s'); $output['dropcategory'] = $default->displayCategory($id); $output['dispproduct'] = $default->editProduct(); $output['id'] = $default->getId(); // $output['editMainCategory']=$default->editMainCategory(); // $output['editSubCategory']=$default->editSubCategory(); // $output['editSubUnderCategory']=$default->editSubUnderCategory(); $output['editMainImage'] = $default->editMainImage(); /*$output['thumb_image_path']=$output['editMainImage']['thumb_image_path']; $output['product_images_id']=$output['editMainImage']['product_images_id'];*/ $output['editImage'] = $default->editImage(); $output['editRelated'] = $default->editRelated(); $output['editAttributes'] = $default->editAttributes(); $output['editTierPrice'] = $default->editTierPrice(); $output['editVarition'] = $default->editVariation(); $output['editGeneral'] = $default->editGeneral(); $output['product_id'] = $output['editGeneral']['product_id']; $output['category_id'] = $output['editGeneral']['category_id']; $output['sku'] = $output['editGeneral']['sku']; $output['product_title'] = $output['editGeneral']['title']; $output['product_alias'] = $output['editGeneral']['alias']; $output['description'] = $output['editGeneral']['description']; $output['brand'] = $output['editGeneral']['brand']; $output['dispbrand'] = Core_CProductEntry::dispBrand($output['brand']); $output['corbrand'] = $default->corBrand($output['brand']); $output['model'] = $output['editGeneral']['model']; $output['txtweight'] = $output['editGeneral']['weight']; if (!empty($output['editGeneral']['dimension'])) { $strdim = array(); $strdim = explode('x', $output['editGeneral']['dimension']); $output['txtwidth'] = trim($strdim[0]); $output['txtheight'] = trim($strdim[1]); $output['txtdepth'] = trim($strdim[2]); } $output['currencycode'] = $_SESSION['currency']['currency_code']; $output['msrp_org'] = $output['editGeneral']['msrp']; $output['price'] = $output['editGeneral']['price']; $output['thumb_image'] = $output['editGeneral']['thumb_image']; $output['image'] = $output['editGeneral']['image']; $output['shipcost'] = $output['editGeneral']['shipping_cost']; $output['tag'] = $output['editGeneral']['tag']; $output['intro_date'] = $output['editGeneral']['intro_date']; $output['meta_desc'] = $output['editGeneral']['meta_desc']; $output['meta_keywords'] = $output['editGeneral']['meta_keywords']; $output['csekeyid'] = $output['editGeneral']['cse_key']; if ($output['editGeneral']['is_featured'] == 1) { $output['is_featured'] = 'checked="checked"'; } else { $output['is_featured'] = ''; } if ($output['editGeneral']['product_status'] == 1) { $output['is_new_product'] = 'checked="checked"'; } else { $output['is_new_product'] = ''; } if ($output['editGeneral']['product_status'] == 2) { $output['is_discount_product'] = 'checked="checked"'; } else { $output['is_discount_product'] = ''; } if ($output['editGeneral']['cse_enabled'] == 1) { $output['cse_enabled'] = 'checked="checked"'; } else { $output['cse_enabled'] = ''; } if ($output['editGeneral']['status'] == 1) { $output['status'] = 'checked="checked"'; } else { $output['status'] = ''; } $output['editInventory'] = $default->editInventory(); $output['rol'] = $output['editInventory']['rol']; $output['soh'] = $output['editInventory']['soh']; //********************END**************************************************// Bin_Template::createTemplate('editproduct.html', $output); } else { $output['usererr'] = 'You are Not having Privilege to view this page contact your Admin for detail'; Bin_Template::createTemplate('Errors.html', $output); } }
/** * Function is used to check the product sku * * * @return array */ function checkProductSku() { include 'classes/Core/CProductEntry.php'; echo Core_CProductEntry::checkProductSku(); }