Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Trouble getting price output and missing defines


Guest

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
Link to comment
Share on other sites

  • 2 weeks later...

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...