address extention
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
address extention
Columns were created for customer address and order address and item and manager were expanded.
I am currently getting this error for the users address table, but the user.php file does not exist under config/mshop.php. How should I continue expanding?
[/quote]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'msca.care_fund' in 'field list': SELECT mcusad."id" AS "customer.address.id", mcusad."siteid" AS "customer.address.siteid", mcusad."parentid" AS "customer.address.parentid", mcusad."type" AS "customer.address.type", mcusad."company" AS "customer.address.company", mcusad."vatid" AS "customer.address.vatid", mcusad."salutation" AS "customer.address.salutation", mcusad."title" AS "customer.address.title", mcusad."firstname" AS "customer.address.firstname", mcusad."lastname" AS "customer.address.lastname", mcusad."address1" AS "customer.address.address1", mcusad."address2" AS "customer.address.address2", mcusad."address3" AS "customer.address.address3", mcusad."postal" AS "customer.address.postal", mcusad."city" AS "customer.address.city", mcusad."state" AS "customer.address.state", mcusad."langid" AS "customer.address.languageid", mcusad."countryid" AS "customer.address.countryid", mcusad."telephone" AS "customer.address.telephone", mcusad."telefax" AS "customer.address.telefax", mcusad."mobile" AS "customer.address.mobile", mcusad."email" AS "customer.address.email", mcusad."website" AS "customer.address.website", mcusad."longitude" AS "customer.address.longitude", mcusad."latitude" AS "customer.address.latitude", mcusad."pos" AS "customer.address.position", mcusad."birthday" AS "customer.address.birthday", mcusad."ctime" AS "customer.address.ctime", mcusad."mtime" AS "customer.address.mtime", mcusad."editor" AS "customer.address.editor", msca."care_fund" AS "care_fund", msca."insurance_number" AS "insurance_number", msca."care_level" AS "care_level" FROM "users_address" mcusad WHERE ( ( mcusad."siteid" IN ('','1.') ) AND mcusad."parentid" IN (1) ) ORDER BY mcusad."pos" ASC LIMIT 2147483647 OFFSET 0
I am currently getting this error for the users address table, but the user.php file does not exist under config/mshop.php. How should I continue expanding?
[/quote]SQLSTATE[42S22]: Column not found: 1054 Unknown column 'msca.care_fund' in 'field list': SELECT mcusad."id" AS "customer.address.id", mcusad."siteid" AS "customer.address.siteid", mcusad."parentid" AS "customer.address.parentid", mcusad."type" AS "customer.address.type", mcusad."company" AS "customer.address.company", mcusad."vatid" AS "customer.address.vatid", mcusad."salutation" AS "customer.address.salutation", mcusad."title" AS "customer.address.title", mcusad."firstname" AS "customer.address.firstname", mcusad."lastname" AS "customer.address.lastname", mcusad."address1" AS "customer.address.address1", mcusad."address2" AS "customer.address.address2", mcusad."address3" AS "customer.address.address3", mcusad."postal" AS "customer.address.postal", mcusad."city" AS "customer.address.city", mcusad."state" AS "customer.address.state", mcusad."langid" AS "customer.address.languageid", mcusad."countryid" AS "customer.address.countryid", mcusad."telephone" AS "customer.address.telephone", mcusad."telefax" AS "customer.address.telefax", mcusad."mobile" AS "customer.address.mobile", mcusad."email" AS "customer.address.email", mcusad."website" AS "customer.address.website", mcusad."longitude" AS "customer.address.longitude", mcusad."latitude" AS "customer.address.latitude", mcusad."pos" AS "customer.address.position", mcusad."birthday" AS "customer.address.birthday", mcusad."ctime" AS "customer.address.ctime", mcusad."mtime" AS "customer.address.mtime", mcusad."editor" AS "customer.address.editor", msca."care_fund" AS "care_fund", msca."insurance_number" AS "insurance_number", msca."care_level" AS "care_level" FROM "users_address" mcusad WHERE ( ( mcusad."siteid" IN ('','1.') ) AND mcusad."parentid" IN (1) ) ORDER BY mcusad."pos" ASC LIMIT 2147483647 OFFSET 0
config/mshop.phpCode: Select all
<?php return [ 'order' => [ 'manager' => [ 'address' => [ 'name' => 'Myproject', //"Order/Manager/Decorator/Myproject" 'decorators' => [ 'local' => ['Myproject'] ], 'insert' => [ 'ansi' => ' INSERT INTO "mshop_order_address" ( :names "parentid", "addrid", "type", "company", "vatid", "salutation", "title", "firstname", "lastname", "address1", "address2", "address3", "postal", "city", "state", "countryid", "langid", "telephone", "mobile", "email","telefax", "website", "longitude", "latitude", "pos", "birthday", "mtime", "editor", "siteid", "ctime" ) VALUES ( :values ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ) ' ], 'update' => [ 'ansi' => ' UPDATE "mshop_order_address" SET :names "parentid" = ?, "addrid" = ?, "type" = ?, "company" = ?, "vatid" = ?, "salutation" = ?, "title" = ?, "firstname" = ?, "lastname" = ?, "address1" = ?, "address2" = ?, "address3" = ?, "postal" = ?, "city" = ?, "state" = ?, "countryid" = ?, "langid" = ?, "telephone" = ?, "mobile" = ?, "email" = ?,"care_fund" = ?, "insurance_number" = ?, "care_level" = ?, "telefax" = ?, "website" = ?, "longitude" = ?, "latitude" = ?, "pos" = ?, "birthday" = ?, "mtime" = ?, "editor" = ? WHERE "siteid" LIKE ? AND "id" = ? ', ], 'search' => [ 'ansi' => ' SELECT mordad.*, mordad."care_fund", mordad."insurance_number", mordad."care_level" FROM "mshop_order_address" mordad :joins WHERE :cond ORDER BY :order OFFSET :start ROWS FETCH NEXT :size ROWS ONLY ', 'mysql' => ' SELECT mordad.*, mordad.`care_fund`, mordad.`insurance_number`, mordad.`care_level` FROM `mshop_order_address` mordad :joins WHERE :cond ORDER BY :order LIMIT :size OFFSET :start ' ], ], ],], 'customer' => [ 'manager' => [ 'decorators' => [ 'local' => ['Myproject'] ], 'address' => [ 'name' => 'Myproject', //"Customer/Manager/Decorator/Myproject" 'decorators' => [ 'local' => ['Myproject'] ], 'insert' => [ 'ansi' => ' INSERT INTO "mshop_customer_address" ( :names "parentid", "addrid", "type", "company", "vatid", "salutation", "title", "firstname", "lastname", "address1", "address2", "address3", "postal", "city", "state", "countryid", "langid", "telephone", "mobile", "email", "telefax", "website", "longitude", "latitude", "pos", "birthday", "mtime", "editor", "siteid", "ctime", "care_fund", "insurance_number", "care_level" ) VALUES ( :values ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ) ' ], 'update' => [ 'ansi' => ' UPDATE "mshop_customer_address" SET :names "parentid" = ?, "addrid" = ?, "type" = ?, "company" = ?, "vatid" = ?, "salutation" = ?, "title" = ?, "firstname" = ?, "lastname" = ?, "address1" = ?, "address2" = ?, "address3" = ?, "postal" = ?, "city" = ?, "state" = ?, "countryid" = ?, "langid" = ?, "telephone" = ?, "mobile" = ?, "email" = ?, "telefax" = ?, "website" = ?, "longitude" = ?, "latitude" = ?, "pos" = ?, "birthday" = ?, "mtime" = ?, "editor" = ? WHERE "siteid" LIKE ? AND "id" = ? ' ], 'search' => [ 'ansi' => ' SELECT msca.*, msca."care_fund", msca."insurance_number", msca."care_level" FROM "mshop_customer_address" msca :joins WHERE :cond ORDER BY :order OFFSET :start ROWS FETCH NEXT :size ROWS ONLY ', 'mysql' => ' SELECT msca.*, msca.`care_fund`, msca.`insurance_number`, msca.`care_level` FROM `mshop_customer_address` msca :joins WHERE :cond ORDER BY :order LIMIT :size OFFSET :start ' ], ], ], 'general' => [ 'name' => 'Myproject', //"Customer/Manager/Decorator/Myproject" 'decorators' => [ 'local' => ['Myproject'] ], 'insert' => [ 'ansi' => ' INSERT INTO "mshop_customer" ( :names "siteid", "email", "name", "salutation", "company", "vatid", "title", "firstname", "lastname", "address1", "address2", "address3", "postal", "city", "state", "countryid", "langid", "telephone", "mobile", "email", "telefax", "website", "longitude", "latitude", "birthday", "mtime", "editor", "created_at", "updated_at", "care_fund", "insurance_number", "care_level" ) VALUES ( :values ?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,? ) ' ], 'update' => [ 'ansi' => ' UPDATE "mshop_customer" SET :names "siteid" = ?, "email" = ?, "name" = ?, "salutation" = ?, "company" = ?, "vatid" = ?, "title" = ?, "firstname" = ?, "lastname" = ?, "address1" = ?, "address2" = ?, "address3" = ?, "postal" = ?, "city" = ?, "state" = ?, "countryid" = ?, "langid" = ?, "telephone" = ?, "mobile" = ?, "email" = ?, "telefax" = ?, "website" = ?, "longitude" = ?, "latitude" = ?, "birthday" = ?, "mtime" = ?, "editor" = ? WHERE "siteid" LIKE ? AND "id" = ? ' ], 'search' => [ 'ansi' => ' SELECT mcus.*, mcus."care_fund", mcus."insurance_number", mcus."care_level" FROM "mshop_customer" mcus :joins WHERE :cond ORDER BY :order OFFSET :start ROWS FETCH NEXT :size ROWS ONLY ', 'mysql' => ' SELECT mcus.*, mcus.`care_fund`, mcus.`insurance_number`, mcus.`care_level` FROM `mshop_customer` mcus :joins WHERE :cond ORDER BY :order LIMIT :size OFFSET :start ' ], ], ], ];
Re: address extention
Don't customize the SQL statements, only configure your decorators. The rest is done automatically if you've added the new columns to the database tables via the customer.php and order.php in the ./setup/default/schema/ directory of your extension.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star