Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

account_create


alibaabaa

Recommended Posts

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

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

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

[

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...