alibaabaa Posted December 28, 2005 Share Posted December 28, 2005 I know this is simple in HTML but am kind of struggling with the way this is done in PHP. Thanks in advance E Link to comment Share on other sites More sharing options...
AlanR Posted December 28, 2005 Share Posted December 28, 2005 Look at the function which draws the checkbox, it's in includes/functions/html_output.php // Output a form checkbox field function tep_draw_checkbox_field($name, $value = '', $checked = false, $parameters = '') { return tep_draw_selection_field($name, 'checkbox', $value, $checked, $parameters); Then look at the function call in /catalog/create_account.php <td class="main"><?php echo tep_draw_checkbox_field('newsletter', '1') . ' ' . (tep_not_null(ENTRY_NEWSLETTER_TEXT) ? '<span class="inputRequirement">' . ENTRY_NEWSLETTER_TEXT . '</span>': ''); ?></td> The important bit is: tep_draw_checkbox_field('newsletter', '1') , no default is defined so you can add it like so... tep_draw_checkbox_field('newsletter', '1', true) Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management) Link to comment Share on other sites More sharing options...
alibaabaa Posted December 28, 2005 Author Share Posted December 28, 2005 thanks. you look like you know what you are doing. maybe you can help with a long standing quey I have had. If you look look at my site www.baabaacards.co.uk and look at any of the catagories there is a card and the name, price and buy now to the right of it in a table. I would love to put the latter in a row under the image, like on product_info but cannot find where the code is drawn from as you call it. any ideas? many thanks Link to comment Share on other sites More sharing options...
AlanR Posted December 28, 2005 Share Posted December 28, 2005 Same idea basically... Look the html source in your browser to figure out which file is drawing those elements. <tr class="productListing-odd"> <td align="center" class="productListing-data"> <a href="http://www.baabaacards.co.uk/catalog/product_info.php?cPath=30&products_id=54"><img'>http://www.baabaacards.co.uk/catalog/product_info.php?cPath=30&products_id=54"><img src="images/redbeadedheart.jpg" border="0" alt="Red Beaded Heart" title=" Red Beaded Heart " width="200" height="200"></a> </td> <td class="productListing-data"> <a href="http://www.baabaacards.co.uk/catalog/product_info.php?cPath=30&products_id=54">Red'>http://www.baabaacards.co.uk/catalog/product_info.php?cPath=30&products_id=54">Red Beaded Heart</a> </td> <td align="right" class="productListing-data"> ?3.50 </td> <td align="center" class="productListing-data"><a href="http://www.baabaacards.co.uk/catalog/index.php?cPath=30&sort=2a&action=buy_now&products_id=54"><img src="includes/languages/english/images/buttons/button_buy_now.gif" border="0" alt="Buy Now" title=" Buy Now " width="28" height="14"></a> </td> </tr> It's href="http://www.baabaacards.co.uk/catalog/product_info.php so you need to go into product_info.php and tinker around to create a new row under the image. That's html. Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management) Link to comment Share on other sites More sharing options...
alibaabaa Posted December 28, 2005 Author Share Posted December 28, 2005 [ It's href="http://www.baabaacards.co.uk/catalog/product_info.php so you need to go into product_info.php and tinker around to create a new row under the image. That's html. Okay, product_info.php is how I want it to look, and it is easy to change the html on that. But index.php is where the initial product is first shown in it's catagory. It is a bit different I think. I have spent a long time looking for where this table is created but have come up blank so far. thanks Link to comment Share on other sites More sharing options...
alibaabaa Posted December 28, 2005 Author Share Posted December 28, 2005 as far as I can tell the whole thing is called by <?php include(DIR_WS_MODULES . FILENAME_PRODUCT_LISTING); ?> but in includes/modules/product_listing.php there are not tables to edit just lots of PHP Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.