When Prestashop calls Scellius the order number does not exist because it is generated once the payment is completed. Only the shopping cart number is generated and sent to Scellius.
In the Merchant Back Office, the registered order ID corresponds to the shopping cart number of PrestaShop.
Therefore, it is normal not to find the order number in payment confirmation emails.
Add the Cart column in PrestaShop:
We offer a modification to the PrestaShop code to display the order number in the PrestaShop order list.
For versions prior to Prestashop 1.7.7.0
Open the following file: AdminOrdersController.php (controllers/admin directory)
After the following code (around line 82):
$this->fields_list = array
( 'id_order' => array(
'title' => $this->trans('ID', array(), 'Admin.Global'),
'align' => 'text-center',
'class' => 'fixed-width-xs'
),
Add the following code:
'id_cart' => array(
'title' => $this->l('Panier'),
'align' => 'center',
'width' => 25),
The addition of this code will allow to display a column entitled Shopping cart between the ID and Reference columns.
For versions greater than or equal to Prestashop 1.7.7.0
Open the following file: OrderGridDefinitionFactory.php (src / Core / Grid / Definition / Factory directory)
After the following code (around line 188):
->add((new IdentifierColumn('id_order'))
->setName($this->trans('ID', [], 'Admin.Global'))
->setOptions([
'identifier_field' => 'id_order',
'preview' => $previewColumn,
'clickable' => false,
])
)
Add the following code:
->add((new IdentifierColumn('id_cart'))
->setName($this->trans('ID Panier', [], 'Admin.Global'))
->setOptions([
'identifier_field' => 'id_cart',
'preview' => $previewColumn,
'clickable' => false,
])
)
After the following code (around line 321):
->add((new Filter('id_order', TextType::class))
->setTypeOptions([
'required' => false,
'attr' => [
'placeholder' => $this->trans('Search ID', [], 'Admin.Actions'),
],
])
->setAssociatedColumn('id_order')
)
Add the following code:
->add((new Filter('id_cart', TextType::class))
->setTypeOptions([
'required' => false,
'attr' => [
'placeholder' => $this->trans('Recherche ID panier', [], 'Admin.Actions'),
],
])
->setAssociatedColumn('id_cart')
)
Open the following file: OrderQueryBuilder.php ( src / Core / Grid / Query directory)
Replace the following code (around line 92):
->addSelect('o.id_order, o.reference, o.total_paid_tax_incl, os.paid, osl.name AS osname')
with:
->addSelect('o.id_order, o.id_cart, o.reference, o.total_paid_tax_incl, os.paid, osl.name AS osname')
After the following code (around line 165):
'id_order' => 'o.id_order',
Add the following code:
'id_cart' => 'o.id_cart',
After the following code (around line 300):
'id_order' => 'o.id_order',
Add the following code:
'id_cart' => 'o.id_cart',
The addition of this code will allow to display a column entitled Shopping cart between the ID and Reference columns. A search field and the option to sort by cart number will also be available.