Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2012
    Posts
    9
    Plugin Contributions
    0

    Default How can i have two languages using the sermepa payment module?

    Hello,
    I am using the sermepa payment module and my costumers end up in the Spanish version of the payment site. I asked the support about how to make this multilingual and they say that they will show my costumers which ever language I choose in the 'Ds_Merchant_ConsumerLanguage' parameter, I can select between "001" (spanish), "002" english and more... but only one parameter can be set in the PHP file (row 104 if you look in the module):
    PHP Code:
    $ds_merchant_consumerlanguage "001"
    I tried to put "001, 002" for example (u never know right?) but it didn't work .

    My problem is that this parameter is in the PHP file 'includes\modules\payment\sermepa.php' and since I'm new to this whole Zen Cart thing, I wish to ask how to put two of these parameters in my site's Spanish-English folders, so costumers checkout in their own language.
    The guy who wrote the module also put this:
    PHP Code:
      if ($language=='english')
          {
            
    $ds_merchant_consumerlanguage='002';
          }
          elseif (
    $language=='catala'
          {
            
    $ds_merchant_consumerlanguage='003';
          } 
    I think this was an attempt to make this work via the module... but it doesn't, at least not for me...

    Thanks for any help,

  2. #2
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,826
    Plugin Contributions
    31

    Default Re: How can i have two languages using the sermepa payment module?

    The parameter, beit 001 or 002 or 003 has to be passed to the gateway at checkout confirmation and so yes it needs to be defined in the code, not as a constant, and should be decided by the language in use in the checkout process.
    So the PHP code you have quoted is on the right track in a general sense..

    I do not use this module but have had the misfortune to use/repair both the CECA and Pasat 4B module for Spain so have had similar problems with buggy code, usually in the "optional" parts like the languages not having been completed or tested, and no support from other users.

    You will have to get your hands dirty and write your own code as Zen Cart use in Spain is very low and community help even lower.

    I suggest you first install the Superglobals addon. This will show you all the variables that are in use on the different pages so you can use the correct one for your needs.

    Then just play with the code and temporarily put echo "$your_variable=".$your_variable;die; just after where you are making changes to see if you are getting the value you need in the variable you are using. The die bit just stops the code from proceeding further so you can see the echo.
    Steve
    github.com/torvista: BackupMySQL, Structured Data, Multiple Copy-Move-Delete, Google reCaptcha, Image Checker, Spanish Language Pack and more...

 

 

Similar Threads

  1. Problem with CAIXA Sermepa payment module
    By Gorka in forum Addon Payment Modules
    Replies: 2
    Last Post: 26 Nov 2015, 04:16 PM
  2. v138a Changing the payment method in the sermepa module to Credit Card only
    By zand in forum Addon Payment Modules
    Replies: 2
    Last Post: 15 Jun 2012, 12:01 AM
  3. Possible Sermepa payment module problem
    By vimad in forum Addon Payment Modules
    Replies: 10
    Last Post: 18 Apr 2011, 12:38 AM
  4. Can I have two Zen Cart folders using the same database?
    By cswebtech in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 11 Mar 2009, 06:48 PM
  5. Two languages - two templates. Can this be done?
    By zoreli in forum Templates, Stylesheets, Page Layout
    Replies: 14
    Last Post: 17 Jul 2006, 03:23 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