Add to cart not working correctly

Ask the community for help and support.
Needleguy
Posts: 49
Joined: Sun Jun 26, 2022 2:06 am
Has thanked: 1 time

Add to cart not working correctly

Post 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.
User avatar
Kofod95
VIP Member
VIP Member
Posts: 605
Joined: Sat Feb 06, 2021 7:38 pm
Has thanked: 80 times
Been thanked: 141 times

Re: Add to cart not working correctly

Post 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
I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
Needleguy
Posts: 49
Joined: Sun Jun 26, 2022 2:06 am
Has thanked: 1 time

Re: Add to cart not working correctly

Post by Needleguy »

Yes I spent the better part of an hour and couldn't find anything. I even Googled but didn't find much.
burt
Lead Developer
Lead Developer
Posts: 2423
Joined: Tue Oct 29, 2019 9:37 am
Has thanked: 49 times
Been thanked: 137 times

Re: Add to cart not working correctly

Post 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 = '/';
Gamechanger Addon: Queued Emails, try before you buy.
Needleguy
Posts: 49
Joined: Sun Jun 26, 2022 2:06 am
Has thanked: 1 time

Re: Add to cart not working correctly

Post 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,
User avatar
Kofod95
VIP Member
VIP Member
Posts: 605
Joined: Sat Feb 06, 2021 7:38 pm
Has thanked: 80 times
Been thanked: 141 times

Re: Add to cart not working correctly

Post by Kofod95 »

I'm not smart, but sometimes even a blind chicken can find a corn.
Here are a lot of corns: Phoenix user guide
Omar_one
VIP Member
VIP Member
Posts: 481
Joined: Fri Oct 25, 2019 5:06 pm
Has thanked: 48 times
Been thanked: 27 times

Re: Add to cart not working correctly

Post 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/
Needleguy
Posts: 49
Joined: Sun Jun 26, 2022 2:06 am
Has thanked: 1 time

Re: Add to cart not working correctly

Post 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.
Needleguy
Posts: 49
Joined: Sun Jun 26, 2022 2:06 am
Has thanked: 1 time

Re: Add to cart not working correctly

Post 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!!
Omar_one
VIP Member
VIP Member
Posts: 481
Joined: Fri Oct 25, 2019 5:06 pm
Has thanked: 48 times
Been thanked: 27 times

Re: Add to cart not working correctly

Post 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/
Post Reply