- Posts: 21
- Thank you received: 0
How to insert/update data in custom created table in hikashop payment plugin
6 years 2 months ago #321634
by ajdev33
-- 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!
-- 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.
6 years 2 months ago #321640
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic How to insert/update data in custom created table in hikashop payment plugin
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,
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.
The following user(s) said Thank You: ajdev33
Please Log in or Create an account to join the conversation.
6 years 2 months ago #321647
by ajdev33
Replied by ajdev33 on topic How to insert/update data in custom created table in hikashop payment plugin
Thanks for very helpful information.
Please Log in or Create an account to join the conversation.
Time to create page: 0.160 seconds