Post by rossradiation » Wed Jul 13, 2011 8:48 pm

Hello
I have a question I am hoping somebody can help me with.

We are currently running two stores on the one installation.

A clothing store and a record store.

This works very well and we have started sharing products between the stores.

This also works well.

The next step we would like to take is to be able to link Store A and Store B, so that our customers can move/switch between the two stores - maintain their current Shopping Cart (with products from both stores) and do one check-out/payment if desired.

Is that possible?

Any help or ideas anybody has on how to make this possible would be appreciated

Regards
Ross

Newbie

Posts

Joined
Mon May 24, 2010 8:33 pm

Post by mberlant » Fri Jul 15, 2011 6:38 am

It seems that multi-store would work well for you.

You would end up with one store with two front ends and one back end. Customers visiting either storefront would have access to that storefront's product complement. You would decide which products are available in either or both store(s).

The one thing you would lose is the ability to keep automated shipping and payment accounts separate for each storefront, since they would now be parts of only one store. Unless I am mistaken (I hope.), you would only be able to collect money via one PayPal account, for example, and only be able to charge shipping to one UPS account.

The one thing I cannot advise you on is how to automate the process of migrating the second store's client and product information into the first store's. Perhaps another member can pick up the idea from here.

Please use proper English at all times, so that all members may understand you.


User avatar
Active Member

Posts

Joined
Sun Mar 13, 2011 8:33 pm

Post by rossradiation » Fri Jul 15, 2011 7:14 am

Thank you for your response.

The setup you have described in your first 2 paragraphs is working well for us already.

Only one PayPal account would be required. We have a distinct look for the clothing store and a completely different vibe for our music store.

The main thing we are hoping to do is allow customers to browse both stores (both hosted under the same domain - but one is a sub-domain) and purchase products from the two stores in one shopping basket, one order, one payment, and pay one shipping cost.

So ideally a customer might buy some shoes in one store, jump over to the other store, buy some DVD's and checkout/payment once with products from both stores.

cheers
Ross

Newbie

Posts

Joined
Mon May 24, 2010 8:33 pm

Post by jlr1001 » Sat Nov 05, 2011 3:52 am

@rossradiation Hey, did you ever solve this design "issue"? We're trying to do exactly what you're talking about, but I can't see a way to do this short of having all cart links go to one domain, but if that domain was for your default store, then entering the cart would mean that customers would have to browse backwards to see the product catalog they had been shopping.

@mberlant It sounds as though what you described is exactly what Ross had been doing... or were you talking about something distinct form the muilt-store feature currently available with Open Cart?

Newbie

Posts

Joined
Sat Aug 20, 2011 10:16 am

Post by rossradiation » Sat Nov 05, 2011 6:18 am

Hi jlr1001
I never found a solution and in a discussion with the store owner the idea was discarded. We decided to have one "mega-store" combining the two product ranges rather than have two separate sites

Newbie

Posts

Joined
Mon May 24, 2010 8:33 pm

Post by cwswebdesign » Fri Mar 23, 2012 7:25 am

Here's what I was able to find out:

Without some serious "hacking" and possible security compromise, you won't be able to make basket from store 1 and basket from store 2 share over 2 different domain names.

However, in order to make 2 different subdomains share one cart, you need to delete the existing code and add the following to /system/library/session.php

Code: Select all

<?php
class Session {
	public $data = array();
			
  	public function __construct() {		
		if (!session_id()) {
			ini_set('session.use_cookies', 'On');
			ini_set('session.use_trans_sid', 'Off');
			ini_set('session.cookie_domain', '.yourdomain.com');
			
			session_set_cookie_params(0, '/');
			session_start();
		}
	
		$this->data =& $_SESSION;
	}
}
?>
If for example, you want to run 2 different stores with different subdomains, making suba.yourdomain1.com and yourdomain1.com share a basket and subb.yourdomain2.com and yourdomain2.com share a separate basket, you can use the following code:

Code: Select all

<?php
class Session {
	public $data = array();
			
  	public function __construct() {		
		if (!session_id()) {
			ini_set('session.use_cookies', 'On');
			ini_set('session.use_trans_sid', 'Off');
			ini_set('session.cookie_domain', '.yourdomain1.com;.yourdomain2.com');
			
			session_set_cookie_params(0, '/');
			session_start();
		}
	
		$this->data =& $_SESSION;
	}
}
?>

This would allow you to run something like:
clearance.yourdomain1.com and yourdomain1.com
usedproduct.yourdomain2.com and yourdomain2.com

all from one install and one admin.


This was all done in v1.5.2.1

I believe that if your current session.php looks like below, you'll be able to swap out for the code I've provided up above. I haven't worked with any versions other than this, so I'm not sure what that original session.php file looks like!

Code: Select all

<?php
class Session {
	public $data = array();
			
  	public function __construct() {		
		if (!session_id()) {
			ini_set('session.use_cookies', 'On');
			ini_set('session.use_trans_sid', 'Off');
			
			session_set_cookie_params(0, '/');
			session_start();
		}
	
		$this->data =& $_SESSION;
	}
}
?>

This account is inactive. Look for us under the name 'EvolveWebHosting' and contact us under that username.

Thanks!


User avatar
Active Member

Posts

Joined
Sun Dec 11, 2011 12:26 am
Location - USA

Post by Sarah_Summers » Mon Mar 26, 2012 9:03 am

massive props for this CWS

Newbie

Posts

Joined
Sat Mar 24, 2012 7:55 pm

Post by cwswebdesign » Mon Mar 26, 2012 9:43 am

Sarah_Summers wrote:massive props for this CWS
You're very welcome and I'm glad I was able to help out!

This account is inactive. Look for us under the name 'EvolveWebHosting' and contact us under that username.

Thanks!


User avatar
Active Member

Posts

Joined
Sun Dec 11, 2011 12:26 am
Location - USA

Post by mediaindustries » Sun Nov 11, 2012 9:54 pm

Hi there,

I'm currently working on an opencart multi store setup. Everything works fine but just like the topic starter I want the shopping cart to be shared between the different stores.

Current situation:

http://www.frenqies.nl
This is where the opencart installation is at. I'm running the latest opencart 1.5.4.1.

http://www.capopjehoofd.nl
I added a domain pointer at the frenqies.nl directadmin so capopjehoofd.nl uses the frenqies.nl installation.

What I tried was this:

Code: Select all

    <?php
    class Session {
       public $data = array();
             
         public function __construct() {      
          if (!session_id()) {
             ini_set('session.use_cookies', 'On');
             ini_set('session.use_trans_sid', 'Off');
             ini_set('session.cookie_domain', '.frenqies.nl;.capopjehoofd.nl');
             
             session_set_cookie_params(0, '/');
             session_start();
          }
       
          $this->data =& $_SESSION;
       }
    }
    ?>
But without result.

When I add this product to my cart: http://www.frenqies.nl/caps/testcap
And I visit http://www.capopjehoofd.nl the shopping cart is empty.

I also found this solution: http://stackoverflow.com/questions/1206 ... subdomains

I followed exactly the instructions but also without any result.

Am I doing something wrong?

Thanks in advance!

User avatar
New member

Posts

Joined
Mon Mar 05, 2012 10:36 pm
Location - The Netherlands

Post by cwswebdesign » Mon Nov 12, 2012 7:08 am

mediaindustries wrote:Hi there,

I'm currently working on an opencart multi store setup. Everything works fine but just like the topic starter I want the shopping cart to be shared between the different stores.

Current situation:

http://www.frenqies.nl
This is where the opencart installation is at. I'm running the latest opencart 1.5.4.1.

http://www.capopjehoofd.nl
I added a domain pointer at the frenqies.nl directadmin so capopjehoofd.nl uses the frenqies.nl installation.

What I tried was this:

Code: Select all

    <?php
    class Session {
       public $data = array();
             
         public function __construct() {      
          if (!session_id()) {
             ini_set('session.use_cookies', 'On');
             ini_set('session.use_trans_sid', 'Off');
             ini_set('session.cookie_domain', '.frenqies.nl;.capopjehoofd.nl');
             
             session_set_cookie_params(0, '/');
             session_start();
          }
       
          $this->data =& $_SESSION;
       }
    }
    ?>
But without result.

When I add this product to my cart: http://www.frenqies.nl/caps/testcap
And I visit http://www.capopjehoofd.nl the shopping cart is empty.

I also found this solution: http://stackoverflow.com/questions/1206 ... subdomains

I followed exactly the instructions but also without any result.

Am I doing something wrong?

Thanks in advance!
You can't do it with 2 separate domain names. It only works with subdomains sharing the same main domain name.

Dl

This account is inactive. Look for us under the name 'EvolveWebHosting' and contact us under that username.

Thanks!


User avatar
Active Member

Posts

Joined
Sun Dec 11, 2011 12:26 am
Location - USA

Post by mediaindustries » Mon Nov 12, 2012 6:09 pm

Hi CWS. Thanks for your reply.

So it's impossible to share a shopping cart with opencart multistore between different domain names?

User avatar
New member

Posts

Joined
Mon Mar 05, 2012 10:36 pm
Location - The Netherlands

Post by cwswebdesign » Mon Nov 12, 2012 9:45 pm

mediaindustries wrote:Hi CWS. Thanks for your reply.

So it's impossible to share a shopping cart with opencart multistore between different domain names?
As far as I'm aware, it's very hard to do, if at all due to security issues. I posted the info for as far as I got with it all. I do know it works on the same domain using subdomains as I'm doing that for a client of mine right now.

DL

This account is inactive. Look for us under the name 'EvolveWebHosting' and contact us under that username.

Thanks!


User avatar
Active Member

Posts

Joined
Sun Dec 11, 2011 12:26 am
Location - USA

Post by mediaindustries » Mon Nov 12, 2012 9:52 pm

Do you think this plugin will do the trick?

http://www.opencart.com/index.php?route ... d%20basket

In the documentation he's talking about different index.php's so I guess it's for multiple installations. What do you think?

User avatar
New member

Posts

Joined
Mon Mar 05, 2012 10:36 pm
Location - The Netherlands

Post by cwswebdesign » Tue Nov 13, 2012 12:00 am

mediaindustries wrote:Do you think this plugin will do the trick?

http://www.opencart.com/index.php?route ... d%20basket

In the documentation he's talking about different index.php's so I guess it's for multiple installations. What do you think?

I've never seen it, but for $15 it's worth a try. Are you using cPanel or something else with your hosting account? Check with your hosting provider, but cPanel generally only allows for 1 SSL certificate to be installed on each cPanel account. Maybe that's not the case for you.

DL

This account is inactive. Look for us under the name 'EvolveWebHosting' and contact us under that username.

Thanks!


User avatar
Active Member

Posts

Joined
Sun Dec 11, 2011 12:26 am
Location - USA

Post by mediaindustries » Tue Nov 13, 2012 3:37 am

The installation is running on my own VPS with DirectAdmin. Currently I don't have an SSL certificate, is SSL necessary for sharing the basket between different domains?

User avatar
New member

Posts

Joined
Mon Mar 05, 2012 10:36 pm
Location - The Netherlands

Post by cwswebdesign » Tue Nov 13, 2012 5:33 am

mediaindustries wrote:The installation is running on my own VPS with DirectAdmin. Currently I don't have an SSL certificate, is SSL necessary for sharing the basket between different domains?

It's not necessary to share the baskets but it is depending on the payment gateway that you're going to use.

DL

This account is inactive. Look for us under the name 'EvolveWebHosting' and contact us under that username.

Thanks!


User avatar
Active Member

Posts

Joined
Sun Dec 11, 2011 12:26 am
Location - USA

Post by skookumrob » Tue Nov 13, 2012 2:27 pm

We have done what you are thinking about by placing navigation banners across the top of the page. We currently run 4 separate stores (that can mix & match) with the 1 install and shared shopping cart. Each store has a different colour theme as well.

www.onlinesupply.ca

Rob M
http://www.onlinesupply.ca 1.5.6.1 (an upgrade from 1.5.0)
http://www.webfilter.onlinesupply.ca 1.5.4


User avatar
New member

Posts

Joined
Thu Sep 01, 2011 2:52 pm

Post by mediaindustries » Tue Nov 13, 2012 3:30 pm

Thanks for your reply. Works fine but you're using subdomains. I would like to share the cart between main domains.

User avatar
New member

Posts

Joined
Mon Mar 05, 2012 10:36 pm
Location - The Netherlands

Post by Da_Hobit » Sat Feb 02, 2013 6:49 pm

@ cwswebdesign

thnx for sharing !

i configured with my shops and the 'shared basket' works fine !
except the only problem i have ( when config shared basket ) is that i can't login in my admin console
i try to log in in my admin but the only thing i get is a blank screen

i disable the shared basket mod and the admin login works

do you have any idea where i need to look / what i need to mod ?
could it be something to do with the 'admin token' ?

thnx !

http://www.carproducts.be


New member

Posts

Joined
Tue Jul 10, 2012 8:01 pm
Who is online

Users browsing this forum: Majestic-12 [Bot] and 77 guests