Hello! I import products from my crm to cs cart. Some products have no price or have 0 price. How can i hide these products?
You can search product with 0 price and bulk change the status to hidden.
i need it to be done automatically
What cs-cart version are you using?
—
Valentin
[color=#808080][size=2]part of hungryweb.net[/size][/color]
v 4.03
- enable My Changes addon
- add to app/addons/my_changes/init.php```php
if (!defined('BOOTSTRAP')) { die('Access denied'); }
fn_register_hooks(
'get_products'
);
```
3. add to app/addons/my_changes/func.php```php
<?php
if (!defined('BOOTSTRAP')) { die('Access denied'); }
function fn_my_changes_get_products($params, $fields, $sortings, $condition, $join, $sorting, $group_by, $lang_code, $having){
if(AREA == 'C'){
$condition .= db_quote(' AND prices.price > 0');
}
}
```
4. clear cache from backend [color=#ff0000]?cc&ctpl[/color]
5. have fun
6. repeat step 5

---
Valentin
[color=#808080][size=2]part of hungryweb.net[/size][/color]
thanks Valentin, i did exactly how you showed but the products are still active:
Компьютерные комплектующие оптом. Купить комплектующие для компьютера у поставщика со склада в Москве.
should the current products with 0 price become hidden or only newly imported?