// fix bug view.tpl in AdminCartsController PSFV-94

This commit is contained in:
lLefevre
2011-11-10 16:33:38 +00:00
parent 4d0719d8f7
commit 381eafdbc4
3 changed files with 176 additions and 167 deletions
+5
View File
@@ -24,6 +24,10 @@
* International Registered Trademark & Property of PrestaShop SA * International Registered Trademark & Property of PrestaShop SA
*} *}
{extends file="helper/view/view.tpl"}
{block name="override_tpl"}
<h2>{if $customer->id}{$customer->firstname} {$customer->lastname}{else}{l s='Guest'}{/if} - {l s='Cart #'}{$cart->id|string_format:"%06d"} {l s='from'} {$cart->date_upd}</h2> <h2>{if $customer->id}{$customer->firstname} {$customer->lastname}{else}{l s='Guest'}{/if} - {l s='Cart #'}{$cart->id|string_format:"%06d"} {l s='from'} {$cart->date_upd}</h2>
<br /> <br />
@@ -183,3 +187,4 @@
</fieldset> </fieldset>
<div class="clear" style="height:20px;">&nbsp;</div> <div class="clear" style="height:20px;">&nbsp;</div>
{/block}
+2 -1
View File
@@ -54,7 +54,8 @@ class HelperViewCore extends Helper
'table' => $this->table, 'table' => $this->table,
'show_toolbar' => $this->show_toolbar, 'show_toolbar' => $this->show_toolbar,
'toolbar_fix' => $this->toolbar_fix, 'toolbar_fix' => $this->toolbar_fix,
'toolbar_btn' => $this->toolbar_btn 'toolbar_btn' => $this->toolbar_btn,
'link' => $this->context->link
)); ));
return parent::generate(); return parent::generate();
+6 -3
View File
@@ -99,7 +99,7 @@ class AdminCartsController extends AdminController
parent::__construct(); parent::__construct();
} }
public function viewCart() public function initView()
{ {
if (!($cart = $this->loadObject(true))) if (!($cart = $this->loadObject(true)))
return; return;
@@ -157,7 +157,8 @@ class AdminCartsController extends AdminController
$imageProduct = new Image($image['id_image']); $imageProduct = new Image($image['id_image']);
$product['image'] = (isset($image['id_image']) ? cacheImage(_PS_IMG_DIR_.'p/'.$imageProduct->getExistingImgPath().'.jpg', 'product_mini_'.(int)($product['id_product']).(isset($product['id_product_attribute']) ? '_'.(int)($product['id_product_attribute']) : '').'.jpg', 45, 'jpg') : '--'); $product['image'] = (isset($image['id_image']) ? cacheImage(_PS_IMG_DIR_.'p/'.$imageProduct->getExistingImgPath().'.jpg', 'product_mini_'.(int)($product['id_product']).(isset($product['id_product_attribute']) ? '_'.(int)($product['id_product_attribute']) : '').'.jpg', 45, 'jpg') : '--');
} }
$this->context->smarty->assign(array('products' => $products, $this->tpl_view_vars = array(
'products' => $products,
'discounts' => $cart->getCartRules(), 'discounts' => $cart->getCartRules(),
'order' => $order, 'order' => $order,
'cart' => $cart, 'cart' => $cart,
@@ -170,7 +171,9 @@ class AdminCartsController extends AdminController
'total_price' => $total_price, 'total_price' => $total_price,
'total_shipping' => $total_shipping, 'total_shipping' => $total_shipping,
'customized_datas' => $customized_datas 'customized_datas' => $customized_datas
)); );
return parent::initView();
} }
public function ajaxPreProcess() public function ajaxPreProcess()