Quick fix for v4.0.1 products position issue

Bug: http://forum.cs-cart…ion-not-saving/


  1. Modifying core file:

    #on file [color=#ff0000]app/functions/fn.catalog.php[/color]

    #after ```php


    $params[‘extend’][] = ‘companies’;

#addphp
if (!empty($params[‘cid’])) {

$params[‘extend’][] = ‘categories’;

}

<br />
2. Using hooks:<br />
#on file [color=#ff0000]app/addons/my_changes/init.php[/color]<br />
#add```php
<br />
<?php<br />
if (!defined('BOOTSTRAP')) { die('Access denied'); }<br />
fn_register_hooks(<br />
	 'get_products_pre'<br />
);<br />

```<br />
<br />
PS: if file is present just add [color=#ff0000]'get_products_pre'[/color]<br />
<br />
#on file [color=#ff0000]app/addons/my_changes/func.php[/color]<br />
#add```php
<br />
<?php<br />
if (!defined('BOOTSTRAP')) { die('Access denied'); }<br />
function fn_my_changes_get_products_pre($params, $items_per_page, $lang_code){<br />
if(AREA=='A'){<br />
	 if (!empty($params['cid'])) {<br />
	  $params['extend'][] = 'categories';<br />
  }<br />
}<br />
}<br />

```<br />
<br />
PS: if file is present just add function [color=#ff0000]fn_my_changes_get_products_pre[/color]<br />
<br />
<br />
I hope that helps,<br />
<br />
---<br />
Valentin<br />
[color=#808080][size=2]part of hungryweb.net[/size][/color]