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

#   Separate database for hikashop component?

##

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

Less More

- Posts: 175
- Thank you received: 0
-
-

11 years 5 months ago [\#200351](#200351) by [veeco](/forum/user/18501-veeco "View veeco's Profile")  *[Separate database for hikashop component?](/forum/26-product-category-display/876698-separate-database-for-hikashop-component#200351 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.36  Hi, is it possible to use a separate database for hikashop?  i want to create multiple website that have hikashop and access 1 global database. Only for their hikashop data.  is it possible?  Thank you in advance")* was created by *[veeco](/forum/user/18501-veeco "View veeco's Profile")*

-- HikaShop version -- : 2.3.3
-- Joomla version -- : 3.36

Hi, is it possible to use a separate database for hikashop?

i want to create multiple website that have hikashop and access 1 global database. Only for their hikashop data.

is it possible?

Thank you in advance

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzY2OTgtc2VwYXJhdGUtZGF0YWJhc2UtZm9yLWhpa2FzaG9wLWNvbXBvbmVudD90bXBsPW1hcmtkb3du) 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: 14268
-
-

11 years 5 months ago [\#200373](#200373) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Separate database for hikashop component?](/forum/26-product-category-display/876698-separate-database-for-hikashop-component#200373 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.36  Hi, is it possible to use a separate database for hikashop?  i want to create multiple website that have hikashop and access 1 global database. Only for their hikashop data.  is it possible?  Thank you in advance")*

Hi,

HikaShop has to be on the same database as Joomla since HikaShop is a Joomla extension.

What you can do is use the extension JMS multisites to have one master website with slave websites so that you would effectively have one database for all the websites.
I invite you to contact JMS multisites with your project so that they can tell you what is possible exactly with their product for your needs:
[ www.jms2win.com/index.php](https://www.jms2win.com/index.php)

The following user(s) said Thank You: [veeco](/forum/user/18501-veeco "View veeco's Profile")

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

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

Less More

- Posts: 175
- Thank you received: 0
-
-

11 years 5 months ago -  11 years 5 months ago [\#201200](#201200) by [veeco](/forum/user/18501-veeco "View veeco's Profile")  Replied by *[veeco](/forum/user/18501-veeco "View veeco's Profile")* on topic *[Separate database for hikashop component?](/forum/26-product-category-display/876698-separate-database-for-hikashop-component#201200 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.36  Hi, is it possible to use a separate database for hikashop?  i want to create multiple website that have hikashop and access 1 global database. Only for their hikashop data.  is it possible?  Thank you in advance")*

Hi

i've seen the jms2win and i think it's a bit too much since i only need to synchronize hikashop's product part between 3 database

I want to create a manual csv import for hikashop that import CSV containing product's data to 3 database

Is there any list of hikashop's product table ? i need to know which table i need to synchronize between 3 database

thank you

Last edit: 11 years 5 months ago by [veeco](/forum/user/18501-veeco "View veeco's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzY2OTgtc2VwYXJhdGUtZGF0YWJhc2UtZm9yLWhpa2FzaG9wLWNvbXBvbmVudD90bXBsPW1hcmtkb3du) 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: 14268
-
-

11 years 5 months ago [\#201209](#201209) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Separate database for hikashop component?](/forum/26-product-category-display/876698-separate-database-for-hikashop-component#201209 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.36  Hi, is it possible to use a separate database for hikashop?  i want to create multiple website that have hikashop and access 1 global database. Only for their hikashop data.  is it possible?  Thank you in advance")*

Hi,

Here is the list:
hikashop_product hikashop_price hikashop_related hikashop_variant hikashop_characteristic hikashop_product_category hikashop_category hikashop_file

The following user(s) said Thank You: [veeco](/forum/user/18501-veeco "View veeco's Profile")

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

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

Less More

- Posts: 175
- Thank you received: 0
-
-

11 years 5 months ago -  11 years 5 months ago [\#201486](#201486) by [veeco](/forum/user/18501-veeco "View veeco's Profile")  Replied by *[veeco](/forum/user/18501-veeco "View veeco's Profile")* on topic *[Separate database for hikashop component?](/forum/26-product-category-display/876698-separate-database-for-hikashop-component#201486 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.36  Hi, is it possible to use a separate database for hikashop?  i want to create multiple website that have hikashop and access 1 global database. Only for their hikashop data.  is it possible?  Thank you in advance")*

Hi, Thank you for your answers

Turns out synchronizing isnt very effective

so now i need to create an import that reads csv file and directly update all 3 database

is there any easy API to insert product category and products? [including custom fields]

edit: i have tried - [ www.hikashop.com/forum/4-how-to/3958-how...cts-through-api.html](http://www.hikashop.com/forum/4-how-to/3958-how-to-add-the-products-through-api.html)

the problem i have right now is the price and category doesnt save

[ ![&#91;img](http://i.imgur.com/fCYxJoe.jpg) ](http://i.imgur.com/fCYxJoe.jpg "&#91;img")

my code

[ ![&#91;img](http://i.imgur.com/W5rDkBD.jpg) ](http://i.imgur.com/W5rDkBD.jpg "&#91;img")

backend view [need to modify the cid link because the product isnt displayed anywhere(no category)]

any suggestion?

Last edit: 11 years 5 months ago by [veeco](/forum/user/18501-veeco "View veeco's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzY2OTgtc2VwYXJhdGUtZGF0YWJhc2UtZm9yLWhpa2FzaG9wLWNvbXBvbmVudD90bXBsPW1hcmtkb3du) 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: 14268
-
-

11 years 5 months ago [\#201514](#201514) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Separate database for hikashop component?](/forum/26-product-category-display/876698-separate-database-for-hikashop-component#201514 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.36  Hi, is it possible to use a separate database for hikashop?  i want to create multiple website that have hikashop and access 1 global database. Only for their hikashop data.  is it possible?  Thank you in advance")*

The save function of the class.product API doesn't insert the prices or the categories.
After the call to the save function, you want to call the updateCategories and the updatePrices functions of class.product.
You can see an example of that in the saveForm function of the class.product API: Code:

if($status){ $status = $this-&gt;save($element); }else{ JRequest::setVar( 'fail', $element ); return $status; } if($status){ $this-&gt;updateCategories($element,$status); $this-&gt;updatePrices($element,$status); $this-&gt;updateFiles($element,$status,'files'); $this-&gt;updateFiles($element,$status,'images',$element-&gt;imagesorder); $this-&gt;updateRelated($element,$status,'related'); $this-&gt;updateRelated($element,$status,'options'); $this-&gt;updateCharacteristics($element,$status); $class-&gt;handleTranslations('product',$status,$element); }

The following user(s) said Thank You: [veeco](/forum/user/18501-veeco "View veeco's Profile")

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

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

Less More

- Posts: 175
- Thank you received: 0
-
-

11 years 5 months ago -  11 years 5 months ago [\#201599](#201599) by [veeco](/forum/user/18501-veeco "View veeco's Profile")  Replied by *[veeco](/forum/user/18501-veeco "View veeco's Profile")* on topic *[Separate database for hikashop component?](/forum/26-product-category-display/876698-separate-database-for-hikashop-component#201599 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.36  Hi, is it possible to use a separate database for hikashop?  i want to create multiple website that have hikashop and access 1 global database. Only for their hikashop data.  is it possible?  Thank you in advance")*

Thanks, i managed to get the category and price to work

however,i cant update files.

I want every product to have "product-code".jpg

this is my code
[ ![&#91;img](http://i.imgur.com/Dg56FZd.jpg) ](http://i.imgur.com/Dg56FZd.jpg "&#91;img")

*it's supposed to be updateFiles($product,$product_id,'images');

[ ![&#91;img](http://i.imgur.com/a8Unu90.jpg) ](http://i.imgur.com/a8Unu90.jpg "&#91;img")

another question:
after i set the path of images for the product, where should i copy my images to?
also, is there any documentation on the parameters of updateFIles()? [and other update function that can be used]

Thank you

Last edit: 11 years 5 months ago by [veeco](/forum/user/18501-veeco "View veeco's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzY2OTgtc2VwYXJhdGUtZGF0YWJhc2UtZm9yLWhpa2FzaG9wLWNvbXBvbmVudD90bXBsPW1hcmtkb3du) 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: 14268
-
-

11 years 5 months ago [\#201654](#201654) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Separate database for hikashop component?](/forum/26-product-category-display/876698-separate-database-for-hikashop-component#201654 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.36  Hi, is it possible to use a separate database for hikashop?  i want to create multiple website that have hikashop and access 1 global database. Only for their hikashop data.  is it possible?  Thank you in advance")*

Hi,

The updateFiles function doesn't save the images in the database but update the link between the images and the product.
So you can't use such code.
You would need to do it like that: Code:

$image = new stdClass(); $image-&gt;file_ref_id = $product_id; $image-&gt;file_type = 'product'; $image-&gt;file_path = $code.'.jpg'; $fileClass = hikashop_get('class.file'); $id = $fileClass-&gt;save($image); $product-&gt;images = array($id); $productClass-&gt;updateFiles($product,$product_id,'images');

You can put the images in the path that you specified in the "upload folder" setting of the HikaShop configuration.

There is no documentation for the functions of the class API of HikaShop. We would first need to have clean standard functions in order to produce a documentation. The functions we have in the class API were meant to be used internally only at first and not so that any developer would use them.

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

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

Less More

- Posts: 175
- Thank you received: 0
-
-

11 years 5 months ago -  11 years 5 months ago [\#201816](#201816) by [veeco](/forum/user/18501-veeco "View veeco's Profile")  Replied by *[veeco](/forum/user/18501-veeco "View veeco's Profile")* on topic *[Separate database for hikashop component?](/forum/26-product-category-display/876698-separate-database-for-hikashop-component#201816 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.36  Hi, is it possible to use a separate database for hikashop?  i want to create multiple website that have hikashop and access 1 global database. Only for their hikashop data.  is it possible?  Thank you in advance")*

Hi, thanks

the code worked and both the image in database and the back end shows but only shows as default image

i've tried to copy file in the folders inside media/com_hikashop, and it's still not working [still showing the default image]

any solution for this?

[ ![&#91;img](http://i.imgur.com/XOn2CiV.jpg) ](http://i.imgur.com/XOn2CiV.jpg "&#91;img")

[ ![&#91;img](http://i.imgur.com/xk2Iq21.jpg) ](http://i.imgur.com/xk2Iq21.jpg "&#91;img")

Also, just a suggestion. I think the class hikashop API could be very useful for developer and having a proper documentation about it would help a lot

Thanks

edit: it worked, turns out i need to copy paste the image in the upload folder

[ ![&#91;img](http://i.imgur.com/ybwXUiR.jpg) ](http://i.imgur.com/ybwXUiR.jpg "&#91;img")

Last edit: 11 years 5 months ago by [veeco](/forum/user/18501-veeco "View veeco's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtL3Byb2R1Y3QtY2F0ZWdvcnktZGlzcGxheS84NzY2OTgtc2VwYXJhdGUtZGF0YWJhc2UtZm9yLWhpa2FzaG9wLWNvbXBvbmVudD90bXBsPW1hcmtkb3du) 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.261 seconds

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

[](#top)
