Hi everyone,
i am new to cs-cart. i am trying to developing a addon for Filling section but its not working. my code detail is given below.
addons/MYADDON2011/schemas/block_manager/specific_settings.post.php
```php
if ( !defined('AREA') ) { die('Access denied'); }
$schema['fillings']['MYADDON2011'] = array (
'limit' => array (
'type' => 'input',
'default_value' => 9,
)
);
?>
```
addons/MYADDON2011/schemas/block_manager/structure.post.php
```php
if ( !defined('AREA') ) { die('Access denied'); }
$schema['products']['fillings']['MYADDON2011'] = array (
'params' => array (
'request' => array(
'MYADDON2011_for_product_id' => '%PRODUCT_ID%',
'item_ids' => array ()
),
),
'locations' => array(
'products'
),
'update_handlers' => array ('MYADDON2011'),
);
?>
```
addons/MYADDON2011/init.php
```php
if ( !defined('AREA') ) { die('Access denied'); }
fn_register_hooks(
'get_products'
);
?>
```
addons/MYADDON2011/func.php
```php
if ( !defined('AREA') ) { die('Access denied'); }
function fn_MYADDON2011_get_products(&$params, &$condition)
{
if (!empty($params['MYADDON2011_for_product_id'])) {
$CID_ = db_get_fields("SELECT category_id FROM ?:products_categories WHERE product_id = ?i AND link_type = 'M'", $params['MYADDON2011_for_product_id']);
$All_C_P = db_get_fields("SELECT product_id FROM ?:products_categories WHERE category_id = ?i AND link_type = 'M' AND product_id != ?i ",$CID, $params['MYADDON2011_for_product_id'] );
//
//
//$All_C_P => My custom functions on $All_C_P to get products according to my need
//
//
$params['item_ids'] => $All_C_P
}
return true;
}
?>
```
but when i add this block to my product page, but it doesn't show any product
please correct my where i am wrong.
i shall be thankful.
Albela