AbanteCart Community
Shopping Cart Operations => Support => General Support => Topic started by: Ollie on November 08, 2016, 08:13:56 AM
-
For some reason, credit card data is not passing to my language subdomains (which are hosted by a company other than my web host). The company explained that I need to set cookie domain so the data transfers from mydomain.com to mysubdomain.com. My coder says I cannot simply change the url to a relative one because it is generated with built-in function: https://github.com/abantecart/abantecart-src/blob/master/public_html/extensions/default_authorizenet_aim/storefront/view/default/template/responses/default_authorizenet_aim.tpl#L88 According to him, this function generates the URL based on server configuration: https://github.com/abantecart/abantecart-src/blob/master/public_html/core/engine/html.php#L179
I posted a question the other day in this forum and one of the core developers suggested replacing "null" on line 364 with my domain name. I tried this, but it didn't work: https://github.com/abantecart/abantecart-src/blob/master/public_html/core/engine/language.php#L364
How can I set cookie domain in AbanteCart? Any help will be greatly appreciated.
-
Why did you deleted your original topic?
i already suggested solution before.
You should to set domain that cover all your subdomains into your cookies.
For details please read about function "setcookie" and it's "domain" parameter http://php.net/manual/en/function.setcookie.php
You should to replace "null" in parameters with your main domain in this function call inside your AbanteCart,
for ex. in file core/engine/language.php
setcookie('language',
$lang_code,
time() + 60 * 60 * 24 * 30,
dirname($request->server['PHP_SELF']),
null,
(defined('HTTPS') && HTTPS)
);
and other places.
Then DELETE ALL COOKIES for YOUR DOMAIN and subdomains in browser and check.
-
Why did you deleted your original topic?
i already suggested solution before.
As I explained in this post, the solution you suggested earlier did not work for me. I waited for a solution for several days, nobody responded; that's why I deleted the original post. Are you proposing the same solution or is this something new? I'm not clear what you mean by "other places". Can you be more specific? Thank you.
-
.... I'm not clear what you mean by "other places". Can you be more specific? Thank you.
yes. sure.
Please check this https://github.com/abantecart/abantecart-src/search?utf8=%E2%9C%93&q=setcookie