danitrin Posted August 3, 2006 Share Posted August 3, 2006 I need to be able to add a link to another page or a pop up for some of my products to explain sizing information. The sizing information varies based on manufacturer so I need to be able to only show the sizing info relevant for each product. It would be nice to be able to add the link in between Reviews and Add to Cart on the Product_Info page. I've looked through many of the contributions and the forums trying to decipher which contribution would be my best route, but there is so much stuff out there it's overwhelming. Does anyone have any suggestions on how to go about this? This is the web address: www.thedapperdog.net Link to comment Share on other sites More sharing options...
Gil_e_n Posted August 3, 2006 Share Posted August 3, 2006 I don't actually know which contribution would be the best for this either. What I'm thinking might work, though, is something like this: <td class="main"><?php echo '<a href="java script:popupWindow(\\\' ' . tep_href_link(FILENAME_SIZE_POPUP , 'manufacturerID=' . $product_info['manufacturers_id']) . '\\\')">' . TEXT_SIZING_INFORMATION . '</a>'?></td> After the product review cell in product_info.php. Then create a popup and program it so that it reflects the right sizing chart for each manufacturer id. I. Um. Would help more if my brain hadn't just died. Always BACK UP your files and your database before making any changes. Before asking questions, check out the Knowledge Base. Check out the contributions to see if your problem's solved there. Search the forums. Useful threads: Store Speed Optimization How to make a horrible shop Basics for design change How to search the forums Useful contributions: Easypopulate Fast, Easy Checkout Header Tag Controller Link to comment Share on other sites More sharing options...
danitrin Posted August 4, 2006 Author Share Posted August 4, 2006 This is a good start, how do I program it to know which manf id page to open? Link to comment Share on other sites More sharing options...
Gil_e_n Posted August 4, 2006 Share Posted August 4, 2006 Hm. I'd personally just model it after popup_image. Add a field to your manufacturer (or manufacturer description if you use multiple languages) called manufacters_sizing or something of the sort and open popup image in your php editor. Change this: $products_query = tep_db_query("select pd.products_name, p.products_image from " . TABLE_PRODUCTS . " p left join " . TABLE_PRODUCTS_DESCRIPTION . " pd on p.products_id = pd.products_id where p.products_status = '1' and p.products_id = '" . (int)$HTTP_GET_VARS['pID'] . "' and pd.language_id = '" . (int)$languages_id . "'"); $products = tep_db_fetch_array($products_query); to $manufacturer_query = tep_db_query("select pd.manufacturers_name, p.manufacturers_sizing from " . TABLE_MANUFACTURER . " where p.manufacturers_id = '" . (int)$HTTP_GET_VARS['manufacturersID'] . "'"); $manufacturer = tep_db_fetch_array($manufacturer_query); Then, just instead of <?php echo tep_image(DIR_WS_IMAGES . $products['products_image'], $products['products_name']); ?> it would be something like this: <?php echo stripslashes($manufacturer['manufacturers_sizing']); ?> And then just save it as popup_sizing and see if it'll work. This also has the benefit of letting you modify it in the admin section of the website once you reprogram it some, which is important to me, personally, because a lot of the day to day portion of updating the website is done by people who aren't really technically adept enough for me to let them touch even the includes/languages/english folder. Please note that I'm not that good with php, and really don't guarantee that this'll work without some work. Always BACK UP your files and your database before making any changes. Before asking questions, check out the Knowledge Base. Check out the contributions to see if your problem's solved there. Search the forums. Useful threads: Store Speed Optimization How to make a horrible shop Basics for design change How to search the forums Useful contributions: Easypopulate Fast, Easy Checkout Header Tag Controller Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.