Jump to content

Erreur validation commande


Recommended Posts

Bonjour, je n'arrive pas à valider une commande sur mon site en phase test en ce moment.

je suis novice quelqu'un peut m'aider?

voici le message d'erreur 

[PrestaShopDatabaseException]

Champ 'sa.reserved_quantity' inconnu dans field list
 

            UPDATE ps_stock_available sa
            SET sa.reserved_quantity = (
                SELECT SUM(od.product_quantity - od.product_quantity_refunded)
                FROM ps_orders o
                INNER JOIN ps_order_detail od ON od.id_order = o.id_order
                INNER JOIN ps_order_history oh ON (
                    oh.id_order = o.id_order AND
                    oh.id_order_state = o.current_state AND
                    oh.id_order_history = (SELECT MAX(id_order_history) FROM ps_order_history WHERE id_order = o.id_order)
                )
                INNER JOIN ps_order_state os ON os.id_order_state = oh.id_order_state
                WHERE o.id_shop = 1 AND
                os.shipped != 1 AND (
                    o.valid = 1 OR (
                        os.id_order_state != 8 AND
                        os.id_order_state != 6
                    )
                ) AND sa.id_product = od.product_id AND
                sa.id_product_attribute = od.product_attribute_id
                GROUP BY sa.id_product, sa.id_product_attribute
            )
            WHERE sa.id_shop = 1
         AND sa.id_product IN (SELECT product_id FROM ps_order_detail WHERE id_order = 36)


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

 

739.         if ($webservice_call && $errno) {
740.             $dbg = debug_backtrace();
741.             WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
742.         } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {
743.             if ($sql) {
744.                 throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
745.             }
746. 
747.             throw new PrestaShopDatabaseException($this->getMsgError());
748.         }
749.     }

 

 

Link to comment
Share on other sites

Oui, en enlevant le mode debug vous avez partiellement masquer le problème mais ça ne résout rien.

Téléchargez les sources du site sur votre ordinateur (videz le cache avant, ça permettra de gagner du temps) puis utilisez votre éditeur de code pour faire une recherche globale sur le terme "reserved_quantity"

Link to comment
Share on other sites

bonjour, 

 

voici le résultat 

 

Search "reserved_quantity" (26 hits in 12 files)
  C:\wamp\www\testnewsamashop\admin18\autoupgrade\latest\admin18\themes\new-theme\public\stock.bundle.js (2 hits)
    Line 44564:       var productReservedQty = Number(this.product.product_reserved_quantity);
    Line 51843:   }, [_vm._v("\n    " + _vm._s(_vm.product.product_reserved_quantity) + "\n  ")]), _vm._v(" "), _c('td', {
  C:\wamp\www\testnewsamashop\admin18\autoupgrade\latest\install\data\db_structure.sql (1 hit)
    Line 2166: `reserved_quantity` INT(11) NOT NULL DEFAULT '0',
  C:\wamp\www\testnewsamashop\admin18\autoupgrade\latest\install\upgrade\sql\1.7.2.0.sql (1 hit)
    Line 31: ALTER TABLE `PREFIX_stock_available` ADD `reserved_quantity` INT NOT NULL DEFAULT '0' AFTER `physical_quantity`;
  C:\wamp\www\testnewsamashop\admin18\autoupgrade\latest\src\Adapter\StockManager.php (2 hits)
    Line 105:             SET sa.physical_quantity = sa.quantity + sa.reserved_quantity
    Line 130:             SET sa.reserved_quantity = (
  C:\wamp\www\testnewsamashop\admin18\autoupgrade\latest\src\PrestaShopBundle\Entity\Repository\StockRepository.php (2 hits)
    Line 266:             sa.reserved_quantity as product_reserved_quantity,
    Line 266:             sa.reserved_quantity as product_reserved_quantity,
  C:\wamp\www\testnewsamashop\admin18\themes\new-theme\public\stock.bundle.js (2 hits)
    Line 44564:       var productReservedQty = Number(this.product.product_reserved_quantity);
    Line 51843:   }, [_vm._v("\n    " + _vm._s(_vm.product.product_reserved_quantity) + "\n  ")]), _vm._v(" "), _c('td', {
  C:\wamp\www\testnewsamashop\app\logs\20180130_exception.log (2 hits)
    Line 6: *ERROR*     v1.7.2.4    2018/01/30 - 10:47:10: Unknown column 'sa.reserved_quantity' in 'field list'<br /><br /><pre>
    Line 8:             SET sa.reserved_quantity = (
  C:\wamp\www\testnewsamashop\app\logs\20180201_exception.log (2 hits)
    Line 4: *ERROR*     v1.7.2.4    2018/02/01 - 09:22:43: Unknown column 'sa.reserved_quantity' in 'field list'<br /><br /><pre>
    Line 6:             SET sa.reserved_quantity = (
  C:\wamp\www\testnewsamashop\app\logs\20180207_exception.log (2 hits)
    Line 1: *ERROR*     v1.7.2.4    2018/02/07 - 11:14:14: Champ 'sa.reserved_quantity' inconnu dans field list<br /><br /><pre>
    Line 3:             SET sa.reserved_quantity = (
  C:\wamp\www\testnewsamashop\app\logs\20180208_exception.log (6 hits)
    Line 1: *ERROR*     v1.7.2.4    2018/02/08 - 09:09:14: Champ 'sa.reserved_quantity' inconnu dans field list<br /><br /><pre>
    Line 3:             SET sa.reserved_quantity = (
    Line 26: *ERROR*     v1.7.2.4    2018/02/08 - 09:16:42: Champ 'sa.reserved_quantity' inconnu dans field list<br /><br /><pre>
    Line 28:             SET sa.reserved_quantity = (
    Line 50: *ERROR*     v1.7.2.4    2018/02/08 - 13:58:44: Champ 'sa.reserved_quantity' inconnu dans field list<br /><br /><pre>
    Line 52:             SET sa.reserved_quantity = (
  C:\wamp\www\testnewsamashop\src\Adapter\StockManager.php (2 hits)
    Line 105:             SET sa.physical_quantity = sa.quantity + sa.reserved_quantity
    Line 130:             SET sa.reserved_quantity = (
  C:\wamp\www\testnewsamashop\src\PrestaShopBundle\Entity\Repository\StockRepository.php (2 hits)
    Line 266:             sa.reserved_quantity as product_reserved_quantity,
    Line 266:             sa.reserved_quantity as product_reserved_quantity,

Link to comment
Share on other sites

Ok, donc un upgrade qui a foiré sans doute...

 

Exécutez cette commande dans phpmyadmin et tout rentrera dans l'ordre: 

 

ALTER TABLE `ps_stock_available` ADD `reserved_quantity` INT NOT NULL DEFAULT '0' AFTER `physical_quantity`;

Link to comment
Share on other sites

bonjour, 

Merci pour vos efforts 

j'ai exécuté la requête sql 

 

Requête SQL :

 

ALTER TABLE `ps_stock_available` ADD `reserved_quantity` INT NOT NULL DEFAULT '0' AFTER `physical_quantity`

 

MySQL a répondu: Documentation

#1054 - Champ 'physical_quantity' inconnu dans ps_stock_available 

Link to comment
Share on other sites

bonjour, 

désolé un peu souffrant ces derniers jours, 

J'ai essayé de faire la manip pour exécuter les requêtes sql (comme je suis novice) mais ça donne toujours ça comme réponse   

Erreur

Requête SQL :

 

ALTER TABLE `PREFIX_product` CHANGE `isbn` `isbn` VARCHAR(32) NULL DEFAULT NULL

 

MySQL a répondu: Documentation

#1146 - La table 'test.prefix_product' n'existe pas 

erreur.png

Link to comment
Share on other sites

Bonjour merci pour votre patience et soutien

les commandes passent maintenant mais ne récupère pas L'ID commande quand il envoie le mail de confirmation au client, cependant il est bien enregistré en bo sur les commandes.

Et j'arrive pas à traduire les quelques mots en anglais qui reste sur mon Thème message d'erreur/

Unable to load "/home/samashop2017/public_html/app/Resources/translations/fr-FR/1.6modulesstatspersonalinfostranslationsfr-FR.php": [ERROR 47] ParsePI: PI php never end ... (in n/a - line 41, column 1) [ERROR 4] Start tag expected, '<' not found (in n/a - line 41, column 1)

Import produit se traduit toujours par un échec Errors occurred:

  • ENSEMBLE LAYETTE (ID: No ID) cannot be saved*
  •  
  • j'ai fait un test avec juste une ligne mais ça ne passe toujours pas.

merci d'avance 

Link to comment
Share on other sites

  • 1 month later...

Bonjour à Tous, 

 

J'ai vraiment besoin d'aide SVP, 

 

J'ai repris le site sur la version 1.6.1.10 en local tout fonctionne bien, mais en ligne j'ai ce message d'erreur ci-dessous:

Notice: Undefined property: CategoryController::$objectPresenter in /home/xxxxxx/public_html/controllers/front/listing/CategoryController.php on line 130

Fatal error: Uncaught Error: Call to a member function present() on null in /home/xxxxxx/public_html/controllers/front/listing/CategoryController.php:130 Stack trace: #0 /home/xxxxxx/public_html/controllers/front/listing/CategoryController.php(85): CategoryControllerCore->getTemplateVarCategory() #1 /home/xxxxxx/public_html/classes/controller/Controller.php(170): CategoryControllerCore->init() #2 /home/xxxxxx/public_html/classes/Dispatcher.php(367): ControllerCore->run() #3 /home/xxxxxx/public_html/index.php(28): DispatcherCore->dispatch() #4 {main} thrown in /home/xxxxxx/public_html/controllers/front/listing/CategoryController.php on line 130

 

J'ai beau cherché, je ne trouve pas, merci d'avance si vous avez une solution.

 

cdt

Link to comment
Share on other sites

  • 2 months later...

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