Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

problem with customizing homepage of oscommerce


tomliuwhite

Recommended Posts

Posted

I want to change the homepage of oscommerce. So I go to catalog/includes/languages/english/index.php and find define('TEXT_MAIN', 'This is a default setup?

 

I change the red text to my text, it is like: <table width="500" border="0" cellspacing="0" cellpadding="0">

<tr>

<td align="center" valign="top" class="c1">Welcome !</td>

</tr>

<tr>

<td align="left" valign="top" class="c2">Thank you for visiting. Our company, our product line, and our website are designed specifically for swim teams and swim clubs. Every one of our products has been thoroughly designed and tested with swim teams and clubs in mind. And, we sell them directly to you at a fraction of what you would pay at a traditional swim shop!

<p>Click on any of our product categories to see the difference.<br>

</p></td>

</tr>

<tr>

<td><table width="500" border="0" cellspacing="0" cellpadding="0">

<tr>

<td><img src="images/Accessories.jpg" width="160" height="160"></td>

<td><img src="images/custom-logo-items.jpg" width="160" height="160"></td>

<td><img src="images/goggles.jpg" width="160" height="160"></td>

</tr>

<tr>

<td><img src="images/men-swimsuit.jpg" width="160" height="160"></td>

<td><img src="images/silicone-caps.jpg" width="160" height="160"></td>

<td> </td>

</tr>

</table>

<span style='font-size:12.0pt;font-family:Arial;

mso-fareast-font-family:SimSun;mso-ansi-language:EN-US;mso-fareast-language:

ZH-CN;mso-bidi-language:AR-SA'><!--[if gte vml 1]><v:shapetype id="_x0000_t75"

coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe"

filled="f" stroked="f">

<v:stroke joinstyle="miter"/>

<v:formulas>

<v:f eqn="if lineDrawn pixelLineWidth 0"/>

<v:f eqn="sum @0 1 0"/>

<v:f eqn="sum 0 0 @1"/>

<v:f eqn="prod @2 1 2"/>

<v:f eqn="prod @3 21600 pixelWidth"/>

<v:f eqn="prod @3 21600 pixelHeight"/>

<v:f eqn="sum @0 0 1"/>

<v:f eqn="prod @6 1 2"/>

<v:f eqn="prod @7 21600 pixelWidth"/>

<v:f eqn="sum @8 21600 0"/>

<v:f eqn="prod @7 21600 pixelHeight"/>

<v:f eqn="sum @10 21600 0"/>

</v:formulas>

<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>

<o:lock v:ext="edit" aspectratio="t"/>

</v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" style='width:120pt;

height:120pt'>

<v:imagedata src="file:///D:\Temp\msohtml1\01\clip_image001.jpg" o:title="goggles"/>

</v:shape><![endif]-->

<![if !vml]>

<![endif]>

</span></td>

</tr>

</table>

This source code is from html page. But it can not work. And I get this error:

Parse error: parse error, unexpected T_STRING in /home/ben/public_html/oscommerce/includes/languages/english/index.php on line 38

 

What shall I do? Many thanks in advance

Posted

TEXT_MAIN is define using the following syntax:

 

define('TEXT_MAIN', 'Original Text');

 

Note the the message is enclosed by single quote.

 

For your codes, there are a few single quotes within. For example, " <span style='font-size..."

 

This will confuse PHP when parsing. It will not know where is the start/end. To overcome this, always use a \' instead of just a '. For example, you want to produce the following message:

 

This is the 'original' message.

 

Your code will look like:

 

define('TEXT_MAIN', 'This is the \'original\' message.');

 

Hope that helps to clear things a bit... :blush:

Posted

This is what I did and it works fine... Well, at least there wasn't any errors. :D

 

define('TEXT_MAIN', '
<table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top" class="c1">Welcome !</td>
</tr>
<tr>
<td align="left" valign="top" class="c2">Thank you for visiting. Our company, our product line, and our website are designed specifically for swim teams and swim clubs. Every one of our products has been thoroughly designed and tested with swim teams and clubs in mind. And, we sell them directly to you at a fraction of what you would pay at a traditional swim shop!
<p>Click on any of our product categories to see the difference.<br>
</p></td>
</tr>
<tr>
<td><table width="500" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/Accessories.jpg" width="160" height="160"></td>
<td><img src="images/custom-logo-items.jpg" width="160" height="160"></td>
<td><img src="images/goggles.jpg" width="160" height="160"></td>
</tr>
<tr>
<td><img src="images/men-swimsuit.jpg" width="160" height="160"></td>
<td><img src="images/silicone-caps.jpg" width="160" height="160"></td>
<td> </td>
</tr>
</table>
<span style=\'font-size:12.0pt;font-family:Arial;
mso-fareast-font-family:SimSun;mso-ansi-language:EN-US;mso-fareast-language:
ZH-CN;mso-bidi-language:AR-SA\'><!--[if gte vml 1]><v:shapetype id="_x0000_t75"
coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe"
filled="f" stroked="f">
<v:stroke joinstyle="miter"/>
<v:formulas>
<v:f eqn="if lineDrawn pixelLineWidth 0"/>
<v:f eqn="sum @0 1 0"/>
<v:f eqn="sum 0 0 @1"/>
<v:f eqn="prod @2 1 2"/>
<v:f eqn="prod @3 21600 pixelWidth"/>
<v:f eqn="prod @3 21600 pixelHeight"/>
<v:f eqn="sum @0 0 1"/>
<v:f eqn="prod @6 1 2"/>
<v:f eqn="prod @7 21600 pixelWidth"/>
<v:f eqn="sum @8 21600 0"/>
<v:f eqn="prod @7 21600 pixelHeight"/>
<v:f eqn="sum @10 21600 0"/>
</v:formulas>
<v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect"/>
<o:lock v:ext="edit" aspectratio="t"/>
</v:shapetype><v:shape id="_x0000_i1025" type="#_x0000_t75" style=\'width:120pt;
height:120pt\'>
<v:imagedata src="file:///D:\Temp\msohtml1\01\clip_image001.jpg" o:title="goggles"/>
</v:shape><![endif]-->
<![if !vml]>
<![endif]>
</span></td>
</tr>
</table>
');

Archived

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

×
×
  • Create New...