add one input box or select box in Admin Panel -> Product.
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!
add one input box or select box in Admin Panel -> Product.
I want to add one input box or select box in Admin Panel -> Product. Furthermore got this value on the following place:
Frontend -> product listing and product detail page
Admin panel Backend -> Product listing area (where we click on edit product)
I created custom extension and override the template and view of frontend.
but stuck on this part. can anyone provide me step by step guide or help? Thanks for the cooperation
Frontend -> product listing and product detail page
Admin panel Backend -> Product listing area (where we click on edit product)
I created custom extension and override the template and view of frontend.
but stuck on this part. can anyone provide me step by step guide or help? Thanks for the cooperation
Re: add one input box or select box in Admin Panel -> Product.
Can you post what you already have changed or overwritten?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: add one input box or select box in Admin Panel -> Product.
sure.
First i added "./ext/custom extension/lib/custom/src/MShop/Product/Manager/Myproject.php"
Input box is added and value is storing on the mshop_product table. but new problem is that it's only storing basic tab information. I added the value in price, category etc but its not saving
First i added "./ext/custom extension/lib/custom/src/MShop/Product/Manager/Myproject.php"
Code: Select all
public function saveItem(\Aimeos\MShop\Common\Item\Iface $item, $fetch = true)
{
$iface = '\\Aimeos\\MShop\\Product\\Item\\Iface';
if (! ($item instanceof $iface)) {
throw new \Aimeos\MShop\Product\Exception(sprintf('Object is not of required type "%1$s"', $iface));
}
if (!$item->isModified()) {
return $item;
}
$context = $this->getContext();
$dbm = $context->getDatabaseManager();
$dbname = $this->getResourceName();
$conn = $dbm->acquire( $dbname );
try {
$id = $item->getId();
$date = date('Y-m-d H:i:s');
if ($id === null) {
$path = 'mshop/product/manager/standard/insert';
} else {
$path = 'mshop/product/manager/standard/update';
}
$stmt = $this->getCachedStatement($conn, $path);
$stmt->bind(1, $item->getMLPrice());
$stmt->bind(2, $item->getUserId());
$stmt->bind( 3, $item->getType() );
$stmt->bind( 4, $item->getCode() );
$stmt->bind( 5, $item->getLabel() );
$stmt->bind( 6, $item->getStatus(), \Aimeos\MW\DB\Statement\Base::PARAM_INT );
$stmt->bind( 7, $item->getDateStart() );
$stmt->bind( 8, $item->getDateEnd() );
$stmt->bind( 9, json_encode( $item->getConfig() ) );
$stmt->bind( 10, $date ); // mtime
$stmt->bind( 11, $context->getEditor() );
$stmt->bind( 12, $item->getTarget() );
$stmt->bind( 13, $context->getLocale()->getSiteId(), \Aimeos\MW\DB\Statement\Base::PARAM_INT );
if( $id !== null ) {
$stmt->bind( 14, $id, \Aimeos\MW\DB\Statement\Base::PARAM_INT );
$item->setId( $id ); //so item is no longer modified
} else {
$stmt->bind( 14, $date ); // ctime
}
$stmt->execute()->finish();
if( $id === null && $fetch === true )
{
$path = 'mshop/product/manager/standard/newid';
$item->setId( $this->newId( $conn, $path ) );
}
$dbm->release( $conn, $dbname );
} catch (\Exception $e) {
$dbm->release( $conn, $dbname );
throw $e;
}
return $item;
}
Re: add one input box or select box in Admin Panel -> Product.
Extend the manager by your new column this way:
https://aimeos.org/docs/Developers/Libr ... s#Easy_way
Otherwise, you need to copy the whole saveItem() method including that lines:
https://github.com/aimeos/aimeos-core/b ... #L643-L644
https://aimeos.org/docs/Developers/Libr ... s#Easy_way
Otherwise, you need to copy the whole saveItem() method including that lines:
https://github.com/aimeos/aimeos-core/b ... #L643-L644
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: add one input box or select box in Admin Panel -> Product.
Thanks to guide and this issue has been resolved.