- Posts: 10
- Thank you received: 1
How to connect to hikashop api by custom php code
10 years 7 months ago #231498
by vahid.vdn
How to connect to hikashop api by custom php code was created by vahid.vdn
-- HikaShop version -- : 2.6.1
Hi there. I am going to write a control panel that is going to fetch some products from a xml file. I must add them to the joomla site which is working with hikashop.
How can I use hikashop api in custom php code?? Imagine my project is " www.example.com " and my own custom php directory is like " www.example.com/mypage " .
I found this url to loading helper.php , but I couldn't.
Can anybody help me?
Hi there. I am going to write a control panel that is going to fetch some products from a xml file. I must add them to the joomla site which is working with hikashop.
How can I use hikashop api in custom php code?? Imagine my project is " www.example.com " and my own custom php directory is like " www.example.com/mypage " .
I found this url to loading helper.php , but I couldn't.
Can anybody help me?
Please Log in or Create an account to join the conversation.
10 years 7 months ago #231505
by nicolas
Replied by nicolas on topic How to connect to hikashop api by custom php code
Hi,
What do you mean by "you couldn't" ?
It's just an include of the helper.php file of HikaShop.
It's standard PHP. The JPATH_ADMINISTRATOR constant will only exist if you're in a script where Joomla has already been loaded. And you need to load Joomla before you load HikaShop since HikaShop relies on Joomla's library for some of its functions.
So if you're trying to load HikaShop from a third party script, make sure that Joomla is already loaded:
stackoverflow.com/questions/23937651/loa...in-external-php-file
What do you mean by "you couldn't" ?
It's just an include of the helper.php file of HikaShop.
It's standard PHP. The JPATH_ADMINISTRATOR constant will only exist if you're in a script where Joomla has already been loaded. And you need to load Joomla before you load HikaShop since HikaShop relies on Joomla's library for some of its functions.
So if you're trying to load HikaShop from a third party script, make sure that Joomla is already loaded:
stackoverflow.com/questions/23937651/loa...in-external-php-file
The following user(s) said Thank You: vahid.vdn
Please Log in or Create an account to join the conversation.
10 years 7 months ago #231543
by vahid.vdn
Replied by vahid.vdn on topic How to connect to hikashop api by custom php code
Thank you.
And one more question. As you have code samples for custom php codes here , I can't find any api for adding product.. There are some codes about loading a product, adding product to cart, loading the current cart data etc, but nothing for adding product. What should I do??
And one more question. As you have code samples for custom php codes here , I can't find any api for adding product.. There are some codes about loading a product, adding product to cart, loading the current cart data etc, but nothing for adding product. What should I do??
Please Log in or Create an account to join the conversation.
10 years 6 months ago #231548
by nicolas
Replied by nicolas on topic How to connect to hikashop api by custom php code
The following user(s) said Thank You: vahid.vdn
Please Log in or Create an account to join the conversation.
Time to create page: 0.178 seconds