Jump to content

Incremental order numbers


peterp

Recommended Posts

Hi All,

         I'm trying to setup incremental order numbers in my store however even though I have specified that the number should have a prefix of 'BTW' this does not appear. The order number is correct when I look in the orders selection from the admin dashboard but when it prints the order using print order form gateway I get the order format of date time etc. not the incremental order number. I have looked through the forum but cannot find anything similar so I guess must have some setup wrong. I somebody could help straighten me out I would appreciate it.

Best Regards,

Peterp

Link to comment
Share on other sites

Initial examination of the POF gateway code suggests that it is not compliant with the new-ish capability of CubeCart to use alternate order numbering formats.

An issue will be posted in the Github.

 

Link to comment
Share on other sites

  • 8 months later...

Hi, I'm having a similar issue I think, I've set a custom order number eg ABC00001 yet when payment confirmation is received the order number is of this format eg 200115-120925-1799. This is making it rather difficult to match orders with transactions. Is this something I can resolve or is this a wider issue?

I'm using the WorldPay Payment Gateway extension.

Many thanks in advance.

Link to comment
Share on other sites

Hello bsmither,

This is a confirmation of payment sent by WorldPay, below is an extract:

Thank you

Your transaction has been processed by WorldPay, on behalf of xxxxxxxxx.

Transaction details:

Transaction for the value of: GBP 0.01
Description: Payment for Order 200115-120925-1799
From: xxxxxx
Merchant's cart ID: 200115-120925-1799
Authorisation Date/Time: 15/Jan/2020 12:10:35
WorldPay's transaction ID: xxxxxxxxxxx
 

It's using the default cubecart format for the Payment for Order and Merchant cart ID, even though the incremental format has been set within CC and all orders within CC are showing as ABC000001 etc.

Thanks for your assistance.

Link to comment
Share on other sites

I understand.

We need to learn how to send additional arbitrary info to WorldPay so that they can send it back in their acknowledgement.

But, unless I missed something, CubeCart should list, in admin, Orders, the orders by the standard cart order ID format. Do you see something different in admin?

I see it now. The admin skin will show the custom order ID format if the store is set to that mode.

More later.

Link to comment
Share on other sites

The orders within Admin are in a custom incremental format as shown on the attached image. Obviously I can change this to the cubecart default format in Store Settings but that doesn't work for our needs. Hope I've understood your question..

admin_orders.jpg

Link to comment
Share on other sites

Please make this edit and test. (I have not confirmed this will work.)

In the gateway module WorldPay gateway.class.php file, near line 52, find:

'MC_OID' 	=> $this->_basket['cart_order_id'],

Change to:

'MC_OID' 	=> ($GLOBALS['config']->get('config', 'oid_mode')=='i' ? $this->basket[$GLOBALS['config']->get('config', 'oid_col')] : $this->_basket['cart_order_id']),

I am assuming the MC_OID is a value that WorldPay assumes is Merchant Cart Order ID. As such, I also assume that we can make this value whatever we want with impunity. This is not the same as the cartId, which is what WorldPay and CubeCart agree is the primary key to identifying which order is being referenced.

The edit above says that: if the store config is set to use Incremental order numbers (oid_mode == 'i'), then use the value found in the named column used for the custom format (oid_col should hold the name of the database column 'custom_oid'). Otherwise, use the standard format found in the 'cart_order_id' column.

 

Link to comment
Share on other sites

That is from the WorldPay payment page. I can carry out a full transaction to get the Thank You email I originally posted, but I assumed that because it is still showing that default ID format there'd be no point.

Link to comment
Share on other sites

I'll run another test and report back.

Still the same unfortunately bsmither.

Thank you

Your transaction has been processed by WorldPay, on behalf of xxxxxxx.

Transaction details:

Transaction for the value of: GBP 0.01
Description: Payment for Order 200115-184348-4112
From: xxxxxx
Merchant's cart ID: 200115-184348-4112
Authorisation Date/Time: 15/Jan/2020 18:44:38
WorldPay's transaction ID: xxxxxxxxxx

I've also just noticed this on the cubecart checkout page (/index.php?_a=complete):

Your Order: #200115-184348-4112 - Processing

Customer Information

Billing Address

So it seems this is where WorldPay is getting its info from?

Link to comment
Share on other sites

To clarify it appears that the admin/back end of cubecart is using the specified incremental order number id, but the cubecart shop/front end is still using the default cubecart format order number.

 

Link to comment
Share on other sites

Also, please verify that the CubeCart user that accesses the database has CREATE TRIGGER permissions. You may need to use an external utility (such as phpMyAdmin - found in your hosting account's control panel) to examine the permissions of this user.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...