Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

[~Contrib] Manage Conditions on multiple site


elari

Recommended Posts

not really a contrib but more a tips that help to manage Conditions, shipping when you have many site that request different conditions files

This will also let you create esiest to make html files for conditions without editing language files in define() and without care of quotes (" ' )

 

stop blah blah here is how to

 

in catalog/conditions.php

find

 

<td class="main"><?php echo TEXT_INFORMATION; ?></td>

 

replace by

 

<td class="main">

 

<?php

// elari change to create text information in separate html language file that must have name conditions_( your store name).php

// echo DIR_WS_LANGUAGES . $language . '/conditions_' . strtolower(strtr(STORE_NAME,' ','_')) . '.php';

 

if (file_exists(DIR_WS_LANGUAGES . $language . '/conditions_' . strtolower(strtr(STORE_NAME,' ','_')) . '.php')){

include(DIR_WS_LANGUAGES . $language . '/conditions_' . strtolower(strtr(STORE_NAME,' ','_')) . '.php');

} else {

echo TEXT_INFORMATION;

}

?></td>

 

after that create a file

'conditions_the_name_of_your_store.php' and copy it in language files

 

if store name include 'space' replace them by '_' and lowercase file name

 

you can create file under any html / text editor just save it in text / html format and with final .php

 

 

PS strtolower(strtr(STORE_NAME,' ','_')) should have to be change to remove html or special characters like (: ? ! + ) if you have used them in your store name....

 

if the file name not ok , it will display the usual text_information

 

to debug problem just add before include

echo DIR_WS_LANGUAGES . $language . '/conditions_' . strtolower(strtr(STORE_NAME,' ','_')) . '.php';

it will show you the name needed for file

 

 

you can do the same for shipping, privacy other same kind of files

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...