Adding a cost field

I want to add a cost field for the products and this field will be also in the csv import/export area,so: I will import my suppliers’ prices to cs-cart as a cost.



To do this: I’ve found some forum link:



[url]http://forum.cs-cart.com/showthread.php?t=22732&highlight=cost[/url]



first post(brandonvd post).



To achieve my aim : the steps 1,2,3,5 will be enough? I don’t want to play with the list price field just trying to add a cost field so: no need to apply the step 4 right?



And, this mod is still working for the latest versions?



Thank you,

Step 4 is only for adding the cost field to the product manager page. I don’t use the list price field so it was better for me to replace it with the cost field.



If you don’t want to remove the list price field, then don’t do step 4.



Also, I’m using that mod on a couple of stores running 2.1.4 right now.



Hope that helps,



Brandon

Thanks for your reply,Brandon.



I want to add cost field to the product manager but also not to remove list price field.



If applying the step 4 , cost price will be added but list price will be removed.



And,if we will use both of variables, we will have a width problem how it can be resolved?



Thanks,

[url]http://forum.cs-cart.com/showthread.php?t=22732&highlight=cost[/url]

see my post for adding the field insteed of change it with listprice

Hi Elk,



I got it how we set the width of the coloumn or how to fit the content.



“”““if you want to make the width smaller: at the …/manage.tpl

at the



change the input-text-medium to input-text or input-text-short for even smaller””"



But,how about adding cost field without removing list price?We need to play with the codes in the step 4? am I wrong?



If I missed anything sorry about that.

any idea?

Can anyone in the forum help us?



Thanks,

[quote name=‘getreal’]Can anyone in the forum help us?



Thanks,[/QUOTE]



i have added the lines for the cost under the price list. only thing i have not fixed is that i can’t seem to import/export with a cost. but everything else works. there must be a another template or php file that needs to be updated to download/upload cost from data base . still looking for that.:wink:

[quote name=‘getreal’]Hi Elk,



I got it how we set the width of the coloumn or how to fit the content.



“”““if you want to make the width smaller: at the …/manage.tpl

at the



change the input-text-medium to input-text or input-text-short for even smaller””"



But,how about adding cost field without removing list price?We need to play with the codes in the step 4? am I wrong?



If I missed anything sorry about that.[/QUOTE]



You should ask Snorocket as his Profit Addon has a cost field so maybe purchasing that will resolve your issues.

To add the cost field to your import export you need to modify the file:



schemas/exim/products.php



Below:


'List price' => array (
'db_field' => 'list_price',
'convert_put' => array ('fn_exim_import_price', '@price_dec_sign_delimiter'),
'process_get' => array ('fn_exim_export_price', '#this', '@price_dec_sign_delimiter'),
),




Add:


'Cost' => array (
'db_field' => 'cost',
'convert_put' => array ('fn_exim_import_price', '@price_dec_sign_delimiter'),
'process_get' => array ('fn_exim_export_price', '#this', '@price_dec_sign_delimiter'),
),




Hope that helps,



Brandon

[quote name=‘brandonvd’]To add the cost field to your import export you need to modify the file:



schemas/exim/products.php



Below:


'List price' => array (
'db_field' => 'list_price',
'convert_put' => array ('fn_exim_import_price', '@price_dec_sign_delimiter'),
'process_get' => array ('fn_exim_export_price', '#this', '@price_dec_sign_delimiter'),
),




Add:


'Cost' => array (
'db_field' => 'cost',
'convert_put' => array ('fn_exim_import_price', '@price_dec_sign_delimiter'),
'process_get' => array ('fn_exim_export_price', '#this', '@price_dec_sign_delimiter'),
),




Hope that helps,



Brandon[/QUOTE]



yes thats what i was looking for. imputed and it works like a charm thanks:D :mrgreen:

Attached is a cost addon that I have on an Ultimate edition and should work.



Thanks,



Brandon

Cost.zip

Why cant CS-Cart just add a cost field already? Every other shopping cart have this. Do we really need a hack for such a basic feature?

In Magento or BigCommerce I can do inventory in seconds, with CS-Cart it takes me hours.

[quote name='brandonvd' timestamp='1377527523' post='167381']

Attached is a cost addon that I have on an Ultimate edition and should work.



Thanks,



Brandon

[/quote]



Hi Brandon,



Do you have this addon for 4x?