WebSite X5Help Center

 
Stanislav B.
Stanislav B.
User

Some banks do not take letters and as a variable symbol (this is a big problem)  en

Autor: Stanislav B.
Visited 939, Followers 2, Udostępniony 0  

I need to set the program so that x5cart.js is: 'order_no_format': '[yy] [mm] [dd] [0-9] [0-9] [0-9]', the default setting is: 'order_no_format': '[yy] [mm] [dd] - [A-Z] [A-Z] [0-9] [0-9]' I can set it manually after exporting the pages, but after restarting the program it is always at the original value. Is there a better solution, please? Editing x5cart.js every time I change the content of a page is bad some banks do not take letters and as a variable symbol (this is a big problem) (sometimes I forget and it's a problem).

Thank you

Posted on the
7 ODPOWIEDZI - 2 USEFUL - 1 PRAWIDłOWA ODPOWIEDź
Andre E
Andre E
Moderator

try the language settings to change the format.

It's just a thought, i have not tryed to chaange it myself, just hope it helps.....

you can also set full day's months  and day's these are in text and are arrays, so you can change it to 1,2,3, ....12  
Just test to get it the way you want.

Czytaj więcej
Posted on the from Andre E
Stanislav B.
Stanislav B.
User
Autor

The language setting has no effect

Czytaj więcej
Posted on the from Stanislav B.
Stanislav B.
Stanislav B.
User
Autor

I need to set the program so that the order does not contain letters and (-) just numbers

Czytaj więcej
Posted on the from Stanislav B.
Andre E
Andre E
Moderator

it's strange that order nr is not accepted with letters, but i don't know a sulotion for that.

Maybe someone else?

Czytaj więcej
Posted on the from Andre E
Axel  
Axel  
User
Najlepszy Użytkownik miesiąca FR

Hello Stan ,

here a perpetual solution to help you (working with Website X5 Pro v16.2.1)

you can create an order number composed by 5 digits adding this code in the HEAD section of the whole website (step 1 | Advanced Settings | >Statistics & SEO Code, Head section)

<script type="text/javascript">
x5engine.boot.push(function () {
x5engine.cart.manager.settings({
"order_no_format": "AFS-[0-9][0-9][0-9][0-9][0-9]"
});
}, false, "last");
</script>

Actually it is so composed:

[yy][mm][dd]-[A-Z][0-9][A-Z][0-9]

Year, Month, Day, Random Letter, Random Number, Random Letter, Random number

If you want to have another format change the [0-9] fields with what you want to display


Hope this helps!


Here our result is:

Take care.

By default into the database the length of the order number is 16 characters maximum.



Enjoy !

Axel

Czytaj więcej
Posted on the from Axel  
Axel  
Axel  
User
Najlepszy Użytkownik miesiąca FR

Hello,

Works with X5 Pro v2020.2.7 too

IMPORTANT, Put the code here

And the result will be :

Enjoy !

Axel

Czytaj więcej
Posted on the from Axel  
Stanislav B.
Stanislav B.
User
Autor

It works properly thank you, thank you :)

Czytaj więcej
Posted on the from Stanislav B.