ultrandy Posted April 22, 2010 Share Posted April 22, 2010 Hi I have 1/2 of my listings with frames and a 1/2 without. I was wondering if there was a way, or is there a contribution where I could just put a little pic that shows the sizes of frames (so I need to display a linked image) on my product_info.php. I understand I can go manually into each listing, but I just need like a checkbox in my admin.. Really it breaks down into a if/then statement of displaying this sizing chart lol. Any ideas on where to look for this?! I don't need anything robust, thank you so much for your help, you guys are the best community around!!! :thumbsup: :rolleyes: :blush: ;) Thank you! Link to comment Share on other sites More sharing options...
burt Posted April 23, 2010 Share Posted April 23, 2010 Add a radio button to each product adding/editing page in admin, saying show frame or not. Appropriate database entry, tinyint, 0 or 1. Then grab the value and if it's 1 (or in other words "show"), the image is shown. That's not a lot of work, and all the code is already there for you to copy (just about). Link to comment Share on other sites More sharing options...
ultrandy Posted April 23, 2010 Author Share Posted April 23, 2010 Add a radio button to each product adding/editing page in admin, saying show frame or not. Appropriate database entry, tinyint, 0 or 1. Then grab the value and if it's 1 (or in other words "show"), the image is shown. That's not a lot of work, and all the code is already there for you to copy (just about). SO i'm editing admin/categories.php right? I found a similar radio button entry for the product status! Is this acceptable? <td class="main"><?php echo TEXT_PRODUCTS_STATUS; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_radio_field('products_status', '1', $in_status) . ' ' . TEXT_PRODUCT_AVAILABLE . ' ' . tep_draw_radio_field('products_status', '0', $out_status) . ' ' . TEXT_PRODUCT_NOT_AVAILABLE; ?></td> </tr> Does this make sense? <td class="main"><?php echo TEXT_FRAME_OPTIONS; ?></td> <td class="main"><?php echo tep_draw_separator('pixel_trans.gif', '24', '15') . ' ' . tep_draw_radio_field('products_frame', '1', $w_frame) . ' ' . TEXT_PRODUCT_W_FRAME . ' ' . tep_draw_radio_field('products_frame', '0', $wo_frame) . ' ' . TEXT_PRODUCT_WO_FRAME; ?></td> </tr> And then I have this right? if (!isset($pInfo->products_frame)) $pInfo->products_frame = '1'; switch ($pInfo->products_frame) { case '0': $w_frame = false; $w_frame = true; break; case '1': default: $w_frame = true; $wo_frame = false; } What should I put for the database table then? Sorry if its wrong, but I'm trying!! :) Thanks for your help!! Link to comment Share on other sites More sharing options...
ultrandy Posted April 24, 2010 Author Share Posted April 24, 2010 K I figured it out! Thanks for the tip! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.