Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Where is $products[$i]['image'] defined


robertwein

Recommended Posts

Posted

Hi Everybody

 

I have narrowed down the problem to a variable not being populated with a value from the database, but for the life of me I can't figure it out. I haven't modified the code in this area at all, so I don't believe I screwed it up.

 

On (my) line 117 in shopping_cart.php the $products[$i]['image'] and $products[$i]['name'] appear when the user views their shopping cart. The name shows up perfectly, but the image is empty. The ALT value is populated, but not the filename.

 

The query immediately above it runs the following, but I can't find where it is breaking (if it is here at all).

 

Help?!

 

$attributes = tep_db_query("select popt.products_options_name, poval.products_options_values_name, pa.options_values_price, pa.price_prefix

from " . TABLE_PRODUCTS_OPTIONS . " popt, " . TABLE_PRODUCTS_OPTIONS_VALUES . " poval, " . TABLE_PRODUCTS_ATTRIBUTES . " pa

where pa.products_id = '" . $products[$i]['id'] . "'

and pa.options_id = '" . $option . "'

and pa.options_id = popt.products_options_id

and pa.options_values_id = '" . $value . "'

and pa.options_values_id = poval.products_options_values_id

and popt.language_id = '" . $languages_id . "'

and poval.language_id = '" . $languages_id . "'");

$attributes_values = tep_db_fetch_array($attributes);

 

$products[$i][$option]['products_options_name'] = $attributes_values['products_options_name'];

$products[$i][$option]['options_values_id'] = $value;

$products[$i][$option]['products_options_values_name'] = $attributes_values['products_options_values_name'];

$products[$i][$option]['options_values_price'] = $attributes_values['options_values_price'];

$products[$i][$option]['price_prefix'] = $attributes_values['price_prefix'];

Archived

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

×
×
  • Create New...