Jump to content
Sign in to follow this  
tjd

Trouble getting price output and missing defines

Recommended Posts

TEXT_PRODUCTS_INVENTORY_COST

 

pops up in the admin>categories/products review window under the thumbnail of the product. Can't find anywhere it's generated and can't find it as a string. Going nuts. What to do?

 

This what we see:

 

leather/2005_1023_075605S.jpg

 

Price: ?19.99

TEXT_PRODUCTS_INVENTORY_COST ?8.00

Quantity: 1

 

Average Rating: 0.00%

 

 

 

Next, although the cost of goods entered in the input box in the product edit input area comes up on the preview window of categories/products, it doesn't show in the report, nor is it in the db.

 

I am using an Ultra pics contrib by the way.

 

Regards

Edited by tjd

"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety."

B. Franklin

Share this post


Link to post
Share on other sites

Hi!

 

Thanx for the great contribution. Quite many people have asked how to inherit fields in different categories. I did a tiny modification to admin/categories.php and it seems to be working. My rationale is to simply go through all the top level categories and if an extra field is found it will be included on the add/update product page. All the categories are included in cPath.

 

So find:

 

$extra_fields_query = tep_db_query("SELECT products_extra_fields_id, products_extra_fields_name, products_extra_fields_category, products_extra_fields_type, products_extra_fields_order, products_extra_fields_status  from " . TABLE_PRODUCTS_EXTRA_FIELDS . " where products_extra_fields_category = " . (int)$current_category_id . " ORDER BY products_extra_fields_order");

 

and replace it with:

 

$catIDs= str_replace("_",",",$HTTP_GET_VARS['cPath']);
$extra_fields_query = tep_db_query("SELECT products_extra_fields_id, products_extra_fields_name, products_extra_fields_category, products_extra_fields_type, products_extra_fields_order, products_extra_fields_status  from " . TABLE_PRODUCTS_EXTRA_FIELDS . " where products_extra_fields_category IN (".$catIDs.") ORDER BY products_extra_fields_order");

 

Very simple solution. I've just tried it and it seems to be working. Please test it and post your comments here.

 

Cheers,

 

Jani

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  

×