How to Change Order Number to VS - Variable Symbol - Prestashop

How to Change Order Number to VS - Variable Symbol - Prestashop

Change Order Number to Numeric Variable Symbol

The order number as the reference number that is sent to the customer after the order process is completed is by default in Prestashop's e-shop. However, the letters must be changed to numbers so that the reference number - the order number can serve as a variable symbol.

Disadvantages of changing to a numeric variable symbol in Prestashop

As it is a good habit, let's first know what this change can not do and how we need to deal with it separately, whether in the form of other instructions and advice or direct contact with us. One of the drawbacks of the solution presented may be that the generated invoice number will be different from the order number. While the order number is generated randomly (by default, strong> the invoice number can be set in the administration and the sequence is preserved (eg FA20150001, FA20150002, etc.) If you want the same order number (variable symbol) as the invoice number, you need to make a more extensive adjustment than the one you are presenting here .

The benefits of our Variable Symbol solution in Prestashop

  • is the foundation for these solutions because we understand that not everyone can devote to technology most of the time.
  • is fast and uncomplicated, the change applies to only one file, error can be easily corrected, and there is no collision between the different parts of the Prestashop ecommerce application code and kernel.
  • is FREE - you do not have to pay anyone for editing, you can easily launch it yourself.

    If you are having difficulty integrating or editing the code, just do not dare to write to us. We'll be happy to help you with this.

    To change the ordering from letters to numbers, you need to find and modify the following code in the classes / order / Order.php file in your e-mail installation. Prestashop store. Before editing, we strongly recommend that you back up the file so that if you make a mistake by mistake or ignorance, you can restore it without a lengthy search for an error. The change is so simple that you can not practically mistake it.

    find the code:

    public static function generatedReference ()

    return strtoupper (Tools :: passwdGen (9, 'NO_NUMERIC'));

    }

    and edit it to: (The change applies only to NO_NUMERIC on NUMERIC):

    New code:

    public static function generatedReference ()

    return strtoupper (Tools :: passwdGen (9, 'NUMERIC'));

    }

All comments

Leave a Reply