// Context part 12
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7649 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -71,9 +71,9 @@ class authorizeAIM extends PaymentModule
|
||||
return;
|
||||
|
||||
if ($params['objOrder']->getCurrentState() != _PS_OS_ERROR_)
|
||||
$context->controller->smarty->assign(array('status' => 'ok', 'id_order' => intval($params['objOrder']->id)));
|
||||
$context->smarty->assign(array('status' => 'ok', 'id_order' => intval($params['objOrder']->id)));
|
||||
else
|
||||
$context->controller->smarty->assign('status', 'failed');
|
||||
$context->smarty->assign('status', 'failed');
|
||||
|
||||
return $this->display(__FILE__, 'hookorderconfirmation.tpl');
|
||||
}
|
||||
@@ -167,9 +167,9 @@ class authorizeAIM extends PaymentModule
|
||||
$cards['discover'] = Configuration::get('AUTHORIZE_AIM_CARD_DISCOVER') == 'on' ? 1 : 0;
|
||||
$cards['ax'] = Configuration::get('AUTHORIZE_AIM_CARD_AX') == 'on' ? 1 : 0;
|
||||
|
||||
$context->controller->smarty->assign('p', $authorizeAIMParams);
|
||||
$context->controller->smarty->assign('cards', $cards);
|
||||
$context->controller->smarty->assign('isFailed', $isFailed);
|
||||
$context->smarty->assign('p', $authorizeAIMParams);
|
||||
$context->smarty->assign('cards', $cards);
|
||||
$context->smarty->assign('isFailed', $isFailed);
|
||||
|
||||
return $this->display(__FILE__, 'authorizeaim.tpl');
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ class BankWire extends PaymentModule
|
||||
|
||||
$context = Context::getContext();
|
||||
|
||||
$context->controller->smarty->assign(array(
|
||||
$context->smarty->assign(array(
|
||||
'nbProducts' => $cart->nbProducts(),
|
||||
'cust_currency' => $cart->id_currency,
|
||||
'currencies' => $this->getCurrency((int)$cart->id_currency),
|
||||
@@ -192,7 +192,7 @@ class BankWire extends PaymentModule
|
||||
|
||||
$context = Context::getContext();
|
||||
|
||||
$context->controller->smarty->assign(array(
|
||||
$context->smarty->assign(array(
|
||||
'this_path' => $this->_path,
|
||||
'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/'
|
||||
));
|
||||
@@ -207,7 +207,7 @@ class BankWire extends PaymentModule
|
||||
$context = Context::getContext();
|
||||
$state = $params['objOrder']->getCurrentState();
|
||||
if ($state == _PS_OS_BANKWIRE_ OR $state == _PS_OS_OUTOFSTOCK_)
|
||||
$context->controller->smarty->assign(array(
|
||||
$context->smarty->assign(array(
|
||||
'total_to_pay' => Tools::displayPrice($params['total_to_pay'], $params['currencyObj'], false),
|
||||
'bankwireDetails' => nl2br2($this->details),
|
||||
'bankwireAddress' => nl2br2($this->address),
|
||||
@@ -216,7 +216,7 @@ class BankWire extends PaymentModule
|
||||
'id_order' => $params['objOrder']->id
|
||||
));
|
||||
else
|
||||
$context->controller->smarty->assign('status', 'failed');
|
||||
$context->smarty->assign('status', 'failed');
|
||||
return $this->display(__FILE__, 'payment_return.tpl');
|
||||
}
|
||||
|
||||
|
||||
@@ -210,9 +210,9 @@ class BlockAdvertising extends Module
|
||||
{
|
||||
$context = Context::getContext();
|
||||
$context->controller->addCSS($this->_path.'blockadvertising.css', 'all');
|
||||
$context->controller->smarty->assign('image', $context->link->protocol_content.$this->adv_img);
|
||||
$context->controller->smarty->assign('adv_link', $this->adv_link);
|
||||
$context->controller->smarty->assign('adv_title', $this->adv_title);
|
||||
$context->smarty->assign('image', $context->link->protocol_content.$this->adv_img);
|
||||
$context->smarty->assign('adv_link', $this->adv_link);
|
||||
$context->smarty->assign('adv_title', $this->adv_title);
|
||||
|
||||
return $this->display(__FILE__, 'blockadvertising.tpl');
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ class BlockBestSellers extends Module
|
||||
$bestseller['price'] = Tools::displayPrice(Product::getPriceStatic((int)($bestseller['id_product'])), $currency);
|
||||
$best_sellers[] = $bestseller;
|
||||
}
|
||||
$context->controller->smarty->assign(array(
|
||||
$context->smarty->assign(array(
|
||||
'best_sellers' => $best_sellers,
|
||||
'mediumSize' => Image::getSize('medium')));
|
||||
return $this->display(__FILE__, 'blockbestsellers.tpl');
|
||||
|
||||
@@ -161,8 +161,8 @@ class BlockCart extends Module
|
||||
return;
|
||||
|
||||
$context = Context::getContext();
|
||||
$context->controller->smarty->assign('order_page', strpos($_SERVER['PHP_SELF'], 'order') !== false);
|
||||
$this->smartyAssigns($context->controller->smarty, $params);
|
||||
$context->smarty->assign('order_page', strpos($_SERVER['PHP_SELF'], 'order') !== false);
|
||||
$this->smartyAssigns($context->smarty, $params);
|
||||
return $this->display(__FILE__, 'blockcart.tpl');
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ class BlockCart extends Module
|
||||
return;
|
||||
|
||||
$context = Context::getContext();
|
||||
$this->smartyAssigns($context->controller->smarty, $params);
|
||||
$this->smartyAssigns($context->smarty, $params);
|
||||
$res = $this->display(__FILE__, 'blockcart-json.tpl');
|
||||
return $res;
|
||||
}
|
||||
|
||||
@@ -186,11 +186,10 @@ class BlockCategories extends Module
|
||||
if ($blockCategTree['id'] != $shopcurrentroot)
|
||||
$blockCategTree = $this->cleanTree($blockCategTree['children']);
|
||||
$isDhtml = (Configuration::get('BLOCK_CATEG_DHTML') == 1 ? true : false);
|
||||
|
||||
if (Tools::isSubmit('id_category'))
|
||||
{
|
||||
$context->cookie->last_visited_category = $id_category;
|
||||
$context->controller->smarty->assign('currentCategoryId', $context->cookie->last_visited_category);
|
||||
$context->smarty->assign('currentCategoryId', $context->cookie->last_visited_category);
|
||||
}
|
||||
if (Tools::isSubmit('id_product'))
|
||||
{
|
||||
@@ -200,17 +199,17 @@ class BlockCategories extends Module
|
||||
if (isset($product) AND Validate::isLoadedObject($product))
|
||||
$context->cookie->last_visited_category = (int)($product->id_category_default);
|
||||
}
|
||||
$context->controller->smarty->assign('currentCategoryId', (int)($context->cookie->last_visited_category));
|
||||
$context->smarty->assign('currentCategoryId', (int)($context->cookie->last_visited_category));
|
||||
}
|
||||
$context->controller->smarty->assign('blockCategTree', $blockCategTree);
|
||||
$context->smarty->assign('blockCategTree', $blockCategTree);
|
||||
|
||||
if (file_exists(_PS_THEME_DIR_.'modules/blockcategories/blockcategories.tpl'))
|
||||
$context->controller->smarty->assign('branche_tpl_path', _PS_THEME_DIR_.'modules/blockcategories/category-tree-branch.tpl');
|
||||
$context->smarty->assign('branche_tpl_path', _PS_THEME_DIR_.'modules/blockcategories/category-tree-branch.tpl');
|
||||
else
|
||||
$context->controller->smarty->assign('branche_tpl_path', _PS_MODULE_DIR_.'blockcategories/category-tree-branch.tpl');
|
||||
$context->controller->smarty->assign('isDhtml', $isDhtml);
|
||||
$context->smarty->assign('branche_tpl_path', _PS_MODULE_DIR_.'blockcategories/category-tree-branch.tpl');
|
||||
$context->smarty->assign('isDhtml', $isDhtml);
|
||||
}
|
||||
$context->controller->smarty->cache_lifetime = 31536000; // 1 Year
|
||||
$context->smarty->cache_lifetime = 31536000; // 1 Year
|
||||
$display = $this->display(__FILE__, 'blockcategories.tpl', $smartyCacheId);
|
||||
Tools::restoreCacheSettings();
|
||||
return $display;
|
||||
@@ -258,8 +257,8 @@ class BlockCategories extends Module
|
||||
$nbrColumns=3;
|
||||
$numberColumn = abs(sizeof($result)/$nbrColumns);
|
||||
$widthColumn= floor(100/$nbrColumns);
|
||||
$context->controller->smarty->assign('numberColumn', $numberColumn);
|
||||
$context->controller->smarty->assign('widthColumn', $widthColumn);
|
||||
$context->smarty->assign('numberColumn', $numberColumn);
|
||||
$context->smarty->assign('widthColumn', $widthColumn);
|
||||
|
||||
$blockCategTree = $this->getTree($resultParents, $resultIds, Configuration::get('BLOCK_CATEG_MAX_DEPTH'));
|
||||
unset($resultParents);
|
||||
@@ -274,7 +273,7 @@ class BlockCategories extends Module
|
||||
if (Tools::isSubmit('id_category'))
|
||||
{
|
||||
$context->cookie->last_visited_category = $id_category;
|
||||
$context->controller->smarty->assign('currentCategoryId', $context->cookie->last_visited_category);
|
||||
$context->smarty->assign('currentCategoryId', $context->cookie->last_visited_category);
|
||||
}
|
||||
if (Tools::isSubmit('id_product'))
|
||||
{
|
||||
@@ -284,17 +283,17 @@ class BlockCategories extends Module
|
||||
if (isset($product) AND Validate::isLoadedObject($product))
|
||||
$context->cookie->last_visited_category = (int)($product->id_category_default);
|
||||
}
|
||||
$context->controller->smarty->assign('currentCategoryId', (int)($context->cookie->last_visited_category));
|
||||
$context->smarty->assign('currentCategoryId', (int)($context->cookie->last_visited_category));
|
||||
}
|
||||
$context->controller->smarty->assign('blockCategTree', $blockCategTree);
|
||||
$context->smarty->assign('blockCategTree', $blockCategTree);
|
||||
|
||||
if (file_exists(_PS_THEME_DIR_.'modules/blockcategories/blockcategories_footer.tpl'))
|
||||
$context->controller->smarty->assign('branche_tpl_path', _PS_THEME_DIR_.'modules/blockcategories/category-tree-branch.tpl');
|
||||
$context->smarty->assign('branche_tpl_path', _PS_THEME_DIR_.'modules/blockcategories/category-tree-branch.tpl');
|
||||
else
|
||||
$context->controller->smarty->assign('branche_tpl_path', _PS_MODULE_DIR_.'blockcategories/category-tree-branch.tpl');
|
||||
$context->controller->smarty->assign('isDhtml', $isDhtml);
|
||||
$context->smarty->assign('branche_tpl_path', _PS_MODULE_DIR_.'blockcategories/category-tree-branch.tpl');
|
||||
$context->smarty->assign('isDhtml', $isDhtml);
|
||||
}
|
||||
$context->controller->smarty->cache_lifetime = 31536000; // 1 Year
|
||||
$context->smarty->cache_lifetime = 31536000; // 1 Year
|
||||
$display = $this->display(__FILE__, 'blockcategories_footer.tpl', $smartyCacheId);
|
||||
Tools::restoreCacheSettings();
|
||||
return $display;
|
||||
|
||||
@@ -703,7 +703,7 @@ class BlockCms extends Module
|
||||
{
|
||||
$context = Context::getContext();
|
||||
$cms_titles = self::getCMStitles(self::LEFT_COLUMN);
|
||||
$context->controller->smarty->assign(array(
|
||||
$context->smarty->assign(array(
|
||||
'block' => 1,
|
||||
'cms_titles' => $cms_titles,
|
||||
'theme_dir' => _PS_THEME_DIR_
|
||||
@@ -716,7 +716,7 @@ class BlockCms extends Module
|
||||
$context = Context::getContext();
|
||||
|
||||
$cms_titles = self::getCMStitles(self::RIGHT_COLUMN);
|
||||
$context->controller->smarty->assign(array(
|
||||
$context->smarty->assign(array(
|
||||
'block' => 1,
|
||||
'cms_titles' => $cms_titles,
|
||||
'theme_dir' => _PS_THEME_DIR_
|
||||
@@ -731,7 +731,7 @@ class BlockCms extends Module
|
||||
if (Configuration::get('FOOTER_BLOCK_ACTIVATION'))
|
||||
{
|
||||
$cms_titles = self::getCMStitlesFooter();
|
||||
$context->controller->smarty->assign(array(
|
||||
$context->smarty->assign(array(
|
||||
'block' => 0,
|
||||
'cmslinks' => $cms_titles,
|
||||
'theme_dir' => _PS_THEME_DIR_,
|
||||
|
||||
@@ -63,7 +63,7 @@ class BlockCurrencies extends Module
|
||||
$currencies = Currency::getCurrencies(false, 1, $this->context->shop->getID());
|
||||
if (!sizeof($currencies))
|
||||
return '';
|
||||
$this->context->controller->smarty->assign('currencies', $currencies);
|
||||
$this->context->smarty->assign('currencies', $currencies);
|
||||
return $this->display(__FILE__, 'blockcurrencies.tpl');
|
||||
}
|
||||
|
||||
|
||||
@@ -60,7 +60,7 @@ class BlockLanguages extends Module
|
||||
$languages = Language::getLanguages(true, $this->context->shop->getID());
|
||||
if (!sizeof($languages))
|
||||
return '';
|
||||
$this->context->controller->smarty->assign('languages', $languages);
|
||||
$this->context->smarty->assign('languages', $languages);
|
||||
return $this->display(__FILE__, 'blocklanguages.tpl');
|
||||
}
|
||||
|
||||
|
||||
@@ -715,7 +715,7 @@ class BlockLayered extends Module
|
||||
|
||||
$share_url = $context->link->getCategoryLink((int)$category->id, $category->link_rewrite[(int)$context->language->id], $context->language->id).rtrim($params, '&');
|
||||
|
||||
$context->controller->smarty->assign(array(
|
||||
$context->smarty->assign(array(
|
||||
'display_share' => (int)Configuration::get('PS_LAYERED_SHARE'),
|
||||
'share_url' => $this->getShortLink($share_url),
|
||||
'layered_use_checkboxes' => (int)Configuration::get('PS_LAYERED_NAVIGATION_CHECKBOXES'),
|
||||
@@ -756,7 +756,7 @@ class BlockLayered extends Module
|
||||
if ($stop > $pages_nb)
|
||||
$stop = (int)($pages_nb);
|
||||
|
||||
$context->controller->smarty->assign('nb_products', $nbProducts);
|
||||
$context->smarty->assign('nb_products', $nbProducts);
|
||||
$pagination_infos = array(
|
||||
'pages_nb' => (int)($pages_nb),
|
||||
'p' => (int)($p),
|
||||
@@ -766,15 +766,15 @@ class BlockLayered extends Module
|
||||
'stop' => (int)($stop),
|
||||
'nArray' => $nArray = (int)(Configuration::get('PS_PRODUCTS_PER_PAGE')) != 10 ? array((int)(Configuration::get('PS_PRODUCTS_PER_PAGE')), 10, 20, 50) : array(10, 20, 50)
|
||||
);
|
||||
$context->controller->smarty->assign($pagination_infos);
|
||||
$context->smarty->assign($pagination_infos);
|
||||
|
||||
$context->controller->smarty->assign('products', $products);
|
||||
$context->smarty->assign('products', $products);
|
||||
|
||||
/* We are sending an array in jSon to the .js controller, it will update both the filters and the products zones */
|
||||
return Tools::jsonEncode(array(
|
||||
'filtersBlock' => $this->generateFiltersBlock($selectedFilters),
|
||||
'productList' => $context->controller->smarty->fetch(_PS_THEME_DIR_.'product-list.tpl'),
|
||||
'pagination' => $context->controller->smarty->fetch(_PS_THEME_DIR_.'pagination.tpl')
|
||||
'productList' => $context->smarty->fetch(_PS_THEME_DIR_.'product-list.tpl'),
|
||||
'pagination' => $context->smarty->fetch(_PS_THEME_DIR_.'pagination.tpl')
|
||||
));
|
||||
// return '<div id="layered_ajax_column">'.$this->generateFiltersBlock($selectedFilters).'</div><div id="layered_ajax_products">'.$smarty->fetch(_PS_THEME_DIR_.'product-list.tpl').'</div>';
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ class BlockLink extends Module
|
||||
$context = Context::getContext();
|
||||
$links = $this->getLinks();
|
||||
|
||||
$context->controller->smarty->assign(array(
|
||||
$context->smarty->assign(array(
|
||||
'blocklink_links' => $links,
|
||||
'title' => Configuration::get('PS_BLOCKLINK_TITLE', $context->language->id),
|
||||
'url' => Configuration::get('PS_BLOCKLINK_URL'),
|
||||
|
||||
@@ -56,7 +56,7 @@ class BlockManufacturer extends Module
|
||||
{
|
||||
$context = Context::getContext();
|
||||
//$getNbProducts = false, $id_lang = 0, $active = true, $p = false, $n = false, $all_group = false, $id_shop = false
|
||||
$context->controller->smarty->assign(array(
|
||||
$context->smarty->assign(array(
|
||||
'manufacturers' => Manufacturer::getManufacturers(false, 0, true, false, false, false, $this->context->shop->getGroupID()),
|
||||
'link' => $context->link,
|
||||
'text_list' => Configuration::get('MANUFACTURER_DISPLAY_TEXT'),
|
||||
|
||||
@@ -61,7 +61,7 @@ class BlockMyAccount extends Module
|
||||
$context = Context::getContext();
|
||||
if (!$params['cookie']->isLogged())
|
||||
return false;
|
||||
$context->controller->smarty->assign(array(
|
||||
$context->smarty->assign(array(
|
||||
'voucherAllowed' => (int)(Configuration::get('PS_VOUCHERS')),
|
||||
'returnAllowed' => (int)(Configuration::get('PS_ORDER_RETURN')),
|
||||
'HOOK_BLOCK_MY_ACCOUNT' => Module::hookExec('myAccountBlock')
|
||||
|
||||
@@ -100,7 +100,7 @@ class BlockNewProducts extends Module
|
||||
$newProducts = Product::getNewProducts((int)($params['cookie']->id_lang), 0, (int)(Configuration::get('NEW_PRODUCTS_NBR')));
|
||||
if (!$newProducts AND !Configuration::get('PS_BLOCK_NEWPRODUCTS_DISPLAY'))
|
||||
return;
|
||||
$context->controller->smarty->assign(array('new_products' => $newProducts, 'mediumSize' => Image::getSize('medium')));
|
||||
$context->smarty->assign(array('new_products' => $newProducts, 'mediumSize' => Image::getSize('medium')));
|
||||
|
||||
return $this->display(__FILE__, 'blocknewproducts.tpl');
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@ class Blocknewsletter extends Module
|
||||
$this->newsletterRegistration();
|
||||
if ($this->error)
|
||||
{
|
||||
$context->controller->smarty->assign(array('color' => 'red',
|
||||
$context->smarty->assign(array('color' => 'red',
|
||||
'msg' => $this->error,
|
||||
'nw_value' => isset($_POST['email']) ? pSQL($_POST['email']) : false,
|
||||
'nw_error' => true,
|
||||
@@ -252,12 +252,12 @@ class Blocknewsletter extends Module
|
||||
{
|
||||
if (Configuration::get('NW_CONFIRMATION_EMAIL') AND isset($_POST['action']) AND (int)($_POST['action']) == 0)
|
||||
Mail::Send($params['cookie']->id_lang, 'newsletter_conf', Mail::l('Newsletter confirmation'), array(), pSQL($_POST['email']), NULL, NULL, NULL, NULL, NULL, dirname(__FILE__).'/mails/');
|
||||
$context->controller->smarty->assign(array('color' => 'green',
|
||||
$context->smarty->assign(array('color' => 'green',
|
||||
'msg' => $this->valid,
|
||||
'nw_error' => false));
|
||||
}
|
||||
}
|
||||
$context->controller->smarty->assign('this_path', $this->_path);
|
||||
$context->smarty->assign('this_path', $this->_path);
|
||||
return $this->display(__FILE__, 'blocknewsletter.tpl');
|
||||
}
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ class BlockPaymentLogo extends Module
|
||||
$cms = new CMS(Configuration::get('PS_PAYMENT_LOGO_CMS_ID'), $context->language->id);
|
||||
if (!Validate::isLoadedObject($cms))
|
||||
return;
|
||||
$context->controller->smarty->assign('cms_payement_logo', $cms);
|
||||
$context->smarty->assign('cms_payement_logo', $cms);
|
||||
return $this->display(__FILE__, 'blockpaymentlogo.tpl');
|
||||
}
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@ class Blockrss extends Module
|
||||
$rss_links[] = array('title' => $item->title, 'url' => $item->link);
|
||||
|
||||
// Display smarty
|
||||
$context->controller->smarty->assign(array('title' => ($title ? $title : $this->l('RSS feed')), 'rss_links' => $rss_links));
|
||||
$context->smarty->assign(array('title' => ($title ? $title : $this->l('RSS feed')), 'rss_links' => $rss_links));
|
||||
|
||||
return $this->display(__FILE__, 'blockrss.tpl');
|
||||
}
|
||||
|
||||
@@ -82,14 +82,14 @@ class BlockSearch extends Module
|
||||
{
|
||||
$context = Context::getContext();
|
||||
|
||||
$context->controller->smarty->assign('ENT_QUOTES', ENT_QUOTES);
|
||||
$context->controller->smarty->assign('search_ssl', (int)(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'));
|
||||
$context->smarty->assign('ENT_QUOTES', ENT_QUOTES);
|
||||
$context->smarty->assign('search_ssl', (int)(!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off'));
|
||||
|
||||
$ajaxSearch=(int)(Configuration::get('PS_SEARCH_AJAX'));
|
||||
$context->controller->smarty->assign('ajaxsearch', $ajaxSearch);
|
||||
$context->smarty->assign('ajaxsearch', $ajaxSearch);
|
||||
|
||||
$instantSearch = (int)(Configuration::get('PS_INSTANT_SEARCH'));
|
||||
$context->controller->smarty->assign('instantsearch', $instantSearch);
|
||||
$context->smarty->assign('instantsearch', $instantSearch);
|
||||
if ($ajaxSearch)
|
||||
{
|
||||
$context->controller->addCSS(_PS_CSS_DIR_.'jquery.autocomplete.css');
|
||||
|
||||
@@ -88,7 +88,7 @@ class BlockSpecials extends Module
|
||||
|
||||
if (!$special = Product::getRandomSpecial((int)($params['cookie']->id_lang), false, false, $this->context->shop->getID()) AND !Configuration::get('PS_BLOCK_SPECIALS_DISPLAY'))
|
||||
return;
|
||||
$this->context->controller->smarty->assign(array(
|
||||
$this->context->smarty->assign(array(
|
||||
'special' => $special,
|
||||
'priceWithoutReduction_tax_excl' => Tools::ps_round($special['price_without_reduction'], 2),
|
||||
'mediumSize' => Image::getSize('medium')
|
||||
|
||||
@@ -66,7 +66,7 @@ class BlockStore extends Module
|
||||
$context = Context::getContext();
|
||||
|
||||
|
||||
$context->controller->smarty->assign('store_img', Configuration::get('BLOCKSTORE_IMG'));
|
||||
$context->smarty->assign('store_img', Configuration::get('BLOCKSTORE_IMG'));
|
||||
return $this->display(__FILE__, 'blockstore.tpl');
|
||||
}
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ class BlockSupplier extends Module
|
||||
function hookLeftColumn($params)
|
||||
{
|
||||
$context = Context::getContext();
|
||||
$context->controller->smarty->assign(array(
|
||||
$context->smarty->assign(array(
|
||||
'suppliers' => Supplier::getSuppliers(false),
|
||||
'link' => $context->link,
|
||||
'text_list' => Configuration::get('SUPPLIER_DISPLAY_TEXT'),
|
||||
|
||||
@@ -107,7 +107,7 @@ class BlockTags extends Module
|
||||
return false;
|
||||
foreach ($tags AS &$tag)
|
||||
$tag['class'] = 'tag_level'.($tag['times'] > BLOCKTAGS_MAX_LEVEL ? BLOCKTAGS_MAX_LEVEL : $tag['times']);
|
||||
$context->controller->smarty->assign('tags', $tags);
|
||||
$context->smarty->assign('tags', $tags);
|
||||
|
||||
return $this->display(__FILE__, 'blocktags.tpl');
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ class BlockUserInfo extends Module
|
||||
if (!$this->active)
|
||||
return;
|
||||
$context = Context::getContext();
|
||||
$context->controller->smarty->assign(array(
|
||||
$context->smarty->assign(array(
|
||||
'cart' => $context->cart,
|
||||
'cart_qties' => $context->cart->nbProducts(),
|
||||
'logged' => $context->cookie->isLogged(),
|
||||
|
||||
@@ -167,7 +167,7 @@ class BlockViewed extends Module
|
||||
if (!sizeof($productsViewedObj))
|
||||
return ;
|
||||
|
||||
$context->controller->smarty->assign(array(
|
||||
$context->smarty->assign(array(
|
||||
'productsViewedObj' => $productsViewedObj,
|
||||
'mediumSize' => Image::getSize('medium')));
|
||||
|
||||
|
||||
@@ -196,7 +196,7 @@ class BlockWishList extends Module
|
||||
}
|
||||
else
|
||||
$id_wishlist = $params['cookie']->id_wishlist;
|
||||
$context->controller->smarty->assign(array(
|
||||
$context->smarty->assign(array(
|
||||
'id_wishlist' => $id_wishlist,
|
||||
'isLogged' => true,
|
||||
'wishlist_products' => ($id_wishlist == false ? false : WishList::getProductByIdCustomer($id_wishlist, $params['cookie']->id_customer, $params['cookie']->id_lang, null, true)),
|
||||
@@ -204,7 +204,7 @@ class BlockWishList extends Module
|
||||
'ptoken' => Tools::getToken(false)));
|
||||
}
|
||||
else
|
||||
$context->controller->smarty->assign(array('wishlist_products' => false, 'wishlists' => false));
|
||||
$context->smarty->assign(array('wishlist_products' => false, 'wishlists' => false));
|
||||
return ($this->display(__FILE__, 'blockwishlist.tpl'));
|
||||
}
|
||||
|
||||
@@ -216,7 +216,7 @@ class BlockWishList extends Module
|
||||
public function hookProductActions($params)
|
||||
{
|
||||
$context = Context::getContext();
|
||||
$context->controller->smarty->assign('id_product', (int)(Tools::getValue('id_product')));
|
||||
$context->smarty->assign('id_product', (int)(Tools::getValue('id_product')));
|
||||
return ($this->display(__FILE__, 'blockwishlist-extra.tpl'));
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ class CarrierCompare extends Module
|
||||
if ($context->customer->id)
|
||||
return;
|
||||
|
||||
$context->controller->smarty->assign(array(
|
||||
$context->smarty->assign(array(
|
||||
'countries' => Country::getCountries($context->language->id),
|
||||
'id_carrier' => ($params['cart']->id_carrier ? $params['cart']->id_carrier : Configuration::get('PS_CARRIER_DEFAULT')),
|
||||
'id_country' => (isset($context->customer->geoloc_id_country) ? $context->customer->geoloc_id_country : Configuration::get('PS_COUNTRY_DEFAULT')),
|
||||
|
||||
@@ -67,7 +67,7 @@ class CashOnDelivery extends PaymentModule
|
||||
return false;
|
||||
}
|
||||
|
||||
$context->controller->smarty->assign(array(
|
||||
$context->smarty->assign(array(
|
||||
'this_path' => $this->_path,
|
||||
'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/'
|
||||
));
|
||||
|
||||
@@ -555,7 +555,7 @@ abstract class PrepaidServices extends PaymentModule
|
||||
if ($amount > $this->max_amount)
|
||||
return false;
|
||||
|
||||
$context->controller->smarty->assign(array('pic_url' => _MODULE_DIR_.'/'.$this->name.'/img/payment-logo.png',
|
||||
$context->smarty->assign(array('pic_url' => _MODULE_DIR_.'/'.$this->name.'/img/payment-logo.png',
|
||||
'payment_name' => $this->displayName,
|
||||
'module_name' => $this->name));
|
||||
|
||||
@@ -570,7 +570,7 @@ abstract class PrepaidServices extends PaymentModule
|
||||
if ($params['objOrder']->module != $this->name)
|
||||
return;
|
||||
|
||||
$context->controller->smarty->assign('payment_name', $this->displayName);
|
||||
$context->smarty->assign('payment_name', $this->displayName);
|
||||
return $this->display(__FILE__, $this->name.'-confirmation.tpl');
|
||||
}
|
||||
|
||||
@@ -598,7 +598,7 @@ abstract class PrepaidServices extends PaymentModule
|
||||
// if the disposition is not "active"
|
||||
if ($res[5] != PrepaidServicesAPI::DISPOSITION_DISPOSED && $res[5] != PrepaidServicesAPI::DISPOSITION_DEBITED)
|
||||
{
|
||||
$context->controller->smarty->assign(array('disposition_state' => $res[5], 'payment_name' => $order->payment));
|
||||
$context->smarty->assign(array('disposition_state' => $res[5], 'payment_name' => $order->payment));
|
||||
return $this->display($this->module_dir.'/'.$this->name, 'disposition-error.tpl');
|
||||
}
|
||||
|
||||
@@ -629,7 +629,7 @@ abstract class PrepaidServices extends PaymentModule
|
||||
if (Tools::getIsset('pp_error'))
|
||||
$error_msg = $this->_getErrorMsgFromErrorCode(Tools::getValue('pp_error'));
|
||||
|
||||
$context->controller->smarty->assign(array('action' => Tools::safeOutput($_SERVER['PHP_SELF']).'?'.$_SERVER['QUERY_STRING'],
|
||||
$context->smarty->assign(array('action' => Tools::safeOutput($_SERVER['PHP_SELF']).'?'.$_SERVER['QUERY_STRING'],
|
||||
'payment_name' => $order->payment,
|
||||
'error' => $error_msg,
|
||||
'currency' => $currency->getSign('right'),
|
||||
|
||||
@@ -157,7 +157,7 @@ class Cheque extends PaymentModule
|
||||
|
||||
$context = Context::getContext();
|
||||
|
||||
$context->controller->smarty->assign(array(
|
||||
$context->smarty->assign(array(
|
||||
'nbProducts' => $cart->nbProducts(),
|
||||
'cust_currency' => $cart->id_currency,
|
||||
'currencies' => $this->getCurrency((int)$cart->id_currency),
|
||||
@@ -180,7 +180,7 @@ class Cheque extends PaymentModule
|
||||
return ;
|
||||
|
||||
$context = Context::getContext();
|
||||
$context->controller->smarty->assign(array(
|
||||
$context->smarty->assign(array(
|
||||
'this_path' => $this->_path,
|
||||
'this_path_ssl' => Tools::getShopDomainSsl(true, true).__PS_BASE_URI__.'modules/'.$this->name.'/'
|
||||
));
|
||||
@@ -195,7 +195,7 @@ class Cheque extends PaymentModule
|
||||
$context = Context::getContext();
|
||||
$state = $params['objOrder']->getCurrentState();
|
||||
if ($state == _PS_OS_CHEQUE_ OR $state == _PS_OS_OUTOFSTOCK_)
|
||||
$context->controller->smarty->assign(array(
|
||||
$context->smarty->assign(array(
|
||||
'total_to_pay' => Tools::displayPrice($params['total_to_pay'], $params['currencyObj'], false),
|
||||
'chequeName' => $this->chequeName,
|
||||
'chequeAddress' => nl2br2($this->address),
|
||||
@@ -203,7 +203,7 @@ class Cheque extends PaymentModule
|
||||
'id_order' => $params['objOrder']->id
|
||||
));
|
||||
else
|
||||
$context->controller->smarty->assign('status', 'failed');
|
||||
$context->smarty->assign('status', 'failed');
|
||||
return $this->display(__FILE__, 'payment_return.tpl');
|
||||
}
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@ class CrossSelling extends Module
|
||||
$orderProduct['displayed_price'] = Product::getPriceStatic((int)$orderProduct['product_id'], false, NULL);
|
||||
}
|
||||
|
||||
$context->controller->smarty->assign(array('orderProducts' => $orderProducts, 'middlePosition_crossselling' => round(sizeof($orderProducts) / 2, 0),
|
||||
$context->smarty->assign(array('orderProducts' => $orderProducts, 'middlePosition_crossselling' => round(sizeof($orderProducts) / 2, 0),
|
||||
'crossDisplayPrice' => Configuration::get('CROSSSELLING_DISPLAY_PRICE')));
|
||||
}
|
||||
return $this->display(__FILE__, 'crossselling.tpl');
|
||||
|
||||
@@ -111,7 +111,7 @@ class DateOfDelivery extends Module
|
||||
foreach ($params['carriers'] as $carrier)
|
||||
$datesDelivery[(int)($carrier['id_carrier'])] = $this->_getDatesOfDelivery((int)($carrier['id_carrier']), $oos);
|
||||
|
||||
$context->controller->smarty->assign(array(
|
||||
$context->smarty->assign(array(
|
||||
'datesDelivery' => $datesDelivery,
|
||||
'id_carrier' => ($params['cart']->id_carrier ? (int)($params['cart']->id_carrier) : (int)(Configuration::get('PS_CARRIER_DEFAULT')))
|
||||
));
|
||||
@@ -134,7 +134,7 @@ class DateOfDelivery extends Module
|
||||
if (!is_array($datesDelivery) OR !sizeof($datesDelivery))
|
||||
return ;
|
||||
|
||||
$context->controller->smarty->assign('datesDelivery', $datesDelivery);
|
||||
$context->smarty->assign('datesDelivery', $datesDelivery);
|
||||
|
||||
return $this->display(__FILE__, 'orderDetail.tpl');
|
||||
}
|
||||
|
||||
+55
-55
@@ -394,7 +394,7 @@ class Dejala extends CarrierModule
|
||||
{
|
||||
$context = Context::getContext();
|
||||
|
||||
//$context->controller->smarty->assign('country', $this->dejalaConfig->country);
|
||||
//$context->smarty->assign('country', $this->dejalaConfig->country);
|
||||
$output = $this->display(__FILE__, 'dejala_header.tpl');
|
||||
if (!empty($_POST))
|
||||
{
|
||||
@@ -424,14 +424,14 @@ class Dejala extends CarrierModule
|
||||
|
||||
$errors = array();
|
||||
$outputMain = '';
|
||||
$context->controller->smarty->assign("djl_mode", $this->dejalaConfig->mode);
|
||||
$context->controller->smarty->assign("disabled", '');
|
||||
$context->smarty->assign("djl_mode", $this->dejalaConfig->mode);
|
||||
$context->smarty->assign("disabled", '');
|
||||
if ($this->dejalaConfig->mode == 'PROD')
|
||||
$context->controller->smarty->assign("disabled", 'disabled="disabled"');
|
||||
$context->smarty->assign("disabled", 'disabled="disabled"');
|
||||
if (true !== extension_loaded('curl'))
|
||||
{
|
||||
$errors[] = $this->l('This module requires php extension cURL to function properly. Please install the php extension "cURL" first.');
|
||||
$context->controller->smarty->assign("disabled", 'disabled="disabled"');
|
||||
$context->smarty->assign("disabled", 'disabled="disabled"');
|
||||
}
|
||||
|
||||
$registered = TRUE;
|
||||
@@ -453,7 +453,7 @@ class Dejala extends CarrierModule
|
||||
}
|
||||
}
|
||||
|
||||
$context->controller->smarty->assign("registered", $registered?"1":"0");
|
||||
$context->smarty->assign("registered", $registered?"1":"0");
|
||||
|
||||
|
||||
if (!isset($_GET['cat']) || ($_GET['cat']==='home') || ($_GET['cat']===''))
|
||||
@@ -461,19 +461,19 @@ class Dejala extends CarrierModule
|
||||
else
|
||||
$currentTab=$_GET['cat'];
|
||||
|
||||
$context->controller->smarty->assign("currentTab", $currentTab);
|
||||
$context->controller->smarty->assign("moduleConfigURL", 'index.php?tab=AdminModules&configure=dejala&token='.$_GET['token']);
|
||||
$context->controller->smarty->assign("formAction", $_SERVER['REQUEST_URI']);
|
||||
$context->smarty->assign("currentTab", $currentTab);
|
||||
$context->smarty->assign("moduleConfigURL", 'index.php?tab=AdminModules&configure=dejala&token='.$_GET['token']);
|
||||
$context->smarty->assign("formAction", $_SERVER['REQUEST_URI']);
|
||||
$outputMenu = $this->display(__FILE__, 'dejala_menu.tpl');
|
||||
|
||||
if ($currentTab==='home')
|
||||
{
|
||||
$context->controller->smarty->assign("login", html_entity_decode(Configuration::get('PS_SHOP_EMAIL'), ENT_COMPAT, 'UTF-8'));
|
||||
$context->smarty->assign("login", html_entity_decode(Configuration::get('PS_SHOP_EMAIL'), ENT_COMPAT, 'UTF-8'));
|
||||
if ($registered)
|
||||
{
|
||||
$context->controller->smarty->assign("visibility_status", $this->dejalaConfig->visibility_status);
|
||||
$context->controller->smarty->assign("visible_users_list", $this->dejalaConfig->visible_users_list);
|
||||
$context->controller->smarty->assign("store_login", html_entity_decode($this->dejalaConfig->login, ENT_COMPAT, 'UTF-8'));
|
||||
$context->smarty->assign("visibility_status", $this->dejalaConfig->visibility_status);
|
||||
$context->smarty->assign("visible_users_list", $this->dejalaConfig->visible_users_list);
|
||||
$context->smarty->assign("store_login", html_entity_decode($this->dejalaConfig->login, ENT_COMPAT, 'UTF-8'));
|
||||
$smartifyErrors = $this->smartyfyStoreAttributes();
|
||||
if (isset($smartifyErrors) && count($smartifyErrors))
|
||||
$errors = $smartifyErrors;
|
||||
@@ -483,7 +483,7 @@ class Dejala extends CarrierModule
|
||||
$shopName = Configuration::get('PS_SHOP_NAME');
|
||||
if (strlen($shopName) >= 15)
|
||||
$shopName = substr($shopName, 0, 15);
|
||||
$context->controller->smarty->assign("store_name", html_entity_decode($shopName, ENT_COMPAT, 'UTF-8'));
|
||||
$context->smarty->assign("store_name", html_entity_decode($shopName, ENT_COMPAT, 'UTF-8'));
|
||||
}
|
||||
$outputMain = $this->display(__FILE__, 'dejala_home.tpl');
|
||||
}
|
||||
@@ -496,7 +496,7 @@ class Dejala extends CarrierModule
|
||||
{
|
||||
foreach ($contacts as $contactName=>$contactData) {
|
||||
foreach ($contactData as $key=>$value) {
|
||||
$context->controller->smarty->assign($contactName.'_'.$key, $value);
|
||||
$context->smarty->assign($contactName.'_'.$key, $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -510,7 +510,7 @@ class Dejala extends CarrierModule
|
||||
if ('200' == $responseArray['status'])
|
||||
{
|
||||
foreach ($location as $key=>$value)
|
||||
$context->controller->smarty->assign($key, $value);
|
||||
$context->smarty->assign($key, $value);
|
||||
|
||||
$outputMain = $this->display(__FILE__, 'dejala_location.tpl');
|
||||
}
|
||||
@@ -523,7 +523,7 @@ class Dejala extends CarrierModule
|
||||
if ('200' == $responseArray['status'])
|
||||
{
|
||||
foreach ($processes as $key=>$value)
|
||||
$context->controller->smarty->assign($key, $value);
|
||||
$context->smarty->assign($key, $value);
|
||||
|
||||
$outputMain = $this->display(__FILE__, 'dejala_processes.tpl');
|
||||
}
|
||||
@@ -544,7 +544,7 @@ class Dejala extends CarrierModule
|
||||
$product['public_price'] = number_format(round($product['price'] + $product['margin'], 2), 2, '.', '');
|
||||
$product['public_price_notax'] = number_format(round($product['public_price']/$vat_factor, 2), 2, '.', '');
|
||||
}
|
||||
$context->controller->smarty->assign('products', $products);
|
||||
$context->smarty->assign('products', $products);
|
||||
$outputMain = $this->display(__FILE__, 'dejala_products.tpl');
|
||||
}
|
||||
}
|
||||
@@ -582,10 +582,10 @@ class Dejala extends CarrierModule
|
||||
$delivery['delivery_time'] = date('H\hi', $delivery['delivery_utc']);
|
||||
}
|
||||
}
|
||||
$context->controller->smarty->assign('formAction', __PS_BASE_URI__ . 'modules/' . $this->name . '/deliveries_csv.php');
|
||||
$context->controller->smarty->assign('defaultDateFrom', date('01/m/Y'));
|
||||
$context->controller->smarty->assign('defaultDateTo', date('d/m/Y'));
|
||||
$context->controller->smarty->assign('deliveries', $deliveries);
|
||||
$context->smarty->assign('formAction', __PS_BASE_URI__ . 'modules/' . $this->name . '/deliveries_csv.php');
|
||||
$context->smarty->assign('defaultDateFrom', date('01/m/Y'));
|
||||
$context->smarty->assign('defaultDateTo', date('d/m/Y'));
|
||||
$context->smarty->assign('deliveries', $deliveries);
|
||||
$outputMain = $this->display(__FILE__, 'dejala_deliveries.tpl');
|
||||
}
|
||||
}
|
||||
@@ -608,9 +608,9 @@ class Dejala extends CarrierModule
|
||||
$m_status['checked'] = '0';
|
||||
$orderStatuses[] = $m_status;
|
||||
}
|
||||
$context->controller->smarty->assign('statuses', $orderStatuses);
|
||||
$context->smarty->assign('statuses', $orderStatuses);
|
||||
|
||||
$context->controller->smarty->assign('trigerringStatuses', $this->dejalaConfig->trigerringStatuses);
|
||||
$context->smarty->assign('trigerringStatuses', $this->dejalaConfig->trigerringStatuses);
|
||||
$outputMain = $this->display(__FILE__, 'dejala_technical_options.tpl');
|
||||
}
|
||||
|
||||
@@ -639,20 +639,20 @@ class Dejala extends CarrierModule
|
||||
$errors[] = $this->l('An error occurred while getting store, please try again later or contact Dejala.com');
|
||||
else
|
||||
{
|
||||
$context->controller->smarty->assign("account_balance", $storeAttrs['account_balance']);
|
||||
$context->controller->smarty->assign("store_name", $storeAttrs['name']);
|
||||
$context->smarty->assign("account_balance", $storeAttrs['account_balance']);
|
||||
$context->smarty->assign("store_name", $storeAttrs['name']);
|
||||
|
||||
// Check if account exists in production
|
||||
$responsePing = $djlUtil->ping($this->dejalaConfig, 'PROD');
|
||||
if ('200' == $responsePing['status'])
|
||||
$context->controller->smarty->assign('isLiveReady', '1');
|
||||
$context->smarty->assign('isLiveReady', '1');
|
||||
else
|
||||
{
|
||||
$context->controller->smarty->assign('isLiveReady', '0');
|
||||
$context->smarty->assign('isLiveReady', '0');
|
||||
if (isset($storeAttrs['attributes']) && isset($storeAttrs['attributes']['request_live']) && ($storeAttrs['attributes']['request_live']=='true'))
|
||||
$context->controller->smarty->assign('isLiveRequested', '1');
|
||||
$context->smarty->assign('isLiveRequested', '1');
|
||||
else
|
||||
$context->controller->smarty->assign('isLiveRequested', '0');
|
||||
$context->smarty->assign('isLiveRequested', '0');
|
||||
}
|
||||
}
|
||||
return ($errors);
|
||||
@@ -682,26 +682,26 @@ class Dejala extends CarrierModule
|
||||
$response = $djlUtil->getStoreAttributes($this->dejalaConfig, $store);
|
||||
if ($response['status'] == 200)
|
||||
{
|
||||
$context->controller->smarty->assign('nb_days', $store['attributes']['nb_days_displayed']);
|
||||
$context->controller->smarty->assign('delivery_delay', $store['attributes']['delivery_delay']);
|
||||
$context->smarty->assign('nb_days', $store['attributes']['nb_days_displayed']);
|
||||
$context->smarty->assign('delivery_delay', $store['attributes']['delivery_delay']);
|
||||
if (isset($store['attributes']['delivery_partial']))
|
||||
$context->controller->smarty->assign('delivery_partial', $store['attributes']['delivery_partial']);
|
||||
$context->smarty->assign('delivery_partial', $store['attributes']['delivery_partial']);
|
||||
}
|
||||
|
||||
$wday_selected = array(1, 1, 1, 1, 1, 1, 1);
|
||||
|
||||
$context->controller->smarty->assign('timetable_css', _MODULE_DIR_.$this->name.'/timetable.css');
|
||||
$context->controller->smarty->assign("timetable_js", _MODULE_DIR_.$this->name.'/timetable.js');
|
||||
$context->controller->smarty->assign("weekdayLabels", $this->wday_labels);
|
||||
$context->controller->smarty->assign("weekdaySelected", $wday_selected);
|
||||
$context->smarty->assign('timetable_css', _MODULE_DIR_.$this->name.'/timetable.css');
|
||||
$context->smarty->assign("timetable_js", _MODULE_DIR_.$this->name.'/timetable.js');
|
||||
$context->smarty->assign("weekdayLabels", $this->wday_labels);
|
||||
$context->smarty->assign("weekdaySelected", $wday_selected);
|
||||
|
||||
|
||||
$calendar = array();
|
||||
$response = $djlUtil->getStoreCalendar($this->dejalaConfig, $calendar);
|
||||
if ($response['status'] == 200)
|
||||
{
|
||||
$context->controller->smarty->assign("calendar", $calendar);
|
||||
$context->controller->smarty->assign("timetableTpl", dirname(__FILE__)."/dejala_picking_timetable.tpl");
|
||||
$context->smarty->assign("calendar", $calendar);
|
||||
$context->smarty->assign("timetableTpl", dirname(__FILE__)."/dejala_picking_timetable.tpl");
|
||||
}
|
||||
$output = $output . $this->display(__FILE__, 'dejala_delivery_options.tpl');
|
||||
|
||||
@@ -871,8 +871,8 @@ class Dejala extends CarrierModule
|
||||
|
||||
|
||||
$this->mylog("date$=" . $this->logValue($dates,1));
|
||||
$context->controller->smarty->assign('nb_days', $nbDeliveryDates);
|
||||
$context->controller->smarty->assign('dates', $dates);
|
||||
$context->smarty->assign('nb_days', $nbDeliveryDates);
|
||||
$context->smarty->assign('dates', $dates);
|
||||
for ($i=0; $i < 24; $i++)
|
||||
{
|
||||
$endHour = (($i+$electedProduct['timelimit'])%24);
|
||||
@@ -880,10 +880,10 @@ class Dejala extends CarrierModule
|
||||
$endHour = 24;
|
||||
$hourLabels[] = $i . 'h-' . $endHour . 'h';
|
||||
}
|
||||
$context->controller->smarty->assign('hourLabels', $hourLabels);
|
||||
$context->smarty->assign('hourLabels', $hourLabels);
|
||||
|
||||
$context->controller->smarty->assign('timetable_css', _MODULE_DIR_.$this->name.'/timetable.css');
|
||||
$context->controller->smarty->assign("timetable_js", _MODULE_DIR_.$this->name.'/timetable.js');
|
||||
$context->smarty->assign('timetable_css', _MODULE_DIR_.$this->name.'/timetable.css');
|
||||
$context->smarty->assign("timetable_js", _MODULE_DIR_.$this->name.'/timetable.js');
|
||||
|
||||
$this->mylog("electedCarrier->id=" . $this->logValue($djlCarrier->id));
|
||||
$mCarrier = $djlCarrier;
|
||||
@@ -896,9 +896,9 @@ class Dejala extends CarrierModule
|
||||
|
||||
$resultsArray[] = $row;
|
||||
|
||||
$context->controller->smarty->assign('carriers', $resultsArray);
|
||||
$context->controller->smarty->assign('my_carrier_selected', (isset($cart->id_carrier) && $cart->id_carrier == $djlCarrier->id)) ;
|
||||
$context->controller->smarty->assign('product', $electedProduct);
|
||||
$context->smarty->assign('carriers', $resultsArray);
|
||||
$context->smarty->assign('my_carrier_selected', (isset($cart->id_carrier) && $cart->id_carrier == $djlCarrier->id)) ;
|
||||
$context->smarty->assign('product', $electedProduct);
|
||||
|
||||
|
||||
$djlCart = new DejalaCart($cart->id);
|
||||
@@ -915,21 +915,21 @@ class Dejala extends CarrierModule
|
||||
{
|
||||
if ($l_date['value'] == $deliveryDateSelected)
|
||||
{
|
||||
$context->controller->smarty->assign("deliveryDateIndexSelected", $l_key);
|
||||
$context->controller->smarty->assign("deliveryDateSelected", $deliveryDateSelected);
|
||||
$context->controller->smarty->assign("deliveryHourSelected", $m_hour);
|
||||
$context->smarty->assign("deliveryDateIndexSelected", $l_key);
|
||||
$context->smarty->assign("deliveryDateSelected", $deliveryDateSelected);
|
||||
$context->smarty->assign("deliveryHourSelected", $m_hour);
|
||||
$setDefaultDate = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($setDefaultDate)
|
||||
{
|
||||
$context->controller->smarty->assign("deliveryDateIndexSelected", 0);
|
||||
$context->controller->smarty->assign("deliveryDateSelected", date("Y/m/d", $dateUtc));
|
||||
$context->controller->smarty->assign("deliveryHourSelected", (int)(date("H", $dateUtc)));
|
||||
$context->smarty->assign("deliveryDateIndexSelected", 0);
|
||||
$context->smarty->assign("deliveryDateSelected", date("Y/m/d", $dateUtc));
|
||||
$context->smarty->assign("deliveryHourSelected", (int)(date("H", $dateUtc)));
|
||||
}
|
||||
|
||||
$context->controller->smarty->assign("isCartOutOfStock", $isCartOutOfStock);
|
||||
$context->smarty->assign("isCartOutOfStock", $isCartOutOfStock);
|
||||
if (!$isCartOutOfStock)
|
||||
{
|
||||
$buffer = $this->display(__FILE__, 'dejala_carrier.tpl');
|
||||
@@ -937,7 +937,7 @@ class Dejala extends CarrierModule
|
||||
}
|
||||
else
|
||||
{
|
||||
$context->controller->smarty->assign('nostock_info', $this->l('I will select my shipping date when my product is available.'));
|
||||
$context->smarty->assign('nostock_info', $this->l('I will select my shipping date when my product is available.'));
|
||||
$buffer = $this->display(__FILE__, 'dejala_carrier_nostock.tpl');
|
||||
}
|
||||
return $buffer;
|
||||
|
||||
@@ -190,11 +190,11 @@ class Ogone extends PaymentModule
|
||||
return;
|
||||
|
||||
if ($params['objOrder']->valid)
|
||||
$context->controller->smarty->assign(array('status' => 'ok', 'id_order' => $params['objOrder']->id));
|
||||
$context->smarty->assign(array('status' => 'ok', 'id_order' => $params['objOrder']->id));
|
||||
else
|
||||
$context->controller->smarty->assign('status', 'failed');
|
||||
$context->smarty->assign('status', 'failed');
|
||||
|
||||
$context->controller->smarty->assign('ogone_link', (method_exists($link, 'getPageLink') ? $context->link->getPageLink('contact', true) : Tools::getHttpHost(true).'contact'));
|
||||
$context->smarty->assign('ogone_link', (method_exists($link, 'getPageLink') ? $context->link->getPageLink('contact', true) : Tools::getHttpHost(true).'contact'));
|
||||
return $this->display(dirname(__FILE__), 'hookorderconfirmation.tpl');
|
||||
}
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ function submitAccount()
|
||||
{
|
||||
if (Mail::Send($context->language->id, 'account', Mail::l('Welcome!'),
|
||||
array('{firstname}' => $customer->firstname, '{lastname}' => $customer->lastname, '{email}' => $customer->email, '{passwd}' => Tools::getValue('passwd')), $customer->email, $customer->firstname.' '.$customer->lastname))
|
||||
$context->controller->smarty->assign('confirmation', 1);
|
||||
$context->smarty->assign('confirmation', 1);
|
||||
$context->cookie->id_customer = (int)($customer->id);
|
||||
$context->cookie->customer_lastname = $customer->lastname;
|
||||
$context->cookie->customer_firstname = $customer->firstname;
|
||||
|
||||
Reference in New Issue
Block a user