Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Model Number in Admin/Categories listing?


fiscus

Recommended Posts

I am trying to get my admin menu to display the model number as well as the text description when editing the catalog (ie. admin/categories.php?cPath=1_3)

 

We mainly used model numbers to identify our products rather than using the text descritions so it will be more usefull if the model number is there as well.

 

I know I have to edit admin/categories.php and atm i have found the line that I need to edit:

 

easiest way to find it is do a search for preview.gif and it is the second instance.

 

 

Towards the end of the line there is

 

'</a> ' . $products['products_name']; ?></td>

 

I have changed that to

 

'</a> ' . $products['products_name'],' ' . $products['products_model']; ?></td>

 

This still doesn;t give me a model number (do error but no model either). If I substitue the $products['products_model'] for products_name I do get a repeat of the product name so I would have thought this would work?

 

I must be close, any ideas?

 

Thanks

Link to comment
Share on other sites

I know I probably have to add another statement//array above this line as well (as far as I can see the syntax on the line I have already edited is correct)

 

Can anyone help with the additional line?

Link to comment
Share on other sites

Look a few lines above that for where the $products_query = line is and verify that the products_model field is included in the field list.

 

Otherwise what you have should work.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

Glad to help. :)

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

i played with this one and was not able to get it either.

 

Yeah I had a look at it this morning - couldn;t seem to get it either.

 

I'm going to have another play with it now but if anyone can help with the actual code that would be great.

Link to comment
Share on other sites

I saw

 

ORDER BY products_name ASC

 

In a SQL statement today? Can I used this for what I want to do?

 

Can I incorporate this into the code to get it to list by the model numbers now? (please read above for me ocde and what I have done)

 

Many Thanks

Link to comment
Share on other sites

Yep, change the order by clause to specify the products_model field vice the products_name field and that should do it.

 

Note the ASC defines that the list should be sorted ascendingly and DES will sort the list descendingly.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

If you keep working with the files taking things slowly before long you will be the one offering the help here. :)

 

Just be sure to bookmark the PHP manual and MySQL manuals for quick reference. Between the two of those you should be able to figure out just about anything. ;)

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...