Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

help with PHP code


taj120

Recommended Posts

can anybody please tell me whats wrong with this code

 

define('HEADING_TITLE', '<h6>'.STORE_NAME.'<br>'.nl2br(STORE_NAME_ADDRESS).'<br>Email: <a href="mailto:'.STORE_OWNER_EMAIL_ADDRESS.'">'.STORE_OWNER_EMAIL_ADDRESS.'</a><br><br>ENTER SOME TEXT HERE</h6><br>');

 

this is how it looks on site

 

<h6>Babys-Essentials<br>Babys-Essentials

41,Elwy Drive, Rhyl,

Denbighshire.

LL184AA

N. Wales UK<br>Email: <a href="mailto:sales@babys-essentials.com">sales@babys-essentials.com</a><br><br>ENTER SOME TEXT HERE</h6><br>

 

thanks guys

Link to comment
Share on other sites

can anybody please tell me whats wrong with this code

 

define('HEADING_TITLE', '<h6>'.STORE_NAME.'<br>'.nl2br(STORE_NAME_ADDRESS).'<br>Email: <a href="mailto:'.STORE_OWNER_EMAIL_ADDRESS.'">'.STORE_OWNER_EMAIL_ADDRESS.'</a><br><br>ENTER SOME TEXT HERE</h6><br>');

 

this is how it looks on site

 

<h6>Babys-Essentials<br>Babys-Essentials

41,Elwy Drive, Rhyl,

Denbighshire.

LL184AA

N. Wales UK<br>Email: <a href="mailto:sales@babys-essentials.com">sales@babys-essentials.com</a><br><br>ENTER SOME TEXT HERE</h6><br>

 

thanks guys

 

You are using the < tag mixed in with the html tags. This will cause the < symbol to be viewed but not work as html and the tags are invalid which is why they are visible. Use a real < in place of your <

 

You are also using the <h6> tag for the whole thing. This is bold, but small. You may want to put the store name in <h1>, <h2>, or <h3> and don't include the rest inside the header tags. <h2>'.STORE_NAME.'</h2><br>

 

Here is your code corrected:

 

define('HEADING_TITLE', '<h6>'.STORE_NAME.'<br>'.nl2br(STORE_NAME_ADDRESS).'<br>Email: <a href="mailto:'.STORE_OWNER_EMAIL_ADDRESS.'">'.STORE_OWNER_EMAIL_ADDRESS.'</a><br><br>ENTER SOME TEXT HERE</h6><br>');

 

 

Here it is with just the store name in <h2>:

 

define('HEADING_TITLE', '<h2>'.STORE_NAME.'</h2><br>'.nl2br(STORE_NAME_ADDRESS).'<br>Email: <a href="mailto:'.STORE_OWNER_EMAIL_ADDRESS.'">'.STORE_OWNER_EMAIL_ADDRESS.'</a><br><br>ENTER SOME TEXT HERE<br>');

Link to comment
Share on other sites

Too much space between store name and address section. I removed the break behind the </h2> tag.

 

 

define('HEADING_TITLE', '<h2>'.STORE_NAME.'</h2>'.nl2br(STORE_NAME_ADDRESS).'<br>Email: <a href="mailto:'.STORE_OWNER_EMAIL_ADDRESS.'">'.STORE_OWNER_EMAIL_ADDRESS.'</a><br><br>ENTER SOME TEXT HERE<br>');

Link to comment
Share on other sites

Too much space between store name and address section. I removed the break behind the </h2> tag.

 

 

define('HEADING_TITLE', '<h2>'.STORE_NAME.'</h2>'.nl2br(STORE_NAME_ADDRESS).'<br>Email: <a href="mailto:'.STORE_OWNER_EMAIL_ADDRESS.'">'.STORE_OWNER_EMAIL_ADDRESS.'</a><br><br>ENTER SOME TEXT HERE<br>');

 

 

thanks very much sandman but unfortunately I wont be able to try it due to a big coding error/ or lack of coding in my template. looks like I'm going to have to start from scratch with new template (bummer)

will post the out come and info asap

 

thanks again for taking the time

Link to comment
Share on other sites

  • 1 year later...

I realize this is an old post, but I thought I'd give it a shot.

 

Why does it list the website name twice? What do you have to change to make it say, using the example above, "Babys-Essentials" only once?

 

thanks very much sandman but unfortunately I wont be able to try it due to a big coding error/ or lack of coding in my template. looks like I'm going to have to start from scratch with new template (bummer)

will post the out come and info asap

 

thanks again for taking the time

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...