// Context part 17

This commit is contained in:
tDidierjean
2011-07-22 09:35:28 +00:00
parent 3f9a9e41d7
commit 112b465f96
8 changed files with 30 additions and 11 deletions
+6
View File
@@ -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',
+5 -2
View File
@@ -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 />
+2
View File
@@ -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);