Page 1 of 2
Add to cart not working correctly
Posted: Tue Jun 28, 2022 2:42 pm
by Needleguy
When I try to add a product to cart the screen changes and I see "Whats in my cart" Your shopping cart is empty. Any idea what is causing this? Thank you.
Re: Add to cart not working correctly
Posted: Tue Jun 28, 2022 2:47 pm
by Kofod95
I seem to remember at least two others who have posted about that problem - have you tried searching a bit here, as those two, as I remember, had different causes for their problem?
//Daniel
Re: Add to cart not working correctly
Posted: Tue Jun 28, 2022 3:33 pm
by Needleguy
Yes I spent the better part of an hour and couldn't find anything. I even Googled but didn't find much.
Re: Add to cart not working correctly
Posted: Tue Jun 28, 2022 4:13 pm
by burt
The usual place to start investigating is a badly configured configure.php file [/includes/configure.php]
A good one should look something like:
Code: Select all
<?php
error_reporting(E_ALL);
const HTTP_SERVER = 'https://your-domain-name.com';
const COOKIE_OPTIONS = [
'lifetime' => 0,
'domain' => 'your-domain-name.com',
'path' => '/my-shop-directory/',
'samesite' => 'Lax',
'secure' => true,
];
const DIR_WS_CATALOG = '/my-shop-directory/';
date_default_timezone_set('America/New_York');
// If you are asked to provide configure.php details,
// please remove the data below before sharing.
const DIR_FS_CATALOG = '/home/xxx/public_html/my-shop-directory/';
const DB_SERVER = 'a';
const DB_SERVER_USERNAME = 'b';
const DB_SERVER_PASSWORD = 'c';
const DB_DATABASE = 'd';
Note that "my-shop-directory" could be the root of your hosting, in this case it would therefore read:
const DIR_WS_CATALOG = '/';
Re: Add to cart not working correctly
Posted: Tue Jun 28, 2022 4:35 pm
by Needleguy
I checked the configure.php and it looks correct. I did install Ultimate URL, USPS Module and Back Button, If I can figure out how to turn these off maybe one of them is the cause, I don't know,
Re: Add to cart not working correctly
Posted: Tue Jun 28, 2022 4:39 pm
by Kofod95
Re: Add to cart not working correctly
Posted: Tue Jun 28, 2022 4:50 pm
by Omar_one
@Needleguy we had this issue also when we installed Ultimate URL, it's need to update... try uninstalled it and try to add a product to cart ...
you can try this
app.php/addons/free_addon/name_based_urls_demo/
Re: Add to cart not working correctly
Posted: Tue Jun 28, 2022 5:33 pm
by Needleguy
OK got it working.
When you install Ultimate SEO you have to create a htaccess file in the root directory. Adding the code to the admin htaccess doesn't work. However I had fixed that problem and still had the issue.
I took the easy way out! I had not added much to the site so I merely reinstalled and added ultimate seo. Seems to work now. I will try the other 2 modules I had installed and see if one of those is the culprit. Thank you for your answers, I appreciate your help and time.
Re: Add to cart not working correctly
Posted: Tue Jun 28, 2022 5:44 pm
by Needleguy
OK found the issue. I installed the "Back Button" addon. After installation add to cart failed. Uninstalled addon and have the same problem. Very strange!!
Re: Add to cart not working correctly
Posted: Tue Jun 28, 2022 6:11 pm
by Omar_one
I have Back Button module installed on our site 1.0.8.14 working without any issue
this one
app.php/addons/free_addon/back_button/