Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Oct 2010
    Location
    Glasgow, Scotland
    Posts
    29
    Plugin Contributions
    0

    Default Database storage logic: mutli-language quesstion.

    Hi,

    I am modifying an addon and have a question regarding the rules to apply for storing data in the products_options table. (This question may apply to other tables too).

    I am adding new Product Options. For this I have to insert values for the three most important fields:

    products_options_id
    language_id
    products_options_name

    The first two comprise a combined primary key.

    My question is: if I have the option "Size" (English), and I want to add the Spanish equivalent "Tamaņo", should both entries share the same
    products_options_id and just different language_id? ie:

    products_options_id = 1
    language_id = 1
    products_options_name = Size

    products_options_id = 1
    language_id = 2
    products_options_name = Tamaņo

    Alternatively, Should both entries have both primary fields different? ie:

    products_options_id = 1
    language_id = 1
    products_options_name = Size

    products_options_id = 2
    language_id = 2
    products_options_name = Tamaņo

    Both options would produce two unique combined primary keys.

    I need to know this to ensure that when switching language in my shop, the system continues to display the correct options, just in the different language.

    I would expect that the first scenario is the correct one, but I cannot find any documentation anywhere to confirm this (is it available anywhere?).

    Thanks.

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,755
    Plugin Contributions
    9

    Default Re: Database storage logic: mutli-language quesstion.

    Out of the box with an additional language added there are files already that address this

    Check for the spanish language pack and see

    http://www.zen-cart.com/downloads.php?do=file&id=1110
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Oct 2010
    Location
    Glasgow, Scotland
    Posts
    29
    Plugin Contributions
    0

    Default Re: Database storage logic: mutli-language quesstion.

    Corrected but double-posted for some reason :-(
    Feel free to delete this entry.
    Last edited by k9dug; 18 Sep 2013 at 01:41 PM.

  4. #4
    Join Date
    Oct 2010
    Location
    Glasgow, Scotland
    Posts
    29
    Plugin Contributions
    0

    Default Re: Database storage logic: mutli-language quesstion.

    Thanks kobra.

    Without going to the extent of installing a language pack to find this out, are there any sources of info on the data model/database, such as a data dictionary etc., which explain the purpose and/or general usage of tables and fields? Where would Plugin/Addon developers source this information? I have seen the wiki entries on the database but this doesn't say much more than can be seen looking at the database itself.

 

 

Similar Threads

  1. Storage of PayPal Invoice ID in store database
    By HeyIts007 in forum General Questions
    Replies: 2
    Last Post: 1 Nov 2014, 07:32 PM
  2. Security and Database backup storage location
    By Nineve in forum General Questions
    Replies: 1
    Last Post: 2 Aug 2010, 11:30 PM
  3. beanstream - database storage
    By keyser79 in forum Addon Payment Modules
    Replies: 3
    Last Post: 19 Nov 2008, 10:32 PM
  4. Database storage of session
    By athena in forum General Questions
    Replies: 8
    Last Post: 3 Jan 2007, 02:35 AM

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