View Single Post
  #11  
Old 11-24-2002, 09:53 AM
 
AJ AJ is offline
 

Member
  
Join Date: Oct 2002
Location: Marietta, Ohio
Posts: 25
 

Default

You're right. I don't think I've adequately explained it. I have added a column to the xcart_products table for "Unit of Issue" (unit). I needed to be able to tell the customer at a glance whether the item was a set of 4, set of 12, a dozen in a bag, etc.

But the unit column itself only contains unit codes (ST4, ST12, BG, etc). The full descriptive unit names (ie, Set of 4) are stored in a separate table that I created.

The ultimate goal is to add a line underneath the price of each product that says "Unit of issue: " and then insert the descriptive unit name, so that it reads something like "Unit of issue: Set of 4".

So I created a php file that would take the productid (which products.tpl already is using), then query the xcart_products table to determine the unitcode, then query the unit table to determine the full unit name and display it as "Unit of issue: Set of 4". Seemed pretty easy to me.

I figured I could just include that PHP file in the template right where I wanted it to appear, and that would be that. But since the PHP file can't use any Smarty variables, I'm stuck. Hope that clears things up a bit. I got confused just writing it
Reply With Quote