News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Why Order Status code one character only?

Started by EvanGR, November 10, 2021, 10:30:57 AM

Previous topic - Next topic

EvanGR

Why is there a limitation for a single character for order status codes?
Is this something that could be improved easily in a future update?

Yes, we are reaching the limit of english alphabet letters, and we could use more order statuses.


Thanks

Jörgen

#1
You get 10 more statuses by using 0..9. You could probably use more printable characters. But do not use the status 'N' since it will get you in to trouble. It is used internally.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

EvanGR

Thanks, yes we started using numbers already.

I suppose the single-character limit is for legacy compatibility purposes?


Jörgen

I really do not see why it could not be expanded to more characters. Tests performed seems to be done with string logic. This would probably not be affected by a larger field for order status. But I guess using all available printable characters would more than cover the normal need for order statuses.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

EvanGR

Thanks.

A more advanced use of order statuses, is to use multiple characters and group them into families e.g.

Zxx (e.g. Z00, Z01, Z02)
Bxx
Axx

or even with numbers

2xx
3xx
4xx

Each group (denoted by first char), would signify the broad status (e.g. Completed, Failed, etc)

In our specific case, we use fine-grained Order statuses even to denote stuff like "Waiting to receive from **** supplier". So we are close to using all available single characters.

Studio 42

you have 26+10 choice this mean 36 and perhaps some other special char can work to.
How you want handle correctly more then 36 order status  in the list ?
Free XML sitemap generator [url="http://shop.st42.fr/en/catalog/products/virtuemart-2-sitemap.htm"]http://shop.st42.fr/en/catalog/products/virtuemart-2-sitemap.htm[/url]  , Free Unused Image cleaner [url="http://shop.st42.fr/en/products/virtuemart-media-folder-clear.htm"]http://shop.st42.fr/en/products/virtuemart-media-folder-clear.htm[/url]
Language Switch in product & category [url="http://shop.st42.fr/en/categories-tools/multi-language-for-virtuemart.htm"]http://shop.st42.fr/en/categories-tools/multi-language-for-virtuemart.htm[/url]
More extentions [url="http://shop.st42.fr/en/"]http://shop.st42.fr/en/[/url]

pinochico

#6
Quotemore then 36 order status  in the list ?

the more stripes, the more addidas  ;D
(said a Vietnamese salesman selling a tracksuit with four stripes)

Maybe - more order status, better shop?
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

Studio 42

Pinochico, i really mean that this order statut Char is stupid, you have an ID for each order statut
But all the system use this char for now.
Free XML sitemap generator [url="http://shop.st42.fr/en/catalog/products/virtuemart-2-sitemap.htm"]http://shop.st42.fr/en/catalog/products/virtuemart-2-sitemap.htm[/url]  , Free Unused Image cleaner [url="http://shop.st42.fr/en/products/virtuemart-media-folder-clear.htm"]http://shop.st42.fr/en/products/virtuemart-media-folder-clear.htm[/url]
Language Switch in product & category [url="http://shop.st42.fr/en/categories-tools/multi-language-for-virtuemart.htm"]http://shop.st42.fr/en/categories-tools/multi-language-for-virtuemart.htm[/url]
More extentions [url="http://shop.st42.fr/en/"]http://shop.st42.fr/en/[/url]

EvanGR

@pinochico  ;D ;D ;D

But seriously, we do use that many order statuses because it helps with internal management of orders. Customers only see a few of those statuses. The rest are for internal use.

Also, working with single characters makes it hard to know what a status is about.
Statuses X, F and G
versus
Statuses 201, 207, 405
(assume 2xx are OK, 4xx indicate some sort of problem that requires attention)

sandomatyas

I agree, extending 1 character to more wouldn't hurt and wouldn't cause backwards incompatiblity

Milbo

Okey, changed to 3. Should be just 7 places in the install.sql. But it is not in the just uploaded version. EvanGr open your install.sql and change order_status_code to char(3) and all 6 oder_status to char(3). Then use the tableupdater.
Should I fix your bug, please support the VirtueMart project and become a [url=http://extensions.virtuemart.net/support/virtuemart-supporter-membership-detail]member[/url]
______________________________________
Extensions approved by the core team: http://extensions.virtuemart.net/