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

#   Synchronize cart with two domains on same server

##

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

Less More

- Posts: 19
- Thank you received: 2
-
-

11 years 7 months ago [\#197181](#197181) by [vlanciu](/forum/user/36395-vlanciu "View vlanciu's Profile")  *[Synchronize cart with two domains on same server](/forum/35-orders-management/876148-synchronize-cart-with-two-domains-on-same-server#197181 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4  Hello,  I have setup Joomla Hikashop website which has 2 domains. - First is designed for genral iinformation vzimageoptionz.com - Second is used for shop-menu access dermaquestskincare.com I have setup 2 carts one which is visible on all pages (top bar), also I use Best seller Hikashop module on vzimageoptionz.com pages. If I add an item on vzimageoptionz.com part and after gor to dermaquestskincare.com the items will not be visible (reset back to 0), If go back to vzimageoptionz.com they will be vizible again. I wonder to know if there any configuration to do this sync? Repeate both domain use same server same Hikashop. Thank you in advance.")* was created by *[vlanciu](/forum/user/36395-vlanciu "View vlanciu's Profile")*

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4

Hello,

I have setup Joomla Hikashop website which has 2 domains.
- First is designed for genral iinformation vzimageoptionz.com
- Second is used for shop-menu access dermaquestskincare.com
I have setup 2 carts one which is visible on all pages (top bar), also I use Best seller Hikashop module on vzimageoptionz.com pages.
If I add an item on vzimageoptionz.com part and after gor to dermaquestskincare.com the items will not be visible (reset back to 0), If go back to vzimageoptionz.com they will be vizible again.
I wonder to know if there any configuration to do this sync?
Repeate both domain use same server same Hikashop.
Thank you in advance.

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

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

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

11 years 7 months ago [\#197210](#197210) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Synchronize cart with two domains on same server](/forum/35-orders-management/876148-synchronize-cart-with-two-domains-on-same-server#197210 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4  Hello,  I have setup Joomla Hikashop website which has 2 domains. - First is designed for genral iinformation vzimageoptionz.com - Second is used for shop-menu access dermaquestskincare.com I have setup 2 carts one which is visible on all pages (top bar), also I use Best seller Hikashop module on vzimageoptionz.com pages. If I add an item on vzimageoptionz.com part and after gor to dermaquestskincare.com the items will not be visible (reset back to 0), If go back to vzimageoptionz.com they will be vizible again. I wonder to know if there any configuration to do this sync? Repeate both domain use same server same Hikashop. Thank you in advance.")*

Hi,

There is no options for that, this will require custom code, potentially a plugin which will create/update the cart of the other website when the cart of one site is updated.

This plugin must be based on the function "onBeforeCartUpdate()" or "onAfterCartUpdate()" and have to call the cart class of the other website to add the product in the other cart too. The plugin must be installed on both websites, and both websites will need to have the same products with the same ids (even if not displayed in frontend).

So it require good PHP knowledges.

Here is the developer documentation:
[ www.hikashop.com/support/support/documen...r-documentation.html](http://www.hikashop.com/support/support/documentation/62-hikashop-developer-documentation.html)

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

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

Less More

- Posts: 19
- Thank you received: 2
-
-

11 years 7 months ago [\#197250](#197250) by [vlanciu](/forum/user/36395-vlanciu "View vlanciu's Profile")  Replied by *[vlanciu](/forum/user/36395-vlanciu "View vlanciu's Profile")* on topic *[Synchronize cart with two domains on same server](/forum/35-orders-management/876148-synchronize-cart-with-two-domains-on-same-server#197250 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4  Hello,  I have setup Joomla Hikashop website which has 2 domains. - First is designed for genral iinformation vzimageoptionz.com - Second is used for shop-menu access dermaquestskincare.com I have setup 2 carts one which is visible on all pages (top bar), also I use Best seller Hikashop module on vzimageoptionz.com pages. If I add an item on vzimageoptionz.com part and after gor to dermaquestskincare.com the items will not be visible (reset back to 0), If go back to vzimageoptionz.com they will be vizible again. I wonder to know if there any configuration to do this sync? Repeate both domain use same server same Hikashop. Thank you in advance.")*

Hi Xavier,

thank you for your response.
Can't I do it even I have this 2 domains on same hosting, same hikashop ?

Br.

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

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

Less More

- Posts: 19
- Thank you received: 2
-
-

11 years 7 months ago [\#197278](#197278) by [vlanciu](/forum/user/36395-vlanciu "View vlanciu's Profile")  Replied by *[vlanciu](/forum/user/36395-vlanciu "View vlanciu's Profile")* on topic *[Synchronize cart with two domains on same server](/forum/35-orders-management/876148-synchronize-cart-with-two-domains-on-same-server#197278 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4  Hello,  I have setup Joomla Hikashop website which has 2 domains. - First is designed for genral iinformation vzimageoptionz.com - Second is used for shop-menu access dermaquestskincare.com I have setup 2 carts one which is visible on all pages (top bar), also I use Best seller Hikashop module on vzimageoptionz.com pages. If I add an item on vzimageoptionz.com part and after gor to dermaquestskincare.com the items will not be visible (reset back to 0), If go back to vzimageoptionz.com they will be vizible again. I wonder to know if there any configuration to do this sync? Repeate both domain use same server same Hikashop. Thank you in advance.")*

Hello again,
I found a work around to solve this problem.
I found that there is a cookie with name "cd1ac7c17388496dd92390b8e1351a5d" , so when I redirect from one domain to another I send its value in request parameter:
$domain = "mydomain.com";
if(isset($_COOKIE)){
$url = $domain . $uri . "?CID=".$_COOKIE;
}
else{
$url = $domain . $uri;
}
header("Location: http://$url");

On the another side (mydomain2.com) I set this request value in cookie

$config =&amp; JFactory::getConfig();
$config-&gt;set( 'sitename', 'DermaQuest Skin Care' );
if(isset($_GET)){
setcookie("cd1ac7c17388496dd92390b8e1351a5d", $_GET, time() + 3600);
}

It works for me.
I wonder just to be sure that what I'm doing is ok and will not have problems in future, Is this cookie name something constant?

Best regards,
Victoria.

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26400
- Thank you received: 4079
-
- [](http://obsi.dev)
-

11 years 7 months ago -  11 years 7 months ago [\#197264](#197264) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Synchronize cart with two domains on same server](/forum/35-orders-management/876148-synchronize-cart-with-two-domains-on-same-server#197264 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4  Hello,  I have setup Joomla Hikashop website which has 2 domains. - First is designed for genral iinformation vzimageoptionz.com - Second is used for shop-menu access dermaquestskincare.com I have setup 2 carts one which is visible on all pages (top bar), also I use Best seller Hikashop module on vzimageoptionz.com pages. If I add an item on vzimageoptionz.com part and after gor to dermaquestskincare.com the items will not be visible (reset back to 0), If go back to vzimageoptionz.com they will be vizible again. I wonder to know if there any configuration to do this sync? Repeate both domain use same server same Hikashop. Thank you in advance.")*

Hi,

If you're using the same server, with the same Joomla/HikaShop (so the same database), you will need to have a shared session.
So the users will have the same session in the two domains ; thanks to that, they will keep their cart (their login, etc) in the two domains.

I don't see that your solution will work. This is session cookie and it will changed its key for different users as far as I know. Try with different browsers, or with the private mode of your browser.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Last edit: 11 years 7 months ago by [nicolas](/forum/user/63-nicolas "View nicolas's Profile").

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

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