Add to cart not working correctly

Open to all! Ask other shopowners for help.
Needleguy

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.


Join The Code Co-op to get access to your library in the Code Co-op Forum
User avatar
Kofod95
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 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

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.
User avatar
burt
Core Team
Posts: 4551
Joined: Tue Oct 29, 2019 9:37 am
Phoenix Version: v1.1.0.8
Has thanked: 252 times
Been thanked: 412 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 = '/';
I am not here to build for you.
I am here to build with you. Let's help each other.
Needleguy

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
Senior Contributor
Posts: 748
Joined: Sat Feb 06, 2021 7:38 pm
Phoenix Version: 1.0.8.20
Has thanked: 99 times
Been thanked: 179 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
Senior Contributor
Posts: 679
Joined: Fri Oct 25, 2019 5:06 pm
Phoenix Version: v1.0.8.16
Has thanked: 100 times
Been thanked: 56 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

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

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
Senior Contributor
Posts: 679
Joined: Fri Oct 25, 2019 5:06 pm
Phoenix Version: v1.0.8.16
Has thanked: 100 times
Been thanked: 56 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/


Join The Code Co-op to get access to your library in the Code Co-op Forum
Post Reply