Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

Hi,

 

I don't think my question belonged in the MVS thread, so I made a new topic about it.

 

So basically I am trying to add product images for each product that is in packaging slip. I have got it working fine with 1 product (after loads of hours), but when there is more than 1 something goes wrong. Here is the code I am using at the moment:

 

       <?php        	
		$products_id_query = tep_db_query("select products_id from " . TABLE_ORDERS_PRODUCTS . " where orders_products_id = '" . $oID . "'");
		$products_id = tep_db_fetch_array($products_id_query);


      		$image_query = tep_db_query("select products_image from " . TABLE_PRODUCTS . " where products_id = '" . $products_id['products_id'] . "'");

		$thumb_image = tep_db_fetch_array($image_query);

	echo tep_image(DIR_WS_CATALOG . DIR_WS_IMAGES . $thumb_image['products_image'], $oID, SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT);
      ?>

 

I'm not very good with using while and stuff, so can anyone help me fix this so that it works no matter how many products there are? :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

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...