meohoang194 Posted May 19, 2009 Share Posted May 19, 2009 Problem:I have 2 lang: A, B and 2 correlative image/flash: A, BHow to ?If i chose lang A, it'll display image/flash AElse if i chose lang B, it'll display image/flash B----Can u have any ideas to help me to solve this problem ?Thanks All(Sorry 4 my poor English ^__^) Link to comment Share on other sites More sharing options...
meohoang194 Posted May 19, 2009 Author Share Posted May 19, 2009 Try to find an idea ... ( ( ( Poor this girl ( Link to comment Share on other sites More sharing options...
meohoang194 Posted May 19, 2009 Author Share Posted May 19, 2009 Up up Link to comment Share on other sites More sharing options...
meohoang194 Posted May 20, 2009 Author Share Posted May 20, 2009 Can u help this poor girl ( Link to comment Share on other sites More sharing options...
meohoang194 Posted May 21, 2009 Author Share Posted May 21, 2009 (( sb help me (( Link to comment Share on other sites More sharing options...
Robert G. Posted May 21, 2009 Share Posted May 21, 2009 Hmm .. I suppose you could abuse the translation to accomplish just this.I gave it a shot on my test shop and got it to work using the following structure (note: you'll have to edit PrestaShop files directly, so ensure you have a backup of everything before you begin!)# Backup!# Backup!# Ensure both your files are available in the same host/folder (i.e. yourshop.com/images/a.jpg and yourshop.com/images/b.jpg)# Connect to your PrestaShop using either SSH or FTP, or browse to the shop folder locally if it's installed locally# Open the "themes" folder and the folder of your theme (default: "prestashop")# Open the corresponding .tpl file where you want this img/flash displayed; i.e. if you want it in the header or left/right blocks, open header.tpl# Go through the tpl file and find the correct spot you want to flash/img to be displayed# Paste the following: note: default filename corresponds to the default language in your shop; so if that's french, include the filename of the file intended for your french visitor.Example: On my test shop I had it set up like this, with two files called 1.jpg and 2.jpg # Save & exit# Go to the admin interface of your shop and open Tools > Translations > Modify translations > Front Office translations# Click the flag of the language which is *not* your default language (i.e. in the example above french is my main language, if I want to show a different img for English I must edit the translations for english)# Click "Expand all fieldsets"# Find the row containing your 'string', it'll be added here automatically but may take some looking around before you find it. (tip: header.tpl is usually empty, so if you put something in there, just ctrl+f for "header" and you should find it easily)# Enter the 'translated string'; the alternative image for english; "2" for example.# SaveThat's it. In this example all french visitors will see the file 1.jpg shown and english ones will see 2.jpg.Of course you've just got to edit the header.tpl again if you want to show flash instead of images, but the same principle applies.I am by no means a PrestaShop expert, so if this breaks anything, kills your cat or makes your website go up in flames; I don't take any responsibility.Good luck Link to comment Share on other sites More sharing options...
meohoang194 Posted May 24, 2009 Author Share Posted May 24, 2009 OOOOPPS Its so great, smart, cool idea ^^Thank u so much :X :X :X :X :X :X :XGood luck !!!! Link to comment Share on other sites More sharing options...
Recommended Posts