yls96 Posted October 27, 2021 Share Posted October 27, 2021 (edited) Para las versiones anteriores este era la forma: /httpdocs/controllers/admin /controllers/admin/AdminOrdersController.php En esta parte, coloca el código resaltado protected function getProducts($order) { $products = $order->getProducts(); $counter = 0; foreach ($products as &$product) { if ($product['image'] != null) { $name = 'product_mini_' . (int) $product['product_id'] . (isset($product['product_attribute_id']) ? '_' . (int) $product['product_attribute_id'] : '') . '.jpg'; // generate image cache, only for back office $product['image_tag'] = ImageManager::thumbnail(_PS_IMG_DIR_ . 'p/' . $product['image']->getExistingImgPath() . '.jpg', $name, 45, 'jpg'); if (file_exists(_PS_TMP_IMG_DIR_ . $name)) { $product['image_size'] = getimagesize(_PS_TMP_IMG_DIR_ . $name); } else { $product['image_size'] = false; } } $product['counter'] = ($counter++) + 1; } ksort($products); return $products; } /httpdocs/admin/themes/default/template/controllers/orders/helpers/view /admin/themes/default/template/controllers/orders/helpers/view/view.tpl En esta parte, coloca el código resaltado <table class="table" id="orderProducts"> <thead> <tr> <th><span class="title_box ">{l s='#' d='Admin.Global'}</span></th> <th></th> <th><span class="title_box ">{l s='Product' d='Admin.Global'}</span></th> admin/themes/default/template/controllers/orders/_product_line.tpl En esta parte, coloca el código resaltado {if ($product['product_quantity'] > $product['customized_product_quantity'])} <tr class="product-line-row"> <td>{$product['counter']}</td> <td>{if isset($product.image) && $product.image->id}{$product.image_tag}{/if}</td> <td> <a href="{$link->getAdminLink('AdminProducts', true, ['id_product' => $product['product_id']|intval, 'updateproduct' => '1'])|escape:'html':'UTF-8'}"> En cambio para la PS 1.7.8 la carpeta de adminorderscontroller.php no existe. Como se haria? @ventura Edited October 27, 2021 by yls96 (see edit history) Link to comment Share on other sites More sharing options...
gusman126 Posted October 27, 2021 Share Posted October 27, 2021 Unos consejos. Cualquier cambio en el código del core lo vas a perder al actualizar. No se recomienda hacer override, Lo mejor es hacer un módulo, han añadido varios hook dentro de la ficha del pedido y puedes hacer que se muestre la información que necesites Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now