not possible to add products to the basket

Questions around the TYPO3 integration and plugins
Forum rules
Always add your TYPO3, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
crazyforester
Posts: 60
Joined: 18 Jan 2016, 10:29

not possible to add products to the basket

Post by crazyforester » 24 Feb 2023, 10:16

Hello,
it is very strange problem and some help or hints are appreciated.
I have transferred TYPO3 10.4.34 and Aimeos 21.10.7 from subdomain to the original domain place and
now it is not possible to add products to the basket.
I have added the product (first "Add to the basket") , then the product is visible in the appearing window
then second step "Enter address", but the product is not in the basket anymore. It is empty.
What could be the reason of the problem?

User avatar
aimeos
Administrator
Posts: 7866
Joined: 01 Jan 1970, 00:00

Re: not possible to add products to the basket

Post by aimeos » 26 Feb 2023, 09:46

Looks like the session is lost because the session cookie is only for the sub-domain but it not sent the the main domain by the browser.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

crazyforester
Posts: 60
Joined: 18 Jan 2016, 10:29

Re: not possible to add products to the basket

Post by crazyforester » 26 Feb 2023, 18:38

thank you for your reply, but what is the best solution in this case to solve the problem

User avatar
aimeos
Administrator
Posts: 7866
Joined: 01 Jan 1970, 00:00

Re: not possible to add products to the basket

Post by aimeos » 01 Mar 2023, 07:15

First, check the browser console and look at the content of the cookie and it's meta data. The cookie meta data should be something like "expires=Thu, 02-Mar-2023 07:14:24 GMT; path=/; secure; HttpOnly".
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

crazyforester
Posts: 60
Joined: 18 Jan 2016, 10:29

Re: not possible to add products to the basket

Post by crazyforester » 01 Mar 2023, 11:57

here is the info
path in my case is /public/
not path=/;

expire: Session and secure; HttpOnly

maybe the problem is htaccess file
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule (.*) https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
RewriteCond %{HTTP_HOST} ^mydomain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.mydomain\.com$
RewriteCond %{REQUEST_URI} !^/public/
RewriteRule (.*) /public/$1

it is set to open the domain from /public/ folder

also, from php info
session.cookie_path /

What would you recommend in this case

User avatar
aimeos
Administrator
Posts: 7866
Joined: 01 Jan 1970, 00:00

Re: not possible to add products to the basket

Post by aimeos » 02 Mar 2023, 08:49

At least that ./public/ is your document root so you doesn't expose the directory and files besides the ./public/ folder to attackers!

The cookie settings seem to be correct if the complete TYPO3 and Aimeos URLs are at the same domain.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply