Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Axl Rose

Members
  • Content count

    16
  • Joined

  • Last visited

Posts posted by Axl Rose


  1. I have not forgotten about you...just that I am not sure what the "best" answer would be in your situation.

    For most STS users who have multi-language shops, the images in the template is the only real hurdle to cross since they are already taking advantage of the "built-in" multi-language functions of osCommerce itself.

    Ah, thank you :)

    Maybe the solution would be to not change the language until the user click on the flag... I mean to make osc or the navigator remember wich language has been selected, but I have no idea on how to do that...


  2. Did you try the following?

     

    How to have a different image per language in STS:

     

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

    $sts->template['langc'] = $language_code; // new tag for country code

    And this code in /catalog/includes/application_top.php :

    $language_code = (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) ? $HTTP_GET_VARS['language'] : DEFAULT_LANGUAGE;

    And I modified my links consequently like this :

    <a href="/catalog/shopping_cart.php?language=$langc$">

     

    This solution isn't perfect because it doesn't work in case of redirection.

    For example when I click on the link "/catalog/account.php?language=$langc$" and I'm a new client or not connected I arrive on the login.php page and, in the address there's "http://localhost/catalog/login.php" instead of "http://localhost/catalog/login.php?language=fr" (or en)

    The language for this page is correctly selected but it's after, when I click on any other link of the page that the default language is selected. The link are as this one "http://localhost/catalog/login.php?language=" instead of "http://localhost/catalog/login.php?language=fr" (or en)


  3. its not in the admin/categories.php its in the admin/products_attributes.php

     

    Look for this

     

    tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values ('', '" . (int)$products_id . "', '" . (int)$options_id . "', '" . (int)$values_id . "', '" . tep_db_input($value_price) . "', '" . tep_db_input($price_prefix) . "')");

    and replace with this

     

    tep_db_query("insert into " . TABLE_PRODUCTS_ATTRIBUTES . " values ('', '" . $products_id . "', '" . $options['products_options_id'] . "', '" . $values['products_options_values_id'] . "', '" . $HTTP_POST_VARS['price'][$rows] . "', '" . $HTTP_POST_VARS['prefix'][$rows] . "', '" . (int)$attributes_sort . "')");

    Thank you very much silvercue.

    I add the same problem after installing add-weight-to-product-attributes v0.2

    And now it is solved.

    However, I noticed that I was unable to "insert" a new attribute for the 5 original options which are color, size, model, memory and version.

    And it is the same for the options that I create myself.

    I got to use the edit function to do so.....

    But for the weight attributes it is possible !


  4. Here's my situation at the moment,

    I added this code in general.php :

    $sts->template['langc'] = $language_code; // new tag for country code

    And this code in /catalog/includes/application_top.php :

    $language_code = (isset($HTTP_GET_VARS['language']) && tep_not_null($HTTP_GET_VARS['language'])) ? $HTTP_GET_VARS['language'] : DEFAULT_LANGUAGE;

    And I modified my links consequently like this :

    <a href="/catalog/shopping_cart.php?language=$langc$">
    

    This solution isn't perfect because it doesn't work in case of redirection.

    For example when I click on the link "/catalog/account.php?language=$langc$" and I'm a new client or not connected.

    I arrive on the login.php page and, in the address there's "http://localhost/catalog/login.php" instead of "http://localhost/catalog/login.php?language=fr" (or en)

    The language for this page is correctly selected but it's after, when I click on any other link of the page that the default language is selected. The link are as this one "http://localhost/catalog/login.php?language=" instead of "http://localhost/catalog/login.php?language=fr" (or en)


  5. I thank you for this Bill.... but I can't make it work.

    When I click on the flags the language of the page change (as before), but not the images, there's no images displayed...

    I copied and pasted your codes and renamed my images to m1.gif and m4.gif then moved them to /catalog/images

    But it still doesn't work :(

    The problem is solved,

    I simply added $ after $langid.... but in the template, not in the general.php like I did before

    Sorry.


  6. I don't like referring STS related questions to other threads but I think the following thread will help you out with this. Please post all replies back in this thread. (thanks)

     

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

     

    Hope this helps,

    I thank you for this Bill.... but I can't make it work.

    When I click on the flags the language of the page change (as before), but not the images, there's no images displayed...

    I copied and pasted your codes and renamed my images to m1.gif and m4.gif then moved them to /catalog/images

    But it still doesn't work :(


  7. :thumbsup: You should also get aquainted with how osCommerce pages work (see the STS User Manual starting with section 3.6).

    Each category can have it's own page template (index.php_1.html, index.php_2.html and so on) or have just one category template that covers them all (index.php.html). Look in the STS User Manual on how to have specific product templates as it works the same way as the category templates.

    Sorry you went through all of that unneccessary coding. :(

    Hope this helped,

    Hello Bill,

    I finally created several templates for different pages. They are named contact_us.php.html, conditions.php.html... basing on the name of the script executed like explained in section 3.6.

    But now I'm looking for having 2 index pages, one in french and one in english.

    I have some hyperlinked pictures with french words on my index page, that's why I need 2 index pages.

    I copied index.php and renamed it to index_en.php and then I made a template called index_en.php.html

    Is there a better way to do that ?


  8. :(

    It does work for this box but not for categories because of this error :

    Fatal error: Cannot redeclare tep_show_category() (previously declared in d:\mes documents\easyphp\www\catalog\includes\boxes\categories.php:13) in d:\mes documents\easyphp\www\catalog\includes\boxes\categories.php on line 13

    I found the solution... well, it seems to work :P

    Here's the old code in sts_column_left:

    // Get categories box from db or cache  
     if ((USE_CACHE == 'true') && empty($SID)) {
       echo tep_cache_categories_box();
     } else {
       include(DIR_WS_BOXES . 'categories.php');
     }  
     $sts->restart_capture ('categorybox', 'box');
    

    Here's the new code:

    // Get categories box from db or cache  
     if ((USE_CACHE == 'true') && empty($SID)) {
       echo tep_cache_categories_box();
     } else {
      if (basename($PHP_SELF) == FILENAME_PRODUCTS) {
       include(DIR_WS_BOXES . 'categories.php');
        } else {
      $sts->template['categorybox']='';}
     }  
     $sts->restart_capture ('categorybox', 'box'); 

     

    What do you think about this code Bill, is it ok ?


  9. I'm confused... I just found the solution to my first point :

     

    It was because of the S in specialbox....

     

    PS : sorry about the blanks but I have no idea why they are there...

    :(

    It does work for this box but not for categories because of this error :

    Fatal error: Cannot redeclare tep_show_category() (previously declared in d:\mes documents\easyphp\www\catalog\includes\boxes\categories.php:13) in d:\mes documents\easyphp\www\catalog\includes\boxes\categories.php on line 13


  10. 1) How can I have specific infoboxes displayed on specific pages then ?

    For example I'd like to have "specials" and "whatsnew" displayed only on index page, but nowhere else.

    I'm confused... I just found the solution to my first point :

    My code was

    if (basename($PHP_SELF) == FILENAME_SHOPPING_CART) {
       require(DIR_WS_BOXES . 'specials.php');
       $sts->restart_capture ('specialsbox', 'box');  
     } else {
       $sts->template['specialsbox']='';}

    But it should be

    if (basename($PHP_SELF) == FILENAME_SHOPPING_CART) {
       require(DIR_WS_BOXES . 'specials.php');
       $sts->restart_capture ('specialbox', 'box');  
     } else {
       $sts->template['specialbox']='';}

    It was because of the S in specialbox....

     

    PS : sorry about the blanks but I have no idea why they are there...


  11. Rafael,

    Like Matt suggested above, to not have specific infoboxes displayed, you simply do not add those box tags inside your STS Template.

    Hello Bill,

    Firstly I got to thank you for your great job in STS, it is really a must have !

    I got some troubles with boxes and pages :

    1) How can I have specific infoboxes displayed on specific pages then ?

    For example I'd like to have "specials" and "whatsnew" displayed only on index page, but nowhere else.

     

    2) And I'd like to have the "catmenu", "categorybox" and "searchbox" only in a new page which is called product.php

    How can I do that ?

    I mean, what files do I have to edit and how ?

     

    About the first point I allready tried to edit the column_left.php and sts_column_left.php, without success...

     

    PS : only the themplate for index page is activated for the moment, not the infobox template

     

    I read carefully your docs but, since I'm french, I got difficulties to understand certain things.

    Excuse me then if I'm missed something who could answer my questions.

×