Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

adding column to cart contents


Tabula_Rasa

Recommended Posts

I've added several fields and data to the TABLE_PRODUCTS table in mySQL using the 'New Fields' contribution for Easy Populate... which is great and I have no problems with it.

 

However, though I've been able to work in the fields to display on other pages, I'm having a hard time understanding how to do it in an additional column in the Cart Contents page (shopping_cart.php).

 

The column's there and I have a line that says $cutpn = 'cutpn = null' as a placeholder.

 

What I don't understand is how to do a db query where the value is worked into the array, $products[$i]['something']

 

Here's what I need to do:

 

For every product in the cart to be displayed, what is the "cutrate Part Number" (products_cutpn) which is located in TABLE_PRODUCTS?

 

This has to be added to the $products[$i] array.

 

Unfortunately, I'm too much of a PHP mid-newbie to figure out how to do this and I've been going at it for a couple of days that my client doesn't have.

 

Any help would be much appreciated.

 

Thank you.

 

- Sean Rice

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...