// Context part 17
This commit is contained in:
@@ -30,9 +30,15 @@ define('PS_ADMIN_DIR', getcwd());
|
||||
include(PS_ADMIN_DIR.'/../config/config.inc.php');
|
||||
|
||||
/* Header can't be included, so cookie must be created here */
|
||||
$context = Context::getContext();
|
||||
|
||||
$cookie = new Cookie('psAdmin');
|
||||
if (!$cookie->id_employee)
|
||||
Tools::redirectAdmin('login.php');
|
||||
|
||||
$context->employee = new Employee($cookie->id_employee);
|
||||
$context->language = new Language($context->employee->id_lang);
|
||||
$context->country = $defaultCountry;
|
||||
|
||||
$functionArray = array(
|
||||
'pdf' => 'generateInvoicePDF',
|
||||
|
||||
@@ -258,10 +258,13 @@ class AdminCarts extends AdminTab
|
||||
|
||||
if (is_array($customizedDatas) AND isset($customizedDatas[(int)($product['id_product'])][(int)($product['id_product_attribute'])]))
|
||||
{
|
||||
$image = new Image($image['id_image']);
|
||||
if (isset($image['id_image']))
|
||||
$image = new Image($image['id_image']);
|
||||
else
|
||||
$image = new Image();
|
||||
echo '
|
||||
<tr>
|
||||
<td align="center">'.(isset($image['id_image']) ? cacheImage(_PS_IMG_DIR_.'p/'.$image->getExistingImgPath().'.jpg',
|
||||
<td align="center">'.($image->id ? cacheImage(_PS_IMG_DIR_.'p/'.$image->getExistingImgPath().'.jpg',
|
||||
'product_mini_'.(int)($product['id_product']).(isset($product['id_product_attribute']) ? '_'.(int)($product['id_product_attribute']) : '').'.jpg', 45, 'jpg') : '--').'</td>
|
||||
<td><a href="index.php?tab=AdminCatalog&id_product='.$product['id_product'].'&updateproduct&token='.$tokenCatalog.'">
|
||||
<span class="productName">'.$product['name'].'</span><br />
|
||||
|
||||
@@ -32,6 +32,7 @@ class AdminShipping extends AdminTab
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$context = Context::getContext();
|
||||
$this->table = 'delivery';
|
||||
$this->_fieldsHandling = array(
|
||||
'PS_SHIPPING_HANDLING' => array('title' => $this->l('Handling charges'), 'suffix' => $context->currency, 'validation' => 'isPrice', 'cast' => 'floatval'),
|
||||
@@ -189,6 +190,7 @@ class AdminShipping extends AdminTab
|
||||
|
||||
public function displayFormFees()
|
||||
{
|
||||
$context = Context::getContext();
|
||||
$carrierArray = array();
|
||||
$id_carrier = Tools::getValue('id_carrier');
|
||||
$carriers = Carrier::getCarriers(Configuration::get('PS_LANG_DEFAULT'), true , false,false, NULL, PS_CARRIERS_AND_CARRIER_MODULES_NEED_RANGE);
|
||||
|
||||
Reference in New Issue
Block a user