[Skip to main content](#vessel-content)

#   How to connect to hikashop api by custom php code

##

- **[vahid.vdn](/forum/user/38805-vahid-vdn "View vahid.vdn's Profile")**
- [![vahid.vdn's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38805-vahid-vdn "View vahid.vdn's Profile") Topic Author
- [ Offline](/forum/user/38805-vahid-vdn)

Less More

- Posts: 10
- Thank you received: 1
-
-

10 years 7 months ago [\#231498](#231498) by [vahid.vdn](/forum/user/38805-vahid-vdn "View vahid.vdn's Profile")  *[How to connect to hikashop api by custom php code](/forum/31-development/882665-how-to-connect-to-hikashop-api-by-custom-php-code#231498 "-- 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 &quot;  www.example.com &quot; and my own custom php directory is like &quot;  www.example.com/mypage &quot; . I found to loading helper.php  , but I couldn't. Can anybody help me?")* was created by *[vahid.vdn](/forum/user/38805-vahid-vdn "View vahid.vdn's Profile")*

-- 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](http://www.example.com)" and my own custom php directory is like "[ www.example.com/mypage](http://www.example.com/mypage)" .
I found [ this url](http://www.hikashop.com/support/documentation/62-hikashop-developer-documentation.html#code) to loading **helper.php**  , but I couldn't.
Can anybody help me?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4MjY2NS1ob3ctdG8tY29ubmVjdC10by1oaWthc2hvcC1hcGktYnktY3VzdG9tLXBocC1jb2RlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14267
-
-

10 years 7 months ago [\#231505](#231505) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to connect to hikashop api by custom php code](/forum/31-development/882665-how-to-connect-to-hikashop-api-by-custom-php-code#231505 "-- 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 &quot;  www.example.com &quot; and my own custom php directory is like &quot;  www.example.com/mypage &quot; . I found to loading helper.php  , but I couldn't. Can anybody help me?")*

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](http://stackoverflow.com/questions/23937651/load-joomla-3-x-framework-and-modules-in-external-php-file)

The following user(s) said Thank You: [vahid.vdn](/forum/user/38805-vahid-vdn "View vahid.vdn's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4MjY2NS1ob3ctdG8tY29ubmVjdC10by1oaWthc2hvcC1hcGktYnktY3VzdG9tLXBocC1jb2RlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[vahid.vdn](/forum/user/38805-vahid-vdn "View vahid.vdn's Profile")**
- [![vahid.vdn's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/38805-vahid-vdn "View vahid.vdn's Profile") Topic Author
- [ Offline](/forum/user/38805-vahid-vdn)

Less More

- Posts: 10
- Thank you received: 1
-
-

10 years 7 months ago [\#231543](#231543) by [vahid.vdn](/forum/user/38805-vahid-vdn "View vahid.vdn's Profile")  Replied by *[vahid.vdn](/forum/user/38805-vahid-vdn "View vahid.vdn's Profile")* on topic *[How to connect to hikashop api by custom php code](/forum/31-development/882665-how-to-connect-to-hikashop-api-by-custom-php-code#231543 "-- 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 &quot;  www.example.com &quot; and my own custom php directory is like &quot;  www.example.com/mypage &quot; . I found to loading helper.php  , but I couldn't. Can anybody help me?")*

Thank you.
And one more question. As you have code samples for custom php codes [ here](http://www.hikashop.com/support/support/documentation/62-hikashop-developer-documentation.html#code) , 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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4MjY2NS1ob3ctdG8tY29ubmVjdC10by1oaWthc2hvcC1hcGktYnktY3VzdG9tLXBocC1jb2RlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14267
-
-

10 years 7 months ago [\#231548](#231548) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[How to connect to hikashop api by custom php code](/forum/31-development/882665-how-to-connect-to-hikashop-api-by-custom-php-code#231548 "-- 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 &quot;  www.example.com &quot; and my own custom php directory is like &quot;  www.example.com/mypage &quot; . I found to loading helper.php  , but I couldn't. Can anybody help me?")*

Hi,

Here is a thread about that:
[ www.hikashop.com/forum/content-creation/...-data-using-api.html](http://www.hikashop.com/forum/content-creation/878870-how-to-update-product-s-data-using-api.html)

The following user(s) said Thank You: [vahid.vdn](/forum/user/38805-vahid-vdn "View vahid.vdn's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMxLWRldmVsb3BtZW50Lzg4MjY2NS1ob3ctdG8tY29ubmVjdC10by1oaWthc2hvcC1hcGktYnktY3VzdG9tLXBocC1jb2RlP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop- Install &amp; Update- Product &amp; Category Display- Content Creation- Sales and Orders- - Orders management- - Reports &amp; Statistics- Customers- Checkout- Payment Methods- Shipping Methods- Import &amp; Export (CSV, XLS…)- Specific Features- - Affilation- - Taxes- - Wishlist- - Vote- - Carousel &amp; Slider- - Mass Actions- - Filters &amp; Search- - Discount &amp; Coupon- - Feature Request- Integrations- Showcase- General Talk about HikaShop- Development- - HikaShop 3.0 Beta- Translation- Commercial Jobs HikaShop Components- HikaMarket- - Market: Feature requests- - Market: How to?- - Market: Bug Report- HikaSerial- - General talk about HikaSerial- - Serial: Bug Report- - Serial: How to?- - Support en Français de HikaSerial (French Support)- - HikaSubscription- HikaAuction- - Auction: Feature requests- - Auction: How to?- - Auction: Bug report Hikashop around the world- Support en Français (French Support)- Russian- - FAQ. Курс выживания с Hikashop. Частые вопросы и о- - Расширения Hikashop- - Наши сайты на Hikashop- 日本語版サポート(Japanese Support)- Thai- German Archives- Bug Report- How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.143 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)

[](#top)
