Change Standarts Adding A New Product

Hi,



i want to chance 2 fields when i add a new product.



The status of the Product from Active to Disabled and the Tax should be selected automatically.



I changed this in the database, but it isn´t working. Has anybody an idea how to get this work?



Thanks for helping :-)

Products_Products_-Administration_panel-_2015-04-29_10.48.11.png

If you are familiar with PHP hooks, we suggest you to use the update_product_pre hook which is located in the fn_update_product function (app/functions/fn.catalog.php)

[quote name='eComLabs' timestamp='1430300068' post='212913']

If you are familiar with PHP hooks, we suggest you to use the update_product_pre hook which is located in the fn_update_product function (app/functions/fn.catalog.php)

[/quote]



Thank you for your fast answer. I am afraid i don´t know how to to this there. Is there any other way?

Please open the design\backend\templates\views\products\update.tpl file and add this code:



{if $runtime.mode == 'add'}
{$product_data.status = 'D'}
{/if}




before this line:



{include file="common/select_status.tpl" input_name="product_data[status]" id="elm_product_status" obj=$product_data hidden=true}




and replace:








with:








Do not forget to clear the cache then

[quote name='eComLabs' timestamp='1430305314' post='212928']

Please open the design\backend\templates\views\products\update.tpl file and add this code:



{if $runtime.mode == 'add'}
{$product_data.status = 'D'}
{/if}




before this line:



{include file="common/select_status.tpl" input_name="product_data[status]" id="elm_product_status" obj=$product_data hidden=true}




[/quote]





Hi, i tested this, but it isn't working. Is it possible that the problem is in the /design/backend/templates/common/select_status.tpl ?



The Tax Modification isn't working too. I am sorry, but have you any other ideas for this?

I have just tested it and it works on my local installation. What CS-Cart version do you use? Please also try to clear the cache

[quote name=‘eComLabs’ timestamp=‘1430322531’ post=‘212974’]

I have just tested it and it works on my local installation. What CS-Cart version do you use? Please also try to clear the cache

[/quote]



Hi, i use Version 4.2.2 of CS-Cart. I cleared CS-Cache and Browser-Cache, but i am sorry to say that it isn´t working :-(

[quote name=‘redtagx’ timestamp=‘1430325415’ post=‘212984’]

Hi, i use Version 4.2.2 of CS-Cart. I cleared CS-Cache and Browser-Cache, but i am sorry to say that it isn´t working :-(

[/quote]



If you provide us with the temporary FTP access to your server, we can check why these changes do not work on your installation

[quote name='eComLabs' timestamp='1430387578' post='213045']

If you provide us with the temporary FTP access to your server, we can check why these changes do not work on your installation

[/quote]



This is great, i´ll send you an pm.

[quote name='redtagx' timestamp='1430475454' post='213136']

This is great, i´ll send you an pm.

[/quote]



Done. Please check

[quote name=‘eComLabs’ timestamp=‘1430825520’ post=‘213450’]

Done. Please check

[/quote]



Thank you very much. It is working. :-) :-) :-)