Post by MattGSX » Thu Jun 10, 2010 5:28 am

I PM'd River, but I'm having some difficulty here.

I want to achieve a similar solution with all checkout activity going through a single checkout, as I don't currently have a wildcard SSL. I've tried doing the code change the user posted, but my session isn't actually carrying over between the two stores, so I though I have the products in the cart on one store, it's still coming up empty on the other store and will not allow checkout.

New member

Posts

Joined
Thu May 27, 2010 6:18 am
Location - Oshkosh, WI US

Post by djcraig49 » Fri Jul 09, 2010 8:20 pm

I too require my multi stores to go through the same checkout if this is possible.

Many Thanks
Craig

New member

Posts

Joined
Fri Nov 06, 2009 1:49 am

Post by jty » Fri Aug 13, 2010 6:20 am

I three require my multi stores to go through the same checkout if this is possible.

jty
Active Member

Posts

Joined
Sat Aug 30, 2008 8:19 am

Post by sm1cool » Fri Nov 05, 2010 9:29 am

the multi store works really well. the only problem i have is that when the customer types in mystore2.com rather than www.mystore2.com they get sent to www.mystore1.com cos the domain pointers in direct admin adds www. onto the start of the domain address automatically in the cpanel. i cant see a way around it.

Newbie

Posts

Joined
Fri Nov 05, 2010 9:18 am

Post by barakka » Fri Jan 21, 2011 7:42 pm

Anyone know if this is possible...?

I have several domains;
domain1.com
domain2.com
domain3.com

All can be pointed to the same installation and display as individual shops with their own themes, but the shops have related products and my customer wants them to have a shared basket.

I know this can be done with subdomains (e.g. egg.domain1, ham.domain1.com, cheese.domain1.com) and tweaking the session.php and/or startup.php cookie declaration to include .domain1.com from earlier in this post.

But is there any way to accomplish similar using individual domains sharing the same session/cookie ? Or are we bordering on hacking in trying to achieve this ?

Is is possible to declare the session/cookie when lading on the site and then just GET the session when routing to the chosen store ?

Any help greatly appreciated...

“Reeling and Writhing, of course, to begin with, and then the different branches of arithmetic -- Ambition, Distraction, Uglification, and Derision." - The Mock Turtle


Newbie

Posts

Joined
Fri Jan 21, 2011 7:34 pm
Location - UK

Post by mackandpear » Tue Jan 25, 2011 10:14 pm

Hi
When a search is run from my second store (running as a sub domain) all the links on the returned page are to my main domain. Is this normal or have I missed something?
http://epos.mackandpear.com

Newbie

Posts

Joined
Tue Jan 25, 2011 10:07 pm

Post by CD001 » Thu Jan 27, 2011 12:22 am

I'm not convinced that "multi-store" is feature complete. For instance, unless I'm missing something, quoting from the feature list on the OpenCart website "You can set different prices for each store you have setup." -- no you can't. You can specify a default price for the product and assign different currencies and the system automatically calculates the different currency prices (based on data in the `currency` table), this is not the same as setting different prices on a per-store basis.

For instance a £9.00 product comes out at €10.46 - you can't change this to a more marketing-friendly €10.50 for this product.

Looking directly at the database it appears this isn't an in-built feature - I'd expect to find various pricelist tables or some kind of matrix table like:

`product_price_to_currency_to_store`
(`store_id`, `currency_id`, `product_id`, `price`)

Our European office is pushing for a new website that has to be quick and easy to use (so that's Magento out) with a CMS that allows several stores to be maintained across several countries in several languages (Locales: de_DE, nl_NL, fr_BE, nl_BE, fr_FR and so on) with the ability to specify things like product prices and payment gateways on a per-store basis (we charge slightly different prices in different countries to cover the amount we subsidise our shipping costs by).

I was hoping OpenCart might help speed this process up somewhat, that I might be able to roll it out without too many major modifications ... am I wrong? (otherwise it's back to bespoke - I've looked at several systems and the only ones that come close are OpenCart and Magento).

Newbie

Posts

Joined
Wed Jan 26, 2011 11:44 pm

Post by CD001 » Thu Jan 27, 2011 12:27 am

mackandpear wrote:Hi
When a search is run from my second store (running as a sub domain) all the links on the returned page are to my main domain. Is this normal or have I missed something?
http://epos.mackandpear.com
Make sure you've added a trailing slash ( / ) in the Store URL setting for your second store, for instance "http://epos.mackandpear.com/" otherwise this happens it seems.

Newbie

Posts

Joined
Wed Jan 26, 2011 11:44 pm

Post by marc_cole » Thu Jan 27, 2011 10:39 am

Has anyone found a way to have a different shipping calc for each store?

OpenCart v1.4.9.4
VQMod | Categories Home | Cleaner By Default - 2 Column | Speak Good English


Active Member

Posts

Joined
Tue Dec 14, 2010 11:26 am
Location - Seattle, WA

Post by barakka » Tue Feb 08, 2011 10:34 pm

barakka wrote: I know this can be done with subdomains (e.g. egg.domain1, ham.domain1.com, cheese.domain1.com) and tweaking the session.php and/or startup.php cookie declaration to include .domain1.com from earlier in this post.
Or maybe it can't..... ?

Can someone clarify how to do this, I need;
monkey.domain.com
giraffe.domain.com

http://www.domain.com is the current shop and is pointed somewhere else (other hosting), once this is all working and loaded up with products it will replace the current setup.

I have purchased hosting for domain.com and installed OpenCart in the root web folder, then setup two shops monkey and giraffe, when I go to the domains above I get two shop fronts with the relevant products in each.

So how do I get them to share a cart/basket, i've set '.domain.com' in the session start in both system/phpstartup.php and system/library/session.php but it doesn't work.

I've searched all over but can't find anything saying how to do this ?

“Reeling and Writhing, of course, to begin with, and then the different branches of arithmetic -- Ambition, Distraction, Uglification, and Derision." - The Mock Turtle


Newbie

Posts

Joined
Fri Jan 21, 2011 7:34 pm
Location - UK

Post by RogerD9 » Sat Jul 23, 2011 7:19 pm

screenager8 wrote:This is what i do, i do not it's wrong or not.

http://bit.ly/opencart_multistore

I followed your instructions. The main page opens up with the proper subdomain. However when I go to a product or page that is supposed to be in the subdomain only the URL changes to my main domain and does not display the product or page that I wanted.

Does anyone know how to get in touch with the developers of OpenCart? :(

Newbie

Posts

Joined
Sat Jul 23, 2011 5:49 pm
Location - Kingston, Ontario, Canada

Post by vaver » Sat Oct 08, 2011 7:25 pm

Hi,
I think the trick to keep cart content and session data is session time, because both session.php and startup.php sets time = 0. You should change it like this:

before:
session_set_cookie_params(0, '/');
after:
session_set_cookie_params(3600, '/', '.mydomain.com');

This will change session time to one hour (3600sec), works only at the same browser, but for me this is pretty good.
I don't know anything about safety of this soultion so if anybody have please advice

Newbie

Posts

Joined
Sat Oct 08, 2011 7:18 pm

Post by marc_cole » Tue Oct 18, 2011 5:59 am

Does version 1.5.x now allow us to have a different shipping calc for each store?

Active Member

Posts

Joined
Tue Dec 14, 2010 11:26 am
Location - Seattle, WA

Post by Angelheart29 » Thu Jan 26, 2012 12:00 am

Hello,

I have a problem with multi-store. Account client, cart and checkout are separate.

Configuration :

Default : http://www.mydomain.com/dossier/ (not using, only for opencart)
Shop 1 : http://www.shop1.mydomain.com
Shop 2 : http://www.shop2.mydomain.com
Shop 3 : http://www.shop3.mydomain.com

I use this code : session_set_cookie_params(3600, '/', '.mydomain.com');
or this :
session.cookie_domain = ".mydomain" (in php.ini)
or that :
ini_set( "session.cookie_domain", ".mydomain.com" );

But nothing happens. Orders appears in all Shops. Cart (each shop keeps his cart in memory), Log in/Account : Not. Also, a visitor can log in 3 shops separatly. But, the account isn't keep in memory (we have to log in three times).

Any Idea ?

Thx

Newbie

Posts

Joined
Fri Jan 06, 2012 5:12 am

Post by Angelheart29 » Wed Feb 01, 2012 12:02 am

Up !

Which files can separate or join cart, account and log for multi-store ?

Newbie

Posts

Joined
Fri Jan 06, 2012 5:12 am

Post by Angelheart29 » Tue Feb 07, 2012 5:26 am

I test some ideas like this :

Code: Select all

    $rootDomain = '.example.com';

    session_set_cookie_params(
        $currentCookieParams["lifetime"],
        $currentCookieParams["path"],
        $rootDomain,
        $currentCookieParams["secure"],
        $currentCookieParams["httponly"]
    );

    session_name('mysessionname');
    session_start();

    setcookie($cookieName, $cookieValue, time() + 3600, '/', $rootDomain);
    ?>

Or that :

Code: Select all

ini_set( "session.cookie_domain", "http://www.domaine.com" );  ); 
But, no effect.

The problem is weird... The customer has to authenticate on three stores. But, when he makes it, the cart is shared. A product buying in store 1 is kept in memory when customer authenticate on stores 2 and 3. In Other Hand, if we want to continue purchases after the authentification, products are not added on three shops (only the one who you buy the product). It is necessary to disconnect and to re-connect to have the new products in the cart. Any Idea ?

Newbie

Posts

Joined
Fri Jan 06, 2012 5:12 am

Post by cwswebdesign » Fri Mar 23, 2012 7:28 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 yenidem » Tue Dec 18, 2012 10:52 pm

I have problem like this issue; I have SSL certificate for domain1.com, but I want to use domain2.com. The default domain name will be domain2.com

customers can add the items to cart, when the click to checkout page there will be nothing because the items do not shows in cart at domain1.com.

I configure config as follows:
http server: http://domain2.com
https server: https://domain1.com

please advice, how can I fix this issue?

(both of domains focused to same directories.)

Newbie

Posts

Joined
Tue Dec 18, 2012 10:45 pm

Post by cwswebdesign » Thu Dec 20, 2012 1:32 pm

yenidem wrote:I have problem like this issue; I have SSL certificate for domain1.com, but I want to use domain2.com. The default domain name will be domain2.com

customers can add the items to cart, when the click to checkout page there will be nothing because the items do not shows in cart at domain1.com.

I configure config as follows:
http server: http://domain2.com
https server: https://domain1.com

please advice, how can I fix this issue?

(both of domains focused to same directories.)
Are you hosting on a windows or Linux server? If you're using cPanel, you can only install an SSL certIficate for one domain. Others will allow you too use a SANS multi domain certificate.

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 cwswebdesign » Tue May 07, 2013 4:52 am

I wanted to come back and update about this. I just tried to implement it on 1.5.3.1 and it won't work. I'm again at a loss as I'd like to do this for a site I'm working on now. Does anyone have a solution?

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
Who is online

Users browsing this forum: No registered users and 47 guests