This plugins gives you the ability to create your own custom order number formats. Some businesses need the order number to be compliant to some rules.
The following plugins are required
Shopaholic
No. 1 e-commerce platform for October CMS
Shopaholic
No. 1 e-commerce platform for October CMS
Orders for Shopaholic
Allows customers to purchase products using the cart
Orders for Shopaholic
Allows customers to purchase products using the cart
Variables
You can use some cool variables to customise the order number format.
Description | Variable |
---|---|
Current year, 4 characters | @y |
Incremental number, 4 characters | @n(4) |
Extend
You can extend the formatter with your own variables. Simple register your variable and use it in the formatting string.
You can use the event codecycler.ordernumberformat.variables_extend
.
// Listen to event in Plugin.php boot method
Event::listen('codecycler.ordernumberformat.variables_extend', function () {
return [
'@customvariable' => [
\Hendricks\Piedpiper\Classes\OrdernumberVariable::class,
],
];
});
// File located at $/hendricks/piedpiper/classes/OrdernumberVariable.php
namespace Hendricks\Piedpiper\Classes;
class OrdernumberVariable
{
public static function getValue($obOrder, $sVariable)
{
return 'hello';
}
}
You can use a variable. See table with default variables (@n(4)
) at the top of this document for understanding how the variable works.
-
This plugin has not been reviewed yet.
-
1.0.4 |
Added Lovata.Shopaholic as a plugin dependency Aug 18, 2020 |
---|---|
1.0.3 |
Introduced an event for extending the formatter with your own variables Aug 04, 2020 |
1.0.2 |
Improved variable names and added dependancy Aug 01, 2020 |
1.0.1 |
Initialize plugin. Jul 31, 2020 |