Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2007
    Location
    Cymru
    Posts
    124
    Plugin Contributions
    0

    Default Different category image dependent on language

    We have a bilingual Welsh / English store. Is it possible to have a different category image that changes depending on the language used by the customer?

  2. #2
    Join Date
    Feb 2009
    Location
    UK
    Posts
    1,238
    Plugin Contributions
    1

    Default Re: Different category image dependent on language

    I think there's an answer in one of the Similar Threads at the bottom of this page,

  3. #3
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: Different category image dependent on language

    Quote Originally Posted by bonheddwr View Post
    We have a bilingual Welsh / English store. Is it possible to have a different category image that changes depending on the language used by the customer?
    Sure it is if each language can be independently identified, ie. en for English and say de for German (Deutsch).

    One way this could be accomplished is through image files being placed on the server having the filename modified to include the language identifier. Another by having the applicable image(s) in a sub-directory. One thing to consider is how to address the absence of such image noting that an image would have to exist for each language and/or some fallback process if such language image was not present.

    Additionally to consider is the process to be used to place the image(s) on the server. This could be accomplished by uploading each language specific image through the admin following the naming convention determined suitable and then identifying the path of the "default" image whether that image is uploaded or not. (important part here is that the categories table has the path to a filename that would be manipulated as necessary to provide the "language" specific file path.

    As to how/where to make these changes, the centralized location to apply the modification throughout the store would be the includes/functions/functions_lookup.php file specifically in the zen_get_categories_image function. This way the templates could be left alone and all such image paths would be provided for use.

    Also, because the language is session variable dependent and discussing file paths, would suggest that there be some appropriate filepath verification on the resulting path to prevent session manipulation providing access to undesirable areas/files. This may already be relatively handled on initial load of each page, but is something to consider.

    To piggy back on the previous post, looks like DrByte provided something tangible in the related posts: https://www.zen-cart.com/showthread....nt-on-language
    Last edited by mc12345678; 4 Apr 2018 at 01:42 PM.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  4. #4
    Join Date
    Jun 2007
    Location
    Cymru
    Posts
    124
    Plugin Contributions
    0

    Default Re: Different category image dependent on language

    Thanks for your help both.

 

 

Similar Threads

  1. Replies: 3
    Last Post: 13 Oct 2010, 10:53 PM
  2. How can I put a different category image per language?
    By gabriel25 in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 20 Jan 2010, 09:18 PM
  3. Can I make my subcategory image dependent on language?
    By js5729 in forum Setting Up Categories, Products, Attributes
    Replies: 8
    Last Post: 18 Nov 2008, 02:30 PM
  4. Category dependent footer image??
    By Redcinamn in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 17 Jan 2008, 05:39 PM
  5. Different product image for different language?
    By marksu in forum Setting Up Categories, Products, Attributes
    Replies: 2
    Last Post: 19 Nov 2007, 11:30 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR