Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

  • 0
SeaSky

Amazon Pay by Patworx - Error on Install

Question

Hey,

I've been reading this post about Amazon Pay and thought to give it a go, but after the install when I try to open the module I get an error. I was wondering that if the module worked (post is from 2017), the problem may be with my specific installation or it may be a problem related with the new version of the module / TB?

Module Version 2.3.0 for P.S 1.6 (https://addons.prestashop.com/en/payment-card-wallet/21293-amzpayments.html)

TB Version 1.1.0

Any help or advice would be apreciated!

Error:

Quote
ThirtyBeesDatabaseException

Unknown column 'active' in 'field list'

in file classes/order/OrderState.php at line 220

SQL


SELECT `active`
FROM `tb_order_state`
LIMIT 1

Source file: classes/order/OrderState.php


201:     *
202:     * Starting with v1.1.0, thirty bees no longer equips the updater module
203:     * with database upgrade scripts, but equipped Core Updater with the
204:     * capability to read each class' table description and to update the
205:     * database accordingly.
206:     *
207:     * Retrocompatibility: as the above is just a plan and not yet true for
208:     * the time being, this was added as a kludge to bridge the time until it
209:     * actually gets true.
210:     *
211:     * @since 1.1.0
212:     */
213:    public static function installationCheck()
214:    {
215:        $db = Db::getInstance(_PS_USE_SQL_SLAVE_);
216:        $result = $db->executeS(
217:            (new DbQuery())
218:                ->select('`active`')
219:                ->from(static::$definition['table'])
220:                ->limit(1)
221:        );
222:
223:        if ( ! $result) {
224:            $db->execute('ALTER TABLE '
225:                ._DB_PREFIX_.static::$definition['table']
226:                .' ADD COLUMN `active` TINYINT(1) UNSIGNED NOT NULL DEFAULT 1;'
227:            );
228:        }
229:    }
230:}

Stack trace

1. classes/db/Db.php:844 source ()

825:        return $result;
826:    }
827:
828:    /**
829:     * Displays last SQL error
830:     *
831:     * @param string|bool $sql
832:     * @throws PrestaShopDatabaseException
833:     */
834:    public function displayError($sql = false)
835:    {
836:        global $webserviceCall;
837:
838:        $errno = $this->getNumberError();
839:        if ($webserviceCall && $errno) {
840:            $dbg = debug_backtrace();
841:            WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
842:        } elseif (_PS_DEBUG_SQL_ && $errno && !defined('TB_INSTALLATION_IN_PROGRESS')) {
843:            if ($sql) {
844:                throw new PrestaShopDatabaseException($this->getMsgError(), $sql);
845:            }
846:
847:            throw new PrestaShopDatabaseException($this->getMsgError());
848:        }
849:    }
850:
851:    /**
852:     * Sanitize data which will be injected into SQL query
853:     *
854:     * @param string $string SQL data which will be injected into SQL query
2. classes/db/Db.php:488 source DbCore->displayError(arguments)
3. classes/db/Db.php:709 source DbCore->query(arguments)
#1

"SELECT `active`\nFROM `tb_order_state`\nLIMIT 1"
4. classes/order/OrderState.php:220 source DbCore->executeS(arguments)
#1

"SELECT `active`\nFROM `tb_order_state`\nLIMIT 1"
5. classes/order/OrderState.php:141 source OrderStateCore::installationCheck()
6. modules/amzpayments/amzpayments.php:1080 source OrderStateCore::getOrderStates(arguments)
#1

2
7. modules/amzpayments/amzpayments.php:627 source AmzPayments->getConfigForm()
8. modules/amzpayments/amzpayments.php:1875 source AmzPayments->_displayForm()
9. controllers/admin/AdminModulesController.php:1648 source AmzPayments->getContent()
10. controllers/admin/AdminModulesController.php:1511 source AdminModulesControllerCore->postProcessCallback()
11. classes/controller/Controller.php:197 source AdminModulesControllerCore->postProcess()
12. classes/Dispatcher.php:837 source ControllerCore->run()
13. admin2245n4s1c/index.php:63 source DispatcherCore->dispatch()

 

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Thanks a lot @Occam the solution in that post solved the issue! I guess now that I used the wrong keywords to look for a solution, though it was related with the amazon module, should I delete this post then?

Share this post


Link to post
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...