Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2008
    Posts
    22
    Plugin Contributions
    0

    Default Language customization

    I have some general customization issues on my website and I would like your help about them.

    My store has two different domains for two different languages, Hebrew, English and I would like to make customizations regarding each.
    1. When user enters the URL X.com I would like them to be directed to the store's English website. When users enters the url X.co.il I would like them to be directed to store's Hebrew website.
    2. For the Hebrew language I would like to display product price including tax. For the English language I would like to display the product price without tax.
    3. I would like to change STORE_NAME, STORE_ADDRESS parameters based on language selected.

    I would be happy to receive help regarding these issues.

    Tzachi
    Last edited by tslav; 15 Sep 2008 at 12:21 PM.

  2. #2
    Join Date
    Aug 2008
    Posts
    22
    Plugin Contributions
    0

    Default Re: Language customization

    Well, I tried figuring out where is the code that receives the values from the sql configuration table (DISPLAY_PRICE_WITH_TAX, STORE_NAME etc) but without success. If I knew where is the code that receives these values I could easily change them according to $_SESSION[languages_id].

    Any help??????

  3. #3
    Join Date
    Aug 2008
    Posts
    22
    Plugin Contributions
    0

    Default Re: Language customization

    any help?

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Language customization

    You can find the places where the constants you mention are used by searching in admin > Tools > Developers Toolkit. For example, paste
    DISPLAY_PRICE_WITH_TAX
    in the lower left box, select "all files" and search. You will see the 11 files where this is used, and the line numbers.

    A thought - you might do best to alter the define for the constant based on session language instead of altering the code in each file. If the define is stored in the db, there should be a place you can redefine it before use... not sure exactly how db-generated constants are brought into the PHP files for use. Possibly the wiki may have information on this, or it is a general PHP/MySQL functionality
    Last edited by gjh42; 25 Sep 2008 at 10:07 AM.

  5. #5
    Join Date
    Aug 2008
    Posts
    22
    Plugin Contributions
    0

    Default Re: Language customization

    Quote Originally Posted by gjh42 View Post
    A thought - you might do best to alter the define for the constant based on session language instead of altering the code in each file. If the define is stored in the db, there should be a place you can redefine it before use... not sure exactly how db-generated constants are brought into the PHP files for use. Possibly the wiki may have information on this, or it is a general PHP/MySQL functionality
    This is exacly what I had in mind. I thought of changing each file but it is a really BAD solution. I tried searching where the db-generated constants are brought into the PHP but without success. If I will have a tiny tip regarding that manner I can manage the rest on my own (This way I can also know where the STORE_NAME, STORE_ADDRESS are brought up to the PHP and I can create a function to change all those constants at once without taking care of each constant separately.

    Tzachi

 

 

Similar Threads

  1. Multiple language, can only see english language
    By stefanl in forum General Questions
    Replies: 2
    Last Post: 2 Oct 2011, 04:54 PM
  2. Replies: 12
    Last Post: 9 Jul 2009, 04:05 PM
  3. How to set a default country per language for multi language sites
    By lacabessa in forum Addon Language Packs
    Replies: 2
    Last Post: 18 Nov 2006, 11:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg