Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New menu item at top menu!


antonisid

Recommended Posts

Hello

I want to add at the " * My Account * Cart Contents * Checkout " menu 2 more items: Homepage and Contact Us,but i don't know how.I think that i must make a module and pass these items from the admin.

Do you have any ideas?

Generally , how i can create a new link , which changes it's name when i change the language by clicking the flags? :o

 

Plzzzzz help!!!! :blush:

Link to comment
Share on other sites

Generally , how i can create a new link , which changes it's name when i change the language by clicking the flags?

Take a lesson from existing code.

 

Look at this code from /catalog/includes/header.php

 

<a href="<?php echo tep_href_link([color="#FF0000"][b]FILENAME_SHOPPING_CART[/b][/color]); ?>" class="headerNavigation"><?php echo [color="#800080"][b]HEADER_TITLE_CART_CONTENTS[/b][/color]; ?></a>

 

FILENAME_SHOPPING_CART is the PHP file the link points to.

 

HEADER_TITLE_CART_CONTENTS is the link text.

 

Now look in your /catalog/includes/languages FOLDER.

 

In there is a file for each language on your site.

 

Mine has:

 

english.php

german.php

espanol.php

 

Opening each of those I find the text for the link (HEADER_TITLE_CART_CONTENTS) defined.

 

From english.php

 

define('HEADER_TITLE_CART_CONTENTS', 'Cart Contents');

From german.php

 

define('HEADER_TITLE_CART_CONTENTS', 'Warenkorb');

From espanol.php

 

define('HEADER_TITLE_CART_CONTENTS', 'Ver Cesta');

You can also put the link text in the language file for the PHP file you are adding the link to.

 

For example if you are adding the link to index.php, you can also put the text for the link in:

 

/catalog/includes/languages/english/index.php

/catalog/includes/languages/german/index.php

/catalog/includes/languages/espanol/index.php

 

Your site may have other languages.

 

So, in short, to make a text link multi-lingual, you must define the text for the link in the language files (as described above), and when your site switches languages the osC software will automatically switch the text.

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...