How to insert/update data in custom created table in hikashop payment plugin

  • Posts: 21
  • Thank you received: 0
3 years 9 months ago #321634

-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.19
-- PHP version -- : 7.3

Hello,

I am working on custom third party payment plugin. I have created a new table "mmf9b_customer_saved_cards" using install script in my plugin. Now I want to save data into this table in onPaymentNotification function.

I saw that we can save data in order table like below :

$orderClass = hikashop_get('class.order');
$order = new stdClass();
$order->order_id = $order_id;
$order->custom_auth_number = $authNumber;
$order->custom_txn_id = $transactionId;
$orderClass->save($order);

But I don't know I how to save in my newly created table which is "mmf9b_customer_saved_cards".

So if anyone has knowledge about this then please let me know.

Thanks in advance!

Please Log in or Create an account to join the conversation.

  • Posts: 26000
  • Thank you received: 4004
  • MODERATOR
3 years 9 months ago #321640

Hello,

HikaShop do provides classes for its own structures and tables.
But if you do add your own database tables, you need to create your own classes or to perform directly the SQL queries.
docs.joomla.org/Inserting,_Updating_and_...data_using_JDatabase

Regards,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: ajdev33

Please Log in or Create an account to join the conversation.

  • Posts: 21
  • Thank you received: 0
3 years 9 months ago #321647

Thanks for very helpful information.

Please Log in or Create an account to join the conversation.

Time to create page: 0.057 seconds
Powered by Kunena Forum