Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Sts Index.php.html Image Loading Problem


engelleo

Recommended Posts

Thanks god, we have STS, it let us modify the osC easily, but now i met a big problem!

 

I wanna change the image in the page when I change language, I put the following code in the table,

 

<a href="<?php echo tep_href_link(FILENAME_DEFAULT)?>"><img src="<?php echo DIR_WS_LANGUAGES . $language . '/images/buttons/';?>m1.jpg" border="0" alt="" width="105" height="47"></a>

 

the link works perfectly, but the image cant not loading, is there something wrong in my code of path or kind of STS problem?? search the whole forum, didnt find the useful infomation...

 

could somebody be so kind to give me some advice?? thanks!!

Link to comment
Share on other sites

Thanks god, we have STS, it let us modify the osC easily, but now i met a big problem!

 

I wanna change the image in the page when I change language, I put the following code in the table,

 

<a href="<?php echo tep_href_link(FILENAME_DEFAULT)?>"><img src="<?php echo DIR_WS_LANGUAGES . $language . '/images/buttons/';?>m1.jpg" border="0" alt="" width="105" height="47"></a>

 

the link works perfectly, but the image cant not loading, is there something wrong in my code of path or kind of STS problem?? search the whole forum, didnt find the useful infomation...

 

could somebody be so kind to give me some advice?? thanks!!

 

the unloaded pic in the browser can find the link...but .$language. doesnt work, dont know why...

 

http://localhost/PHP/CT/includes/languages.../buttons/m1.jpg

Link to comment
Share on other sites

the unloaded pic in the browser can find the link...but .$language. doesnt work, dont know why...

 

http://localhost/PHP/CT/includes/languages.../buttons/m1.jpg

 

Add the following code to your includes/modules/sts_inc/general.php file:

 

$sts->template['langid'] = $languages_id;

 

Then create your images:

 

m1.jpg, m2.jpg, etc, depending on the languages being used, and save them in your images folder. The number for the LangID will come from your particular osC implementation. To find the language ID, go to your Admin, Localization, then select each language and view the ID in the URL.

 

Now add the following into your STS Template where you want the button:

 

<img border="0" src="images/m$langid.gif">

Where $langid will be replaced dynamically by the correct language id number.

For example:

english is ID=1 in my shop so the URL would be dynamically changed to "images/m1.gif" if the user select the language "english" in my shop.

 

Hope this got you on your way,

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

Link to comment
Share on other sites

Add the following code to your includes/modules/sts_inc/general.php file:

 

$sts->template['langid'] = $languages_id;

 

Then create your images:

 

m1.jpg, m2.jpg, etc, depending on the languages being used, and save them in your images folder. The number for the LangID will come from your particular osC implementation. To find the language ID, go to your Admin, Localization, then select each language and view the ID in the URL.

 

Now add the following into your STS Template where you want the button:

 

<img border="0" src="images/m$langid.gif">

Where $langid will be replaced dynamically by the correct language id number.

For example:

english is ID=1 in my shop so the URL would be dynamically changed to "images/m1.gif" if the user select the language "english" in my shop.

 

Hope this got you on your way,

 

 

Thx a lot, bkellum, tutor of STS , It works perfectly!

Link to comment
Share on other sites

  • 1 month later...
Add the following code to your includes/modules/sts_inc/general.php file:

 

$sts->template['langid'] = $languages_id;

 

Then create your images:

 

m1.jpg, m2.jpg, etc, depending on the languages being used, and save them in your images folder. The number for the LangID will come from your particular osC implementation. To find the language ID, go to your Admin, Localization, then select each language and view the ID in the URL.

 

Now add the following into your STS Template where you want the button:

 

<img border="0" src="images/m$langid.gif">

Where $langid will be replaced dynamically by the correct language id number.

For example:

english is ID=1 in my shop so the URL would be dynamically changed to "images/m1.gif" if the user select the language "english" in my shop.

 

Hope this got you on your way,

If anyone would like to comment on the above or have any questions related to STS,

Please post all replies to the STSv4 Thread found here:

 

http://www.oscommerce.com/forums/index.php?s=&...t&p=1102939

 

This way all STS Users can benefit. Thank you. :thumbsup: :thumbsup:

Bill Kellum

 

Sounds Good Productions

STS Tutorials & more: STSv4.6, STS Add-ons (STS Power Pack), STS V4 Forum STS Forum FREE TEMPLATE

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.

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...