Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

swapping things around


purplenikki

Recommended Posts

can someone tell me how to swap around the ( welcome guest would you like to log in or create account) text

 

and the main body text ?

 

so that the (welcome guest text) is somewhere in the middle

 

 

thank you thank you thank you ;)

Link to comment
Share on other sites

Well hi, :)

 

The order of your two text areas is decided by /store/index.php at line 301 [tep_customer_greeting] and at line 307 [text_main]. Swapping the two around is therefore a cut&paste job. That means you would swap the positions of:

<?php echo tep_customer_greeting(); ?>

and

<?php echo TEXT_MAIN; ?>

 

What about having the text greet somewhere in the middle of the index page though? I did it successfully:

 

A/ In /store/includes/languages/english/index.php split [text_main] into two: [text_main] & [text_main2]. Watch your syntax defining [text_main2]! You should end up with:

     define('TEXT_MAIN', 'This is <b>the stuff</b> for the index page..');
    define('TEXT_MAIN2', 'This is <b>more stuff</b> for the index page..');

 

B/ In /store/index.php at lines 301-307 make the tables fit your new scheme. Although you have to work around the table structure (and add some table tags to fit), in essence you end up with:

<?php echo TEXT_MAIN; ?>
<?php echo tep_customer_greeting(); ?>
<?php echo TEXT_MAIN2; ?>

Now save the two files and refresh your store! The User Greeting appears between the two [text_main] sections. Voila!

 

If you have problems, let me know and I'll post exact code.

Link to comment
Share on other sites

:thumbsup: Another (perhaps simpler) way (remembering from December you wanted to align two images right and left):

 

In /store/includes/languages/english.php:

 

Edit line 286:

     define('TEXT_GREETING_GUEST', 'Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account?');

and change to something like:

     define('TEXT_GREETING_GUEST', '<div><div style="float:right"><img src="right_pic.gif" /></div><img src="left_pic.gif" /> Welcome Guest! Would you like to log yourself in? Or would you prefer to create an account?</div>');

For clarity I have removed the original links and styles from the above snippet, so don't just cut and paste the code without keeping a record of the original.

 

CHeers

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...