- Posts: 7
- Thank you received: 0
Hikashop checkout API
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
The main part is located in the file components/com_hikashop/controllers/checkout.php so I invite you to look there for the code you need based on what you want to do.
Please Log in or Create an account to join the conversation.
Say
1. Load a product:
$productClass = hikashop_get('class.product');
$product=$productClass->get($product_id);
2. Add/Update product(s);
$cartClass = hikashop_get('class.cart');
$cartClass->update($product_id,$quantity);
3. Currently, there's no payment integration for the Android App. Its a free product. How do i checkout from here skipping payment integration. Also, i have disabled payment gateway integration in the Hikashop Backend. Do i have to load this class components/com_hikashop/controllers/checkout.php But how?
Thanks.
Please Log in or Create an account to join the conversation.
That's where the current cart is converted into an order and then the payment plugins are triggered to get the HTML form which will then redirect the user to the payment platform.
Please Log in or Create an account to join the conversation.
$cartClass = hikashop_get('class.cart');
$cartClass->AddToCart($parameters);
Please Log in or Create an account to join the conversation.
Just include the helpers/helper.php file of the backend in order to load HikaShop's library and then load the controller file.
For the add to cart, you can do like that:
$cartClass = hikashop_get('class.cart');
$cartClass->update($product_id,$quantity);
HikaShop doesn't output any json.
Please Log in or Create an account to join the conversation.
$cartClass = hikashop_get('class.cart');
$cartClass->checkout($parameters); //something like this.
or
$cartClass->generateOrder($parameters); //something like this.
or
$cartClass->PaymentProcess($parameters); //something like this.
I am also aware hikashop does not return json objects. Indeed, I am looking for php multi-dimensional arrays(so does $cartClass->update() method).
Please Log in or Create an account to join the conversation.
$obj = null;
//add params to $obj
$class= hikashop_get('class.order');
$class->save($obj);
There are no methods for checkout or PaymentProcess
Please Log in or Create an account to join the conversation.
Thanks.
Please Log in or Create an account to join the conversation.
$obj=$class->get($order_id);
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
That is done in only one place:
in the function after_confirm of components/com_hikashop/controllers/checkout.php
Please Log in or Create an account to join the conversation.