Jump to content
thirty bees forum

Customer's address will not save for checkout


Joint Systems

Recommended Posts

At two TB shops at hostgator Jointsystems.org and jointsystems.org/shop when a customer attempts to checkout either as a guest, quick or standard creating an account the address won't save?  Two shops at Hostwinds Jointsystem.org (singular) and jointsystem.org/shop the address will save so I used the jointystem.org as the default in a multi-store configuration assuming it was a database error.  Did not solve the problem.  After attempting add a new address or update an existing address TB adds an empty address and when you attempt to delete the address it goes back to add address but if you go back to your addresses the deleted empty address is still there?

my defective addresses.PNG

Edited by Joint Systems
Link to comment
Share on other sites

. I have created phpinfo pages for all of these domains as well if you or your developer would like to review this configuration further.

jointsystems.org/phpinfo.php

It appears as though the cipher error is no longer being reported on jointsystems.org however the address page is still looping back on my end. I have checked the sites database for any improperly closed tables or corruption however this reported no issues as well. I have straced the system calls being made by this page and it is exiting with a 0 status which indicates that the script being executed completed normally. Unfortunately there does not appear to be an issue server side which is causing this page to loop back when being submitted and would suggest have your developer review further. I apologize for any inconvenience.
Kyle K.
Web Advisor III
Hostgator.com
(866) 964-2867

Link to comment
Share on other sites

The files in question are cache but originate from '/home3/txmnbf6y/public_html/shop/themes/community-theme-default/addresses.tpl' which is consistent with the problem with saving addresses as this is the part in control of address saving. I changed to the default bootstrap theme and now the address will save.  I also downloded address.tpl and address.tpl from a working TB version but have not yet tested the community theme.

Link to comment
Share on other sites

I cant you help with your problem. I am using multistore as well and it doesn't make any problems in saving addresses...

But in general it looks to me, that you have many issues, which shouldn't be in the core. Have you ever tried the things on a clean installation and check, if they are working there?

Link to comment
Share on other sites

Yes this is what Hostgator did, found an error in the database after the migration to the Community theme.


Thank you for contacting HostGator. Reviewing your concern I found your database txmnbf6y_jsorg table ps_address was missing a PRIMARY KEY which should be column id_address. This was causing duplicate entries to be entered into the table with the same id_address and information. Preventing your site from properly joining the id_customer to a unique ps_address. 

Here is what your current table structure looks like: 
       Table: ps_address
Create Table: CREATE TABLE `ps_address` (
  `id_address` int(10) unsigned NOT NULL,
  `id_country` int(10) unsigned NOT NULL,
  `id_state` int(10) unsigned DEFAULT NULL,
  `id_customer` int(10) unsigned NOT NULL DEFAULT '0',
  `id_manufacturer` int(10) unsigned NOT NULL DEFAULT '0',
  `id_supplier` int(10) unsigned NOT NULL DEFAULT '0',
  `id_warehouse` int(10) unsigned NOT NULL DEFAULT '0',
  `alias` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `company` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `lastname` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `firstname` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `address1` varchar(128) COLLATE utf8_unicode_ci NOT NULL,
  `address2` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL,
  `postcode` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL,
  `city` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `other` text COLLATE utf8_unicode_ci,
  `phone` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  `phone_mobile` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  `vat_number` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  `dni` varchar(16) COLLATE utf8_unicode_ci DEFAULT NULL,
  `date_add` datetime NOT NULL,
  `date_upd` datetime NOT NULL,
  `active` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `deleted` tinyint(1) unsigned NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci


I setup a test prestashop site and then pulled the table structure from it for the ps_address table and here is what it looks like: 
      Table: ps_address
Create Table: CREATE TABLE `ps_address` (
  `id_address` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `id_country` int(10) unsigned NOT NULL,
  `id_state` int(10) unsigned DEFAULT NULL,
  `id_customer` int(10) unsigned NOT NULL DEFAULT '0',
  `id_manufacturer` int(10) unsigned NOT NULL DEFAULT '0',
  `id_supplier` int(10) unsigned NOT NULL DEFAULT '0',
  `id_warehouse` int(10) unsigned NOT NULL DEFAULT '0',
  `alias` varchar(32) NOT NULL,
  `company` varchar(64) DEFAULT NULL,
  `lastname` varchar(32) NOT NULL,
  `firstname` varchar(32) NOT NULL,
  `address1` varchar(128) NOT NULL,
  `address2` varchar(128) DEFAULT NULL,
  `postcode` varchar(12) DEFAULT NULL,
  `city` varchar(64) NOT NULL,
  `other` text,
  `phone` varchar(32) DEFAULT NULL,
  `phone_mobile` varchar(32) DEFAULT NULL,
  `vat_number` varchar(32) DEFAULT NULL,
  `dni` varchar(16) DEFAULT NULL,
  `date_add` datetime NOT NULL,
  `date_upd` datetime NOT NULL,
  `active` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `deleted` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id_address`),
  KEY `address_customer` (`id_customer`),
  KEY `id_country` (`id_country`),
  KEY `id_state` (`id_state`),
  KEY `id_manufacturer` (`id_manufacturer`),
  KEY `id_supplier` (`id_supplier`),
  KEY `id_warehouse` (`id_warehouse`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8


You can see your table ps_address had no PRIMARY key to ensure all entries are unique, since the entries in your table were not complete and contained duplicate data associated with the same customer_id and could not be properly used. I generated a database backup and placed this in your home directory here: /home3/txmnbf6y/txmnbf6y_jsorg.1571180414.sql 

I then dropped table ps_address and recreated it with proper keys. I was then able to save my address and proceed to the next step in the check out process. 

This was not a server issue, but most likely a coding issue with a plugin that altered the table as my test prestashop install contained all the KEYs and PRIMARY KEY entries. 


Sincerely,

Jesse C.
Lvl II Linux SysAdmin
HostGator.com

Link to comment
Share on other sites

17 minutes ago, Joint Systems said:

Yes this is what Hostgator did, found an error in the database after the migration to the Community theme.

I have to join wakabayashi. The big question is how you got this problem. Obviously you did something wrong during the migration as this is not a common problem. As a result there may be other tables with similar problems.

Link to comment
Share on other sites

No longer have the problem after updating to 1.1 version as recommended.  On another store jointsystems.org/shop also had same error where the customers address would not save.  Upgrading to 1.1. did not solve the issue which originated when I migrated the store from Prestashop 1.6.24.  The error was caused by the associated database tables.  Copied the working ones from the parent store and dropped the non working ones and replaced them, this solved the problem.

Edited by Joint Systems
Update
Link to comment
Share on other sites

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...