Jump to content

500 internal server error check-out process PS 1.7.2.x


aurora4pps

Recommended Posts

Please help me guys. Im new to prestashop. I have prestashop online store and when I checkout my order, Im getting 5oo internal server. Here is the server details. 
 

Information about your server Linux info 3.0 # 1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU / Linux Linux info 3.0 # 1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU / Linux Linux info 3.0 # 1337 SMP Tue Jan 01 00:00:00 CEST 2000 all GNU / Linux

Server software version: Apache

PHP Version: 7.1.15

Memory Limit: 256M

Maximum execution time: 50000

Max size for sending files: 64M

MySQL Version: 5.5.59-0 + deb7u1-log

Here is the error log.

 

Captfddfdure.PNG

Link to comment
Share on other sites

Did you make any changes on the address fields for a country ?

In PS 1.7.2.x series there is a known bug on address fields. You can debug it by this way:

 

Make following change in classes\form\CustomerAddressPersister.php - Add the line below after about line 67.

public function save(Address $address, $token)
{
    if (!$this->authorizeChange($address, $token)) {
        return false;
    }

    $address->id_customer = $this->customer->id;
    $address->save();    // <-- Add this

    if ($address->isUsed()) {
        $old_address = new Address($address->id);
        $address->id = $address->id_address = null;

        return $address->save() && $old_address->delete();
    }

    return $address->save();
}
 
Link to comment
Share on other sites

12 hours ago, selectshop.at said:

Did you make any changes on the address fields for a country ?

In PS 1.7.2.x series there is a known bug on address fields. You can debug it by this way:

 

Make following change in classes\form\CustomerAddressPersister.php - Add the line below after about line 67.


public function save(Address $address, $token)
{
    if (!$this->authorizeChange($address, $token)) {
        return false;
    }

    $address->id_customer = $this->customer->id;
    $address->save();    // <-- Add this

    if ($address->isUsed()) {
        $old_address = new Address($address->id);
        $address->id = $address->id_address = null;

        return $address->save() && $old_address->delete();
    }

    return $address->save();
}
I fixed the error. Thanks for your help. I changed Location settings as default. It fixed the error. 

 

Link to comment
Share on other sites

  • 2 months later...
  • 2 months later...

Woocommerce hahahahaha :)

Maybe add the id_country manually to the sp_country database, then delete the country from your back office.

Link to comment
Share on other sites

  • Matt75 unpinned this topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...