Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Simple PHP help


rdracing

Recommended Posts

Posted

So I'm no php expert, but i can usually fumble my way through code to make the changes I need to work.

 

I've tried this one for a couple days and can't seem to figure it out.

 

All I want to do is to display the Model under the name in the includes\modules\product_listing.php page similar to the product_info.php page does.

I have removed the description code <td style="height:140px" >'.$p_desc.'<br></td> and changed it to <td style="height:25px" >'.$p_model.'<br></td> but that just leaves a 25px white space in the info box. I imagine I must not be query the database for the model info, but i'm just not sure how it need to be written.

 

I need it to put the model just under the stock number in the orange text here:

http://66.165.69.35/catalog/

 

Like it does here where is says [Akrobins] in the braces:

http://66.165.69.35/Catalog/product_info.p...7a32d0ab2d9c1fe

 

Thanks for any help you may offer!

 

RonD

Posted

Okay, now I got the [] brackets to show up but still no model number.

I added <br><span class="smallText">[' . $product_info['products_model'] . ']</span> to the includes/modules/product_listing.php

 

http://66.165.69.35/Catalog/index.php?cPath=23_37

 

If I only knew how to query the database properly for the model number information I believe I would be all set!

 

RonD

Posted
Okay, now I got the [] brackets to show up but still no model number.

I added <br><span class="smallText">[' . $product_info['products_model'] . ']</span> to the includes/modules/product_listing.php

 

http://66.165.69.35/Catalog/index.php?cPath=23_37

 

If I only knew how to query the database properly for the model number information I believe I would be all set!

 

RonD

 

try $listing['products_model']

Posted

Thanks FWR Media but I get the same results changing the code to $listing['products_model']. Just empty brackets []?

It just seems that the DB is not being queried properly.

I have tried adding (p.products_model,) to the DB query but it will not find the table.

 

The query looks like this in it's original form:

$product_query = tep_db_query("select products_description, products_id from " . TABLE_PRODUCTS_DESCRIPTION . " where products_id = '" . (int)$listing['products_id'] . "' and language_id = '" . (int)$languages_id . "'");

 

I have tried adding a raw query using: ...from . TEXT_PRODUCTS_MODEL . but that won't work either?

Archived

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

×
×
  • Create New...