Jump to content

AETtec

Members
  • Posts

    20
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

AETtec's Achievements

Newbie

Newbie (1/14)

  • Week One Done Rare
  • One Month Later Rare
  • One Year In Rare

Recent Badges

0

Reputation

  1. Need help with this issue what can i do , dont understand how it start failed suddenly
  2. Good afternoon. It seems that some module has affected the correct settings of paypal or some internal change in my website has made the paypal module stop working. Because it used to work correctly, and since a few weeks ago during the process of end the order when choosing paypal and proceed to pay, it show a blank page error with the following url: ?error_code=0&error_msg=Must+be+greater+than+or+equal+to+0.+If+the+currency+supports+decimals%2C+only+two+decimal+place+precision+is+supported. How can i solve it? The module is not the "checkout prestashop", that is "Paypal module". ________________________________________________________________________________________________ Buenas tardes. Al parecer algún módulo ha afectado al funcionamiento de paypal o algún cambio interno en mi web ha hecho que el módulo de paypal deje de funcionar. Débido a que antes funcionaba correctamente, y desde hace unas semanas durante el proceso de finalizar pedido al elegir paypal y proceder a pagar salta un error de página en blanco con la siguiente url: ?error_code=0&error_msg=Must+be+greater+than+or+equal+to+0.+If+the+currency+supports+decimals%2C+only+two+decimal+place+precision+is+supported.
  3. Buenos días. Estoy interesado en exactamente lo mismo, he seguido el proceso sin éxito del todo, explico el procedimiento por si a alguien le sirve, pero aviso que no funciona como debería por lo siguiente: Cuando un cliente inserta una nota de pedido esta entra con la etiqueta "privado" y cambiando los archivos como veréis a continuación solo se muestran las publicas , he probado a escribir una nota desde el pedido dando a la casilla de "mostrar al cliente" y esa al ser una nota publica si se ve, con lo cual no sirve de nada que solo se impriman las publicas y las privadas no, de hecho lo suyo seria que la del cliente entrase como publica porque las privadas no interesarían que las viera el cliente ya que puede que se escriba algo de forma interna en esa nota de pedido. En la ruta: /classes/pdf/HTMLTemplateDeliverySlip.php Añadida la siguiente linea de código en la sección array: 'messages_customer' => CustomerMessage::getMessagesByOrderId($this->order->id, false), <?php /** * 2007-2019 PrestaShop and Contributors * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * https://opensource.org/licenses/OSL-3.0 * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to https://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2019 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA */ /** * @since 1.5 */ class HTMLTemplateDeliverySlipCore extends HTMLTemplate { public $order; /** * @param OrderInvoice $order_invoice * @param $smarty * * @throws PrestaShopException */ public function __construct(OrderInvoice $order_invoice, $smarty, $bulk_mode = false) { $this->order_invoice = $order_invoice; $this->order = new Order($this->order_invoice->id_order); $this->smarty = $smarty; // If shop_address is null, then update it with current one. // But no DB save required here to avoid massive updates for bulk PDF generation case. // (DB: bug fixed in 1.6.1.1 with upgrade SQL script to avoid null shop_address in old orderInvoices) if (!isset($this->order_invoice->shop_address) || !$this->order_invoice->shop_address) { $this->order_invoice->shop_address = OrderInvoice::getCurrentFormattedShopAddress((int) $this->order->id_shop); if (!$bulk_mode) { OrderInvoice::fixAllShopAddresses(); } } // header informations $this->date = Tools::displayDate($order_invoice->date_add); $prefix = Configuration::get('PS_DELIVERY_PREFIX', Context::getContext()->language->id); $this->title = sprintf(HTMLTemplateDeliverySlip::l('%1$s%2$06d'), $prefix, $this->order_invoice->delivery_number); // footer informations $this->shop = new Shop((int) $this->order->id_shop); } /** * Returns the template's HTML header. * * @return string HTML header */ public function getHeader() { $this->assignCommonHeaderData(); $this->smarty->assign(array('header' => Context::getContext()->getTranslator()->trans('Delivery', array(), 'Shop.Pdf'))); return $this->smarty->fetch($this->getTemplate('header')); } /** * Returns the template's HTML content. * * @return string HTML content */ public function getContent() { $delivery_address = new Address((int) $this->order->id_address_delivery); $formatted_delivery_address = AddressFormat::generateAddress($delivery_address, array(), '<br />', ' '); $formatted_invoice_address = ''; if ($this->order->id_address_delivery != $this->order->id_address_invoice) { $invoice_address = new Address((int) $this->order->id_address_invoice); $formatted_invoice_address = AddressFormat::generateAddress($invoice_address, array(), '<br />', ' '); } $carrier = new Carrier($this->order->id_carrier); $carrier->name = ($carrier->name == '0' ? Configuration::get('PS_SHOP_NAME') : $carrier->name); $order_details = $this->order_invoice->getProducts(); if (Configuration::get('PS_PDF_IMG_DELIVERY')) { foreach ($order_details as &$order_detail) { if ($order_detail['image'] != null) { $name = 'product_mini_' . (int) $order_detail['product_id'] . (isset($order_detail['product_attribute_id']) ? '_' . (int) $order_detail['product_attribute_id'] : '') . '.jpg'; $path = _PS_PROD_IMG_DIR_ . $order_detail['image']->getExistingImgPath() . '.jpg'; $order_detail['image_tag'] = preg_replace( '/\.*' . preg_quote(__PS_BASE_URI__, '/') . '/', _PS_ROOT_DIR_ . DIRECTORY_SEPARATOR, ImageManager::thumbnail($path, $name, 45, 'jpg', false), 1 ); if (file_exists(_PS_TMP_IMG_DIR_ . $name)) { $order_detail['image_size'] = getimagesize(_PS_TMP_IMG_DIR_ . $name); } else { $order_detail['image_size'] = false; } } } } $this->smarty->assign(array( 'order' => $this->order, 'order_details' => $order_details, 'delivery_address' => $formatted_delivery_address, 'invoice_address' => $formatted_invoice_address, 'order_invoice' => $this->order_invoice, 'carrier' => $carrier, 'display_product_images' => Configuration::get('PS_PDF_IMG_DELIVERY'), )); $tpls = array( 'messages_customer' => CustomerMessage::getMessagesByOrderId($this->order->id, false), 'style_tab' => $this->smarty->fetch($this->getTemplate('delivery-slip.style-tab')), 'addresses_tab' => $this->smarty->fetch($this->getTemplate('delivery-slip.addresses-tab')), 'summary_tab' => $this->smarty->fetch($this->getTemplate('delivery-slip.summary-tab')), 'product_tab' => $this->smarty->fetch($this->getTemplate('delivery-slip.product-tab')), 'payment_tab' => $this->smarty->fetch($this->getTemplate('delivery-slip.payment-tab')), ); $this->smarty->assign($tpls); return $this->smarty->fetch($this->getTemplate('delivery-slip')); } /** * Returns the template filename when using bulk rendering. * * @return string filename */ public function getBulkFilename() { return 'deliveries.pdf'; } /** * Returns the template filename. * * @return string filename */ public function getFilename() { return Configuration::get('PS_DELIVERY_PREFIX', Context::getContext()->language->id, null, $this->order->id_shop) . sprintf('%06d', $this->order->delivery_number) . '.pdf'; } } Posteriormente Añadí la siguiente linea de código: {if count($messages_customer)} {foreach from=$messages_customer item=message name="messageList"} <tr class="{if $smarty.foreach.messageList.first}first_item{elseif $smarty.foreach.messageList.last}last_item{/if} {if $smarty.foreach.messageList.index % 2}alternate_item{else}item{/if}"> <td> <strong> {if isset($message.elastname) && $message.elastname} {$message.efirstname|escape:'html':'UTF-8'} {$message.elastname|escape:'html':'UTF-8'} {elseif $message.clastname} {$message.cfirstname|escape:'html':'UTF-8'} {$message.clastname|escape:'html':'UTF-8'} {else} {$shop_name|escape:'html':'UTF-8'} {/if} </strong> <br /> {dateFormat date=$message.date_add full=1} </td> <td>{$message.message|escape:'html':'UTF-8'|nl2br}</td> </tr> {/foreach} {/if} En el fichero: /pdf/delivery-slip.tpl Tal que así. {** * 2007-2019 PrestaShop and Contributors * * NOTICE OF LICENSE * * This source file is subject to the Open Software License (OSL 3.0) * that is bundled with this package in the file LICENSE.txt. * It is also available through the world-wide-web at this URL: * https://opensource.org/licenses/OSL-3.0 * If you did not receive a copy of the license and are unable to * obtain it through the world-wide-web, please send an email * to [email protected] so we can send you a copy immediately. * * DISCLAIMER * * Do not edit or add to this file if you wish to upgrade PrestaShop to newer * versions in the future. If you wish to customize PrestaShop for your * needs please refer to https://www.prestashop.com for more information. * * @author PrestaShop SA <[email protected]> * @copyright 2007-2019 PrestaShop SA and Contributors * @license https://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0) * International Registered Trademark & Property of PrestaShop SA *} {$style_tab} <table width="100%" id="body" border="0" cellpadding="0" cellspacing="0" style="margin:0;"> <!-- Addresses --> <tr> <td colspan="12"> {$addresses_tab} </td> </tr> <tr> <td colspan="12" height="30">&nbsp;</td> </tr> <tr> <td colspan="12"> {$summary_tab} </td> </tr> <tr> <td colspan="12" height="20">&nbsp;</td> </tr> <!-- Products --> <tr> <td colspan="12"> {$product_tab} </td> </tr> <tr> <td colspan="12" height="20">&nbsp;</td> </tr> <tr> <td colspan="7" class="left"> {$payment_tab} </td> <td colspan="5">&nbsp;</td> </tr> <!-- Hook --> {if isset($HOOK_DISPLAY_PDF)} <tr> <td colspan="12" height="30">&nbsp;</td> </tr> <tr> <td colspan="2">&nbsp;</td> <td colspan="10"> {$HOOK_DISPLAY_PDF} </td> </tr> {/if} </table> {if count($messages_customer)} {foreach from=$messages_customer item=message name="messageList"} <tr class="{if $smarty.foreach.messageList.first}first_item{elseif $smarty.foreach.messageList.last}last_item{/if} {if $smarty.foreach.messageList.index % 2}alternate_item{else}item{/if}"> <td> <strong> {if isset($message.elastname) && $message.elastname} {$message.efirstname|escape:'html':'UTF-8'} {$message.elastname|escape:'html':'UTF-8'} {elseif $message.clastname} {$message.cfirstname|escape:'html':'UTF-8'} {$message.clastname|escape:'html':'UTF-8'} {else} {$shop_name|escape:'html':'UTF-8'} {/if} </strong> <br /> {dateFormat date=$message.date_add full=1} </td> <td>{$message.message|escape:'html':'UTF-8'|nl2br}</td> </tr> {/foreach} {/if} Por último como indican más abajo en el hilo que mencionaron en el post, observamos que recomiendan borrar caché de una ubicación, cache/class_index.php en la versión que yo tengo 1.7.6.1 esa ubicación contiene un txt que dice deprecated e indican la nueva ubicación que usan para esta versión /public_html/var/cache/prod /public_html/var/cache/dev Desde ahí es de donde borré el fichero class_index.php Un saludo y gracias.
  4. Buenos días. Por descartar, podría ser que tengas dentro de las opciones del transportista en cuestión esa url en el campo de "url de seguimiento". Es como si se tratase de un error humano al apuntar directamente al backend, es raro. Otra opción, ¿revisaste la template de ese email ? igual ves algo raro
  5. Buenas tardes. Tengo un problema ya que ni en frontend en resumen de carrito muestra los desgloses lo cual puede causar confusión, al igual que en el backend tampoco me muestra los desgloses, sobretodo el total sin iva que me interesa bastante, pero ya te digo en general todo mal nose a que se debe. Versión de prestashop 1.7.6.1 Adjunto capturas de frontend y backend Necesitaría saber que archivo modificar y que códigos insertar ya que no tengo mucho conocimiento de PHP Gracias!
  6. Versión del software del servidor: Apache Versión PHP: 7.2.32 Límite de memoria: 4096M Tiempo máx. de ejecución: 300 Tamaño máx. para la subida de archivos: 20M
  7. Buenos días. Estabamos a punto de lanzar la web y hemos localizado que algo está ocurriendo a nivel programación con el tema del IVA. Ya que por mucho que todas las opciones de IVA e impuestos y visualización de carrito están activados no se muestra ni procesa correctamente. Nos urge mucho y he leído un montón de posts acerca de que puede ser un fallo general del core, o nose si a nivel de plantilla puede haber algo mal. La versión prestashop es 1.7.6.1 y la plantilla: https://themeforest.net/item/newyork-responsive-prestashop-theme/11785941 Os explico la situación , tengo todo configurado como decía IVA activado, reglas de impuestos activadas y todo como podéis ver en la imágen correcto. Desde todos sus correspondientes apartados Pedidos > facturas Internacional > impuestos Todo activado.... He localizado varios fallos que necesitamos solventar: 1ºEl precio no se muestra correctamente, por ejemplo a pesar de que es imp. incl al verlo desde la web sale erróneo el precio , 4,76 iva inc desde el backoffice En cambio en el front 3,44 iva inc. 2º En el carrito de compra no hace el desglose correctamente, sale el precio sin iva pero luego el IVA ni lo añade, lo deja en cero. 3º Por último la factura generada la genera erroneamente, sin añadir iva ni mostrarlo. Agradecería mucho una ayuda gracias!
  8. Thank you for the answer, but i dont know how to create a minimodule, i saw this tool : https://validator.prestashop.com/generator But i dont know nothing about php, i tried creating one with the tool and editing the php file with the 1º code you shared, then tried to install but it give me an error.
  9. I edit the title of the post right now , i still having this issue.
  10. should i post it on other place? i didnt get help pls =(
  11. Hello. Im so newbie at php and i want show the reference of each product on a near/visible place around button add to cart and price. So so i did the next modification: My version of PS is 1.7.6.1 1) File "only-reference.tpl" created on next location: /themes/newyork_home1/templates/catalog/_partials/only-reference.tpl and writed the next code inside the file: {if isset($product.reference_to_display)} <div class="product-reference"> <label class="label">{l s='Reference' d='Shop.Theme.Catalog'} </label> <span itemprop="sku">{$product.reference_to_display}</span> </div> {/if} 2) Modify the next file: /themes/newyork_home1/templates/catalog/product.tpl and insert this code: {block name='only-reference'} {include file='catalog/_partials/only-reference.tpl'} {/block} The result...? yes the reference is on the correct place now, but it doesnt refresh when i change to other combination of the product, so i need help to fix it. Please!
  12. Please need solution 😕 how can i repair it, dont understand why now i got the error but not at the start
  13. Hello, i have suppliers created, but now when i try to create another one i get the next message on debug mode: [PrestaShopException] La propiedad Address->dni está vacía. at line 1004 in file classes/ObjectModel.php 999. } 1000. 1001. $message = $this->validateField($field, $this->$field); 1002. if ($message !== true) { 1003. if ($die) { 1004. throw new PrestaShopException($message); 1005. } 1006. 1007. return $error_return ? $message : false; 1008. } 1009. } ObjectModelCore->validateFields - [line 292 - classes/ObjectModel.php] 287. * 288. * @throws PrestaShopException 289. */ 290. public function getFields() 291. { 292. $this->validateFields(); 293. $fields = $this->formatFields(self::FORMAT_COMMON); 294. 295. // For retro compatibility 296. if (Shop::isTableAssociated($this->def['table'])) { 297. $fields = array_merge($fields, $this->getFieldsShop()); ObjectModelCore->getFields - [line 561 - classes/ObjectModel.php] ObjectModelCore->add - [line 187 - classes/Address.php] - [2 Arguments] 182. /** 183. * @see ObjectModel::add() 184. */ 185. public function add($autodate = true, $null_values = false) 186. { 187. if (!parent::add($autodate, $null_values)) { 188. return false; 189. } 190. 191. if (Validate::isUnsignedId($this->id_customer)) { 192. Customer::resetAddressCache($this->id_customer, $this->id); AddressCore->add - [line 516 - classes/ObjectModel.php] - [2 Arguments] 511. * 512. * @throws PrestaShopException 513. */ 514. public function save($null_values = false, $auto_date = true) 515. { 516. return (int) $this->id > 0 ? $this->update($null_values) : $this->add($auto_date, $null_values); 517. } 518. 519. /** 520. * Adds current object to the database. 521. * ObjectModelCore->save - [line 501 - controllers/admin/AdminSuppliersController.php] 496. $this->errors[] = $this->trans('The address is not correct. Please make sure all of the required fields are completed.', array(), 'Admin.Catalog.Notification'); 497. } else { 498. if (Tools::isSubmit('id_address') && Tools::getValue('id_address') > 0) { 499. $address->update(); 500. } else { 501. $address->save(); 502. $_POST['id_address'] = $address->id; 503. } 504. } 505. 506. return parent::postProcess(); AdminSuppliersControllerCore->postProcess - [line 281 - classes/controller/Controller.php] 276. if (!$this->content_only && ($this->display_header || (isset($this->className) && $this->className))) { 277. $this->setMedia(); 278. } 279. 280. // postProcess handles ajaxProcess 281. $this->postProcess(); 282. 283. if (!empty($this->redirect_after)) { 284. $this->redirect(); 285. } 286. ControllerCore->run - [line 515 - classes/Dispatcher.php] 510. if (isset($params_hook_action_dispatcher)) { 511. Hook::exec('actionDispatcher', $params_hook_action_dispatcher); 512. } 513. 514. // Running controller 515. $controller->run(); 516. 517. // Execute hook dispatcher after 518. if (isset($params_hook_action_dispatcher)) { 519. Hook::exec('actionDispatcherAfter', $params_hook_action_dispatcher); 520. } DispatcherCore->dispatch - [line 97 - admin/index.php] 92. if (!headers_sent()) { 93. header('Content-Type: text/html; charset=utf-8'); 94. } 95. 96. // Prepare and trigger LEGACY admin dispatcher 97. Dispatcher::getInstance()->dispatch(); 98. } Cant undestand why, and look at the sentence address -> DNI está vacía (DNI Empty) no exists DNI on supplier form... :S My PS version is 1.7.6.1. New york Theme
  14. SPANISH Hola. Estoy buscando un modulo desde el que pueda importar artículos de mi wordpress a través de XML u otra alternativa para mí. Actualmente estoy migrando mi web a prestashop y necesito migrar todos los artículos, mi versión de wordpress es 3.4.1 y me permite importar un xml de un solo archivo con todos los artículos escritos, pero nose como integrarlo/importarlo a mi tienda de Prestashop 1.7.6.2 en la cual tengo un modulo llamado SmartBlog. Espero su respuesta, gracias. ENGLISH HI I'm looking for a module from which I can import articles from my wordpress through XML or another alternative for me. Currently I am migrating my website to prestashop and I need to migrate all articles, my version of wordpress is 3.4.1 and allows me to import an xml file of a single file with all the articles written, but I do not know how to integrate / import it to my Prestashop store 1.7.6.2 in which I have a module called SmartBlog. I wait for your answer, thank you.
×
×
  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More