Jump to content

Search the Community

Showing results for tags 'Order reference'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Community Help and Support
    • PrestaShop Download
    • PrestaShop Addons
  • News and Announcements
    • PrestaShop news and releases
    • PrestaShop Beta
    • PrestaShop Blogs
    • PrestaShop Meetups
  • International community (English)
    • General topics
    • PrestaShop Merchants
    • PrestaShop Developers
    • Taxes, Translations & Laws
    • Community Modules and Themes
  • Forum francophone
    • Discussion générale
    • Aide et support communautaire
    • PrestaShop pour les marchands
    • PrestaShop pour les développeurs
    • Adaptation aux lois Québécoises
    • Modules et thèmes gratuits
    • Modules et thèmes payants
  • Foro en Español
    • Discusión general
    • Soporte de la comunidad y ayuda
    • Comerciantes PrestaShop
    • Desarrolladores PrestaShop
    • Módulos y plantillas gratuitas
  • Forum italiano
    • Forum generale
    • Aiuto e supporto della Community
    • Commercianti PrestaShop
    • Sviluppatori PrestaShop
    • Aspetti legali sull'eCommerce
    • Moduli e template gratuiti
  • Deutsches Forum
    • Generelle Fragen
    • Support und Hilfe aus der Community
    • e-Commerce/Versand-Handel mit Prestashop
    • Prestashop-Entwickler
    • Anpassung an deutsches Recht
    • Kostenlose Module und Templates
    • Generelle Fragen Copy
  • Nederlandstalig forum
    • Algemeen
    • Hulp en ondersteuning, van en voor de community
    • PrestaShop-winkeliers
    • PrestaShop-ontwikkelaars
    • Het aanpassen van PrestaShop
    • Gratis modules en templates
  • Fórum em Português
    • Fórum Geral
    • Ajuda e Suporte da Comunidade
    • Lojistas que utilizam o PrestaShop
    • Desenvolvedores PrestaShop
    • Legislação específica
    • Módulos e temas gratuitos
  • Polskie forum
    • Forum ogólne
    • Wsparcie i pomoc użytkowników
    • Oferty twórców PrestaShop
    • Deweloperzy PrestaShop
    • Darmowe Moduły i Szablony
  • Dansk forum
    • Generelt forum
    • Hjælp og support fra fællesskabet
    • PrestaShop for købmænd
    • PrestaShop for udviklere
    • Love og regler
    • Gratis moduler og temaer
  • České fórum
    • Instalasi, Konfigurasi dan upgrade
    • Obecná diskuze
    • Bezplatné moduly a šablony
    • PrestaShop vývojáři
    • PrestaShop obchodníci
  • Bahasa Indonesia
    • Diskusi Umum
    • Podpora a pomoc komunity
    • Laporan Bug
    • Jasa, Promosi & Lowongan Kerja
  • Svenskt forum
    • Allmän diskussion
    • Installation, konfigurering och uppdatering
  • Forumul românesc
    • Discuţii generale
    • Instalare, configurare şi upgrade
  • Pусский язык
    • Обсуждение скрипта
    • Установка, Настройка, Обновление
    • Прием багов
  • Slovenské fórum
    • Všeobecná diskusia
    • Podpora a pomoc komunity
    • PrestaShop obchodníci
    • PrestaShop vývojári
    • Bezplatné moduly a šablóny
  • Türkçe Topluluğu
    • Genel Konular
    • Topluluk desteği ve yardım
    • PrestaShop Tüccarları
    • Prestashop Geliştiricileri
    • Ücretsiz Modül ve Temalar
  • Diễn đàn tiếng Việt
    • Thảo luận chung
    • Hỗ trợ từ cộng đồng
    • Dành cho chủ doanh nghiệp / cửa hàng
    • Dành cho lập trình viên
  • PrestaShop Communities
    • اللغه العربيه [Arabic]
    • Ελληνικά [Greek]
    • עִבְרִית [Hebrew]
    • 中文
    • Magyar [Hungarian]
    • 日本語 [Japanese]
    • Lietuviškai [Lithuanian]
    • انجمن فارسی [Persian]
    • ไทย [Thai]
    • Malaysia [Malaysian]
    • Eesti [Estonian]
    • Slovenščina [Slovenian]
    • Српски [Serbian]
  • IP. Board Forum
    • IP. Board Forum Questions and Issues
  • Archive
    • Zapłać Moduły i Szablony [ARCHIVE]
    • Moduly, upravy a dizajn [ARCHIVE]
    • Phát triển và các mô-đun [ARCHIVE]
    • Yazılım, Modül ve Tema [ARCHIVE]
    • Модули, Шаблоны [ARCHIVE]
    • Module şi teme [ARCHIVE]
    • Pengembangan dan Modul [ARCHIVE]
    • Moduler och teman [ARCHIVE]
    • Ecommerce x PrestaShop [ARCHIVE BOARD]
    • Vývoj a moduly [ARCHIVE]
    • Kostenpflichtige Module, Templates [ARCHIVE]
    • Módulos y temas pagos [ARCHIVE]
    • Módulos e temas pagos [ARCHIVE]
    • Servizi commerciali [ARCHIVE]
    • Forum - Feedback Contributor
    • PrestaShop Cloud

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Found 15 results

  1. Hello I am using Prestashop 1.7.3 I have managed to change the order referene number from letters to numbers. I would like to change the offset number so that my invoices don't get the number from 1 but starts on for example number 600 or so. I have tried to change via admin in Order -> Invoices but that did not work. I assume I need to alter a value in the database but were ? Or do I need a module for this ? Please help me anyone. Petter
  2. Hi, I really want change order reference to numeric. (TEXT order reference is really difficult to say via phone to customers). Normaly I do it by override order class by change getOrderReference method. public static function generateReference() { $last_id = Db::getInstance()->getValue(' SELECT MAX(id_order) FROM '._DB_PREFIX_.'orders'); return str_pad((int)$last_id + 1, 9, '000000000', STR_PAD_LEFT); } but if I create order.php in ./overrides/class/order/ nothing happends. I try add hardcoded die() in generateReference method but it do not works. It looks like prestashop do not use this override class. I check BO and overrides are on. Where could be problem ? thanks for advice, and have a nice day guys.
  3. Hello Everyone, I have a question about how to change the order reference in certain pattern. I know the similar question has been ask plenty of times, but trust me, I have read those post before now I post this thread First, I want to change my order reference with this pattern: "R17A01" <- this pattern base on every year every month to update, 17 means year 2017, A means January. I have follow some post that create a Order.php in the /override/classes/order/ folder, and the code like this: <?php class Order extends OrderCore { public static function generateReference() { $last_id = Db::getInstance()->getValue('SELECT COUNT(date_add) FROM ps_orders WHERE YEAR(date_add) = YEAR(CURRENT_DATE()) AND MONTH(date_add) = MONTH(CURRENT_DATE())'); $month=chr(64+$date("n")); $l="R".date("y").$month.str_pad($last_id + 1, 5, '0', STR_PAD_LEFT); return $l; } } But after I do a simulate order in RockPOS, the order is complete(it said), the order reference can not be shown, and message say "Internal Server Error", and I didn't see any order in the order panel. If I just delete those sentences and type return 'R123456'; sometimes work, but most of the time not work. I have already deal this problem some days but I have no idea to fix it, can anyone help me and explain ? Thank you very much!
  4. Hey there, I'm trying to display the order reference in the footer of the invoice PDF. Everything works perfect when displaying a single invoice. However, if we are using the bulk process, the invoice numbers are displayed incorrectly in the footer. PS Version: 1.6.11 Changes HTMLTemplateInvoice.php /** * Returns the template's HTML pagination block * * @return string HTML pagination block */ public function getPagination() { $this->smarty->assign(array("reference" => $this->order->getUniqReference())); return $this->smarty->fetch($this->getTemplate('pagination')); } Again, when using the bulk invoices, the first invoice gets the order reference of the second invoice, the second of the third and so on (again, only in the footer). Only the last invoice has the correct corresponding order reference in its footer. The problem can be also found here: https://www.prestashop.com/forums/topic/451796-wrong-order-number-in-prestashop-pdf-invoice/ Any tips? Cheers, fab
  5. Pro odstranění Označení objednávky velkými písmeny a nahrazení běžným číslem (jako v starších verzích) jsem vyrobil tuto jednoduchou úpravu souboru /override/classes/order/Order.php Kód: <?php class Order extends OrderCore { public static function getUniqReferenceOf($id_order) { $order = new Order($id_order); //return $order->getUniqReference(); return str_pad($id_order, 6, "0", STR_PAD_LEFT); } } Pro návrat k původnímu Označení objednávky písmeny stačí odpoznámkovat první return a zapoznámkovat druhý (funguje ve Front Office).
  6. Since I have migrated to the latest version of Prestashop 1.5.4 from 1.4.9 My email templates have started to include the order_name eg. XWVZXTJPR instead of the order number eg #4328 Can someone please tell me what I need to change in the Email Template Translations html code for this to happen? At the moment it is displayed as {order_name} which is bringing back eg. XWVZXTJPR see attached screen grab
  7. Hi everyone, I have a problem with my module. I created a payment module based on bankwire module with some differences. I'm stuck with this problem and hope someone could help. I need to create a form in payment_execution.tpl with fields that come from database (like address firstname, lastname, etc.) I managed to get those informations from database, but now I need to get the reference of the order (I can't get it from the database of course because it's not stored there yet, or at least I can't found it). My question is, how can I get the order reference, so I could insert it in the form I created in payment_execution.tpl? Thank you. Regards
  8. First: In PrestaShop 1.6 (tested and confirmed working in v1.6.0.14) you can accomplish this by the following method. Copy the file /classes/PaymentModule.php to /override/classes/PaymentModule.php. Edit the file /override/classes/PaymentModule.php as follows. At lines 337-341 is a code block that should read like this: if (!result) { PrestaShopLogger::addLog('PaymentModule::validateOrder - Order cannot be created', 3, null, 'Cart', (int)$id_cart, true); throw new PrestaShopException('Can\'t save Order'); } Immediately after that code block, insert the following two lines of code: $order->reference = str_pad($order->id, 9, '0', STR_PAD_LEFT); $order->update(); Delete the file /cache/class_index.php so that Prestashop automatically re-creates this file taking into account the new override file. note: if you want to start from 3456 (put 5 not 9 )here-> id, 9, '0', STR_PAD_LEFT); so, is gona be id order 03456 ( not 000003456) Second: Ive made a plugin for the backend for this. To use it: 1. Copy the attached file into your admin/tabs folder 2. Go to Administration/ Menus /Add New 3. Enter "Order Options" as the name 4. Enter "AdminOrderOptions" as the class 5. Select "Orders" as the parent 6. Click Save 7. Go to Orders/Order Options 8. Enter the new number you want to start with 9. Click "Change Start number" It is not my merit, I only joined two pieces of information found on this forum! AdminOrderOptions.php
  9. Hi everybody. I installed modrefchange in order to turn order reference from alphabetical to numerical, but it doesn't work; it says "data updated", though. I use Prestashop 1.6.0.9. I installed the module in another site I manage and worked perfectly.
  10. Order referentie wijzigingsmodule v1.5 Module to change the order reference using Order ID AND/OR Cart ID Compatibility: Prestashop v1.5.X and above Screenshots: Edit by mdekker: Temporary download link for version 1.3: https://github.com/firstred/mdrefchange/releases/download/1.3.0/v1.3.0-modrefchange.zip Note: this version should not be used with 1.6 as it is NOT compatible, please wait for the new version
  11. To replace uppercase in the Order reference and replace with numbers (id_order as in older versions) I made this simple code override in /override/classes/order/Order.php: <?php class Order extends OrderCore { public function getUniqReference() { $query = new DbQuery(); $query->select('MIN(id_order) as min, MAX(id_order) as max'); $query->from('orders'); $query->where('id_cart = '.(int)$this->id_cart); $query->orderBy('id_order'); $order = Db::getInstance()->getRow($query); /*if ($order['min'] == $order['max']) return $this->reference; else return $this->reference.'#'.($this->id + 1 - $order['min']);*/ return sprintf('%06d', $this->id); } public static function getUniqReferenceOf($id_order) { $order = new Order($id_order); return $order->getUniqReference(); } } To return to the original letters designation, you must remove comment from 'if' and add comment to //return sprintf('%06d', $this->id); .
  12. I use Prestashop 1.5.2 I got some problems, please help. I dont know how to change order id to order reference in "My loyalty points"? Also, how to translate: The minimum order amount in order to use these vouchers is: to another language? it's possible to translate all other text, but when I translate that part nothing happened. I suppose its a bug Please help Thanks
  13. Hello, Noticed a small problem with loyalty history, under vouchers sections, the "more" link that usually shows the orders from which this voucher has been generated. It is showing the same 2 orders to the exception of the price: (for example) Order #4 (300 USD) : 30 points Order #4 (3000 USD) : 30 points While the second one should be order #5 and 300 points. I looked at /modules/loyalty/views/templates/front/loyalty.tpl (line 165) <td class="history_method"> <a href="{$smarty.server.SCRIPT_NAME|escape:'htmlall':'UTF-8'}" onclick="return false" class="tips" title=" {l s='Generated by these following orders' mod='loyalty'}|{foreach from=$discount->orders item=myorder name=myLoop} {l s='Order #%d' sprintf=$myorder.id_order mod='loyalty'} ({displayPrice price=$myorder.total_paid currency=$myorder.id_currency}) : {if $myorder.points > 0}{l s='%d points.' sprintf=$myorder.points mod='loyalty'}{else}{l s='Cancelled' mod='loyalty'}{/if} {if !$smarty.foreach.myLoop.last}|{/if}{/foreach}">{l s='more...' mod='loyalty'}</a></td> It doesn't seem to be problematic, so i guess the problem could be in some php file ?? Another thing, what if someone wants the order reference instead of order ID to be displayed ? on the same file (line 50): <tbody> {foreach from=$displayorders item='order'} <tr class="alternate_item"> <td class="history_link bold">{l s='#' mod='loyalty'}{$order.id|string_format:"%06d"}</td> <td class="history_date">{dateFormat date=$order.date full=1}</td> <td class="history_method">{$order.points|intval}</td> <td class="history_method">{$order.state|escape:'htmlall':'UTF-8'}</td> </tr> {/foreach} </tbody> I tried $order.reference with no result, i found that reference is not even in the loyalty table in db. Anyone can help with this ? like adding reference to the loyalty table so we can call it as $order.reference instead of $order.id Thank you all for reading, and any help is much appreciated.
  14. Hi, Can someone explain why orders.reference was implemented in 1.5 ? searching in code, I've found the following commments that did not helped me to understand /classes/order/Order.php @var string Order reference, this reference is not unique, but unique for a payment * Get a collection of orders using reference public static function getByReference($reference) * Gennerate a unique reference for orders generated with the same cart id * This references, is usefull for check payment public static function generateReference() * Return a unique reference like : GWJTHMZUN#2 * With multishipping, order reference are the same for all orders made with the same cart * in this case this method suffix the order reference by a # and the order number public function getUniqReference() - handling mutiple payment for one order ? but order_payment table can reference order_id. - multiple orders from one cart and only one payment ? - why is so usefull for check payment ? - how to be sure that 2 orders, from 2 customers won't have same order reference when reference comes from a random generator ? thank you for your help.
  15. Hallo Prestashop-Forum Community Vor etwa 2 Tagen habe ich Prestashop Version 1.5.3.1 Installiert. Leider sind die Bestellnummer (order reference) mit Buchstaben versehen. Doch dies ist so Unbrauchbar. Gibt es eine Möglichkeit mithilfe eines Moduls oder sogar Prestashop Bordmitteln die Bestellnummer wider vorlaufend hinzubekommen? Vielen Dank für eure Hilfe Poetflashimpact, Switzerland
×
×
  • Create New...