peterp Posted May 7, 2019 Share Posted May 7, 2019 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 More sharing options...
bsmither Posted May 7, 2019 Share Posted May 7, 2019 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 More sharing options...
Phrkd Posted January 15, 2020 Share Posted January 15, 2020 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 More sharing options...
bsmither Posted January 15, 2020 Share Posted January 15, 2020 "When payment confirmation is received" Is this from an email sent by CubeCart? An email sent by WorldPay? Where do you see this order number (which is CubeCart's standard, legacy format)? Link to comment Share on other sites More sharing options...
Phrkd Posted January 15, 2020 Share Posted January 15, 2020 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 More sharing options...
bsmither Posted January 15, 2020 Share Posted January 15, 2020 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 More sharing options...
Phrkd Posted January 15, 2020 Share Posted January 15, 2020 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.. Link to comment Share on other sites More sharing options...
bsmither Posted January 15, 2020 Share Posted January 15, 2020 Yes, I found the code that shows the custom order number format. I will see if we can do something with the WorldPay module. Link to comment Share on other sites More sharing options...
Phrkd Posted January 15, 2020 Share Posted January 15, 2020 That would be great! Thank you for your help, bsmither. Very much appreciated. Link to comment Share on other sites More sharing options...
bsmither Posted January 15, 2020 Share Posted January 15, 2020 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 More sharing options...
Phrkd Posted January 15, 2020 Share Posted January 15, 2020 I've made the change and actioned a transaction but it appears to still be picking up the default format: Link to comment Share on other sites More sharing options...
bsmither Posted January 15, 2020 Share Posted January 15, 2020 Ok, but the excerpt (Thank You email?) you posted above also includes a reference to the Merchant's Cart ID. Where did the data you posted just now come from? Link to comment Share on other sites More sharing options...
Phrkd Posted January 15, 2020 Share Posted January 15, 2020 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 More sharing options...
bsmither Posted January 15, 2020 Share Posted January 15, 2020 Ok. I may not be able to review the WorldPay documentation as it pertains to what gets displayed at WorldPay, but did the Custom OID appear on the email sent out by WorldPay to you? Link to comment Share on other sites More sharing options...
Phrkd Posted January 15, 2020 Share Posted January 15, 2020 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 More sharing options...
Phrkd Posted January 16, 2020 Share Posted January 16, 2020 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 More sharing options...
bsmither Posted January 16, 2020 Share Posted January 16, 2020 If possible, ask your WorldPay customer representative to examine the submission data payload for a transaction. Ask then to verify that the key 'MC_OID' is being used to populate the emailed response. Link to comment Share on other sites More sharing options...
Phrkd Posted January 16, 2020 Share Posted January 16, 2020 Will do, it's late here now so will endeavour to speak to them tomorrow AM. Thanks for your help again. Link to comment Share on other sites More sharing options...
bsmither Posted January 16, 2020 Share Posted January 16, 2020 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 More sharing options...
Phrkd Posted January 16, 2020 Share Posted January 16, 2020 Roger that. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.