Jump to content
Sign in to follow this  
markadams

Stocktaking Cost V0.3

Recommended Posts

Is there currently anyone supporting this mod, only i have just installed it and have an error i can't seem to fix.

 

1054 - Unknown column 'products_cost_price' in 'field list'

 

update products set products_quantity = '23', products_model = '', products_price = '0.8426', products_cost_price = '', products_date_available = null, products_weight = '15.00', products_status = '1', products_tax_class_id = '1', manufacturers_id = '', products_image = 'ceramic witches.JPG', products_last_modified = now() where products_id = '117'

 

[TEP STOP]

 

The above happens after clicking update from the product admin section.

I have uploaded the sql script and checked it was there.

One other thing was, on the product screen, the text_product_inventory_cost string is displayed instead of the text for that string...

Share this post


Link to post
Share on other sites

The first section is a solution to the Unknown column problem.

In 'admin/categories.php', search for this line:

'products_cost_price' => tep_db_prepare_input($HTTP_POST_VARS['products_price_cost']),

Exchange that line with:

'products_price_cost' => tep_db_prepare_input($HTTP_POST_VARS['products_price_cost']),

 

 

This is for that other problem.

And in the same file, search for this:

. TEXT_PRODUCT_INVENTORY_COST .

Exchange it with:

. TEXT_PRODUCTS_PRICE_COST .

 

 

That should solve it.

Edited by m-tias

Share this post


Link to post
Share on other sites

This a great contribution showing me my costs for products.

 

But I thought it was about time I ironed out some small bugs in my OSCommerce shop for the owner.

 

Just one annoyance of this is that when you now try and duplicate a product, this error message comes up...

 

--------------------------------

1054 - Unknown column 'products_price_cost' in 'field list'

 

select products_quantity, products_model, products_image, products_pdfupload, products_price_cost, products_price, products_date_available, products_weight, products_tax_class_id, manufacturers_id from products where products_id = '246'

 

[TEP STOP]

--------------------------------

 

I am sure it is just a small code change but I just cannot work it out.

 

Anyone ?

 

Thanks

Share this post


Link to post
Share on other sites
1054 - Unknown column 'p.products_cost' in 'field list'

 

select pd.products_name, pd.products_description, pd.products_url, p.products_id, p.products_quantity, p.products_model, p.products_image,p.products_price,p.products_cost, p.products_weight, p.products_date_added, p.products_last_modified, date_format(p.products_date_available, '%Y-%m-%d') as products_date_available, p.products_status, p.products_tax_class_id, p.manufacturers_id from products p, products_description pd where p.products_id = '36' and p.products_id = pd.products_id and pd.language_id = '4'

 

[TEP STOP]

 

 

I am having the same problem. At the time to edit a product appears this error.

 

We did the upgrade and remains the same mistake.

 

What should I do?

Share this post


Link to post
Share on other sites

I just discovered a major problem.

 

If you have 10 items worth $100 - the total stock value should be $1000

but if you have linked copy of the same item in 5 categories, your stock value will be listed as $5000 !

 

Could somebody php-competent please add a check that excludes already counted items ?

 

Please ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×