Jump to content
Sign in to follow this  
JangoF

Product Images in Packaging Slip

Recommended Posts

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? :)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×