I really appreciate your help. error_log() is also not helping
. Did you look at the code I posted previously...
I need confirmation about configuration file. Have I configured the second manager (price) correctly because application is not recognizing it. I have inserted error_log(__METHOD__) in different methods but non of them is getting called. So, if you could look into the configuration file once again then it would be a great help. I am pasting its code here again...
Code: Select all
return [
'product' => [
'manager' => [
'name' => 'Abc',
'standard' => [
'insert' => array(
'ansi' => '
INSERT INTO "mshop_product" (
"countryoforigin", "oldcode", "typeid", "code", "label", "status", "start", "end",
"config", "mtime", "editor", "target", "siteid", "ctime"
) VALUES (
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
)
'
),
'update' => array(
'ansi' => '
UPDATE "mshop_product"
SET "countryoforigin" = ?, "oldcode" = ?, "typeid" = ?, "code" = ?, "label" = ?, "status" = ?,
"start" = ?, "end" = ?, "config" = ?, "mtime" = ?, "editor" = ?, "target" = ?
WHERE "siteid" = ? AND "id" = ?
'
),
'search' => array(
'ansi' => '
SELECT mpro."id" AS "product.id", mpro."siteid" AS "product.siteid",
mpro."typeid" AS "product.typeid", mpro."code" AS "product.code",
mpro."label" AS "product.label", mpro."config" AS "product.config",
mpro."start" AS "product.datestart", mpro."end" AS "product.dateend",
mpro."status" AS "product.status", mpro."ctime" AS "product.ctime",
mpro."mtime" AS "product.mtime", mpro."editor" AS "product.editor",
mpro."target" AS "product.target",
mpro."oldcode" AS "product.oldcode",
mpro."countryoforigin" AS "product.countryoforigin"
FROM "mshop_product" AS mpro
:joins
WHERE :cond
GROUP BY mpro."id", mpro."siteid", mpro."typeid", mpro."code",
mpro."label", mpro."config", mpro."start", mpro."end",
mpro."status", mpro."ctime", mpro."mtime", mpro."editor",
mpro."target", mpro."oldcode", mpro."countryoforigin"
/*-columns*/ , :columns /*columns-*/
/*-orderby*/ ORDER BY :order /*orderby-*/
LIMIT :size OFFSET :start
'
),
'count' => array(
'ansi' => '
SELECT COUNT(*) AS "count"
FROM (
SELECT DISTINCT mpro."id"
FROM "mshop_product" AS mpro
:joins
WHERE :cond
LIMIT 10000 OFFSET 0
) AS list
'
),
'newid' => array(
'db2' => 'SELECT IDENTITY_VAL_LOCAL()',
'mysql' => 'SELECT LAST_INSERT_ID()',
'oracle' => 'SELECT mshop_product_seq.CURRVAL FROM DUAL',
'pgsql' => 'SELECT lastval()',
'sqlite' => 'SELECT last_insert_rowid()',
'sqlsrv' => 'SELECT SCOPE_IDENTITY()',
'sqlanywhere' => 'SELECT @@IDENTITY',
),
],
],
],
'price' => [
'manager' => [
'name' => 'Cde',
'standard' => [
'insert' => array(
'ansi' => '
INSERT INTO "mshop_price" (
"minimumadvertisedprice", "typeid", "currencyid", "domain", "label",
"quantity", "value", "costs", "rebate", "taxrate",
"status", "mtime", "editor", "siteid", "ctime"
) VALUES (
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?
)
'
),
'update' => array(
'ansi' => '
UPDATE "mshop_price"
SET "minimumadvertisedprice" = ?, "typeid" = ?, "currencyid" = ?, "domain" = ?, "label" = ?,
"quantity" = ?, "value" = ?, "costs" = ?, "rebate" = ?,
"taxrate" = ?, "status" = ?, "mtime" = ?, "editor" = ?
WHERE "siteid" = ? AND "id" = ?
'
),
'search' => array(
'ansi' => '
SELECT mpri."id" AS "price.id", mpri."siteid" AS "price.siteid",
mpri."typeid" AS "price.typeid", mpri."currencyid" AS "price.currencyid",
mpri."domain" AS "price.domain", mpri."label" AS "price.label",
mpri."quantity" AS "price.quantity", mpri."value" AS "price.value",
mpri."costs" AS "price.costs", mpri."rebate" AS "price.rebate",
mpri."taxrate" AS "price.taxrate", mpri."status" AS "price.status",
mpri."mtime" AS "price.mtime", mpri."editor" AS "price.editor",
mpri."ctime" AS "price.ctime",
mpri."minimumadvertisedprice" AS "price.minimumadvertisedprice"
FROM "mshop_price" AS mpri
:joins
WHERE :cond
GROUP BY mpri."id", mpri."siteid", mpri."typeid", mpri."currencyid",
mpri."domain", mpri."label", mpri."quantity", mpri."value",
mpri."costs", mpri."rebate", mpri."taxrate", mpri."status",
mpri."mtime", mpri."editor", mpri."ctime", mpri."minimumadvertisedprice" /*-columns*/ , :columns /*columns-*/
/*-orderby*/ ORDER BY :order /*orderby-*/
LIMIT :size OFFSET :start
'
),
'count' => array(
'ansi' => '
SELECT COUNT(*) AS "count"
FROM (
SELECT DISTINCT mpri."id"
FROM "mshop_price" AS mpri
:joins
WHERE :cond
LIMIT 10000 OFFSET 0
) AS list
'
),
'newid' => array(
'db2' => 'SELECT IDENTITY_VAL_LOCAL()',
'mysql' => 'SELECT LAST_INSERT_ID()',
'oracle' => 'SELECT mshop_price_seq.CURRVAL FROM DUAL',
'pgsql' => 'SELECT lastval()',
'sqlite' => 'SELECT last_insert_rowid()',
'sqlsrv' => 'SELECT SCOPE_IDENTITY()',
'sqlanywhere' => 'SELECT @@IDENTITY',
),
],
],
],
];