Jump to content

Problème changement de status en BO


Recommended Posts

Bonjour,

suite à la mise à jour du module paypal ce matin je rencontre actuellement un problème.

Lorsque je change le status d'une commande j'obtiens une page blanche, j'ai donc activer les messages d'erreur et j'obtiens ceci:

 

Strict Standards: Declaration of Cart::getPackageShippingCost() should be compatible with that of CartCore::getPackageShippingCost() in /home/monsite/www/override/classes/Cart.php on line 268 [PrestaShopDatabaseException] Champ 'payment_method' inconnu dans field list  

            SELECT `payment_method`, `payment_status`            FROM `ps_paypal_order`            WHERE `id_order` = 18092 LIMIT 1

at line 791 in file classes/db/Db.php

786.         if ($webservice_call && $errno) {787.             $dbg = debug_backtrace();788.             WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);789.         } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {790.             if ($sql) {791.                 throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');792.             }793. 794.             throw new PrestaShopDatabaseException($this->getMsgError());795.         }796.     }[/code]

Et si vous revenu en arrière le status n'a pas changé dans le détail de la commande, par il est bien pris en compte dans la liste des commandes.

 

Auriez vous une idée?

En vous remerciant.

Cordialement Tchupa.

 

 

Link to comment
Share on other sites

la structure de la table paypal_order doit être comme ceci:

 

id_order int(10) unsigned  

id_transaction varchar(255)  

id_invoice varchar(255) NULL  

currency varchar(10)  

total_paid varchar(50)  

shipping varchar(50)  

capture int(2)  

payment_date varchar(50)  

payment_method int(2) unsigned  

payment_status varchar(255) NULL

 

Si ce n'est pas le cas corrigez-la

Edited by Eolia (see edit history)
Link to comment
Share on other sites

Bonjour Eolia,

 

tout d'abord merci d'avoir pris le temps de me lire.

Vous me confirmez bien qu'il me manque le 3/4 de la structure de la table dont vous me parlez ?

post-125302-0-88377200-1466427737_thumb.png

 

En vous remerciant.

 

Cordialement.

Link to comment
Share on other sites

Oui vous deviez avoir une version assez ancienne

 

Soit vous réinitialisez le module (les tables devraient etre supprimées, puis recréées) soit vous ajoutez les colonnes à la mano.

 

Le bug vient des mises à jour.

Vous devez avoir 4 tables:

DROP TABLE IF EXISTS `ps_paypal_capture`;
CREATE TABLE `ps_paypal_capture` (
  `id_paypal_capture` int(11) NOT NULL AUTO_INCREMENT,
  `id_order` int(11) NOT NULL,
  `capture_amount` float NOT NULL,
  `result` text NOT NULL,
  `date_add` datetime NOT NULL,
  `date_upd` datetime NOT NULL,
  PRIMARY KEY (`id_paypal_capture`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `ps_paypal_customer`;
CREATE TABLE `ps_paypal_customer` (
  `id_paypal_customer` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `id_customer` int(10) unsigned NOT NULL,
  `paypal_email` varchar(255) NOT NULL,
  PRIMARY KEY (`id_paypal_customer`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `ps_paypal_login_user`;
CREATE TABLE `ps_paypal_login_user` (
  `id_paypal_login_user` int(11) NOT NULL AUTO_INCREMENT,
  `id_customer` int(11) NOT NULL,
  `token_type` varchar(255) NOT NULL,
  `expires_in` varchar(255) NOT NULL,
  `refresh_token` varchar(255) NOT NULL,
  `id_token` varchar(255) NOT NULL,
  `access_token` varchar(255) NOT NULL,
  `account_type` varchar(255) NOT NULL,
  `user_id` varchar(255) NOT NULL,
  `verified_account` varchar(255) NOT NULL,
  `zoneinfo` varchar(255) NOT NULL,
  `age_range` varchar(255) NOT NULL,
  PRIMARY KEY (`id_paypal_login_user`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


DROP TABLE IF EXISTS `ps_paypal_order`;
CREATE TABLE `ps_paypal_order` (
  `id_order` int(10) unsigned NOT NULL,
  `id_transaction` varchar(255) NOT NULL,
  `id_invoice` varchar(255) DEFAULT NULL,
  `currency` varchar(10) NOT NULL,
  `total_paid` varchar(50) NOT NULL,
  `shipping` varchar(50) NOT NULL,
  `capture` int(2) NOT NULL,
  `payment_date` varchar(50) NOT NULL,
  `payment_method` int(2) unsigned NOT NULL,
  `payment_status` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id_order`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  • Like 1
Link to comment
Share on other sites

Ok, j'ai les créer à la main car lorsque je réinitialise le module rien ne change.

 

Par contre je viens de remarquer un truc étrange concernant cette table c'est que lorsque je la consulte je suis directement redirigé vers l'onglet structure impossible d'afficher l'onglet "Afficher" de la table ps_paypal_order il est grisé.

 

post-125302-0-31391200-1466434226_thumb.png

 

 

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