Jump to content

raiwa

♥Ambassador
  • Content count

    3,454
  • Joined

  • Last visited

  • Days Won

    115

Posts posted by raiwa


  1. Language ids include country specific part, see your browser preferences.

    And in the english language file see at the very beginning:

    // look in your $PATH_LOCALE/locale directory for available locales
    // or type locale -a on the server.
    // Array examples which should work on all servers:
    // 'en_US.UTF-8', 'en_US.UTF8', 'enu_usa'
    // 'en_GB.UTF-8', 'en_GB.UTF8', 'eng_gb'
    // 'en_AU.UTF-8', 'en_AU.UTF8', 'ena_au'
    @setlocale(LC_ALL, array('en_US.UTF-8', 'en_US.UTF8', 'enu_usa'));

     

     


  2. Language is auto selected by browser language settings.

    EDIT: Nothing illegal, each browser and WEB Site uses this. Just check your browser settings and visit multilanguage sites. Each site which supports your preferred browser language will show the site in that language.


  3. What is very easy to do is to link the currency to the language.

    In admin: Configuration: My Store: Switch To Default Language Currency set to true

    Then in each main language file, set the desired currency in aprox. line 39-40:

    // if USE_DEFAULT_LANGUAGE_CURRENCY is true, use the following currency, instead of the applications default currency (used when changing language)
    define('LANGUAGE_CURRENCY', 'USD');

     


  4. New Version 5.0.0. uploaded:

    Changes:

    • Added support for EDGE BS4
    • Removed ht-Module
    • Moved validation script from ht to content modules
    • Moved code from application_top.php into discount_code.php
    • Added checkout payment content module to replace code injection in HT module
    • Added install warning for required OT module to content modules
    • Added condition to show "Apply" button in shopping cart module only if "Ship in Cart" Order Totals Module is present.
    • Updated template names to actual naming standard
    • Updated template calls in content modules to actual auto inclusion
    • Moved html output to content module template files
    • Normalized True/False typo in OT module
    • Hooked modifications in checkout_process.php and paypal standard files.

     

    @MITCH70, thanks for testing

    @Tsimi, maybe the main description of the addon could be updated. I have no privileges to edit it, can you please.


  5. @Tsimi, @MITCH70,

    Here the full package Discount Code 5.0.0. beta_02.

    For now only EDGE BS4 files included. Once checked and approved I'll add the FROZEN BS3 files. The only difference will be in the content module template files.

    Version 5.0.0 BS: Added support for EDGE BS4

    •                   Removed ht-Module
    •                   Moved validation script from ht to content modules
    •                   Moved code from application_top.php into discount_code.php
    •                   Added checkout payment content module to replace code injection in HT module
    •                   Added install warning for required OT modules to content modules
    •                   Added condition to "Apply" button in shopping cart module to show it only if ship in cart Order Totals Module is present.
    •                   Updated templates name to actual naming standard
    •                   Updated templates call in content modules to actual auto inclusion
    •                   Moved html output to content module template files
    •                   Normalized True/False typo in OT module
    •                   Hooked modifications in checkout_process.php and paypal standard files.

     

    Installation and Upgrade Instructions are updated. Please try and check the Instructions for errors.

    I tested the paypal standard modifications and they work.

     

    Discount_Codes_5.0.0_BS_beta_02.zip


  6. 2.3.4.1 FROZEN and previous EDGE's BS3:

    ext/bootstrap/js/bootstrap.min.js

    line 2:

     * Bootstrap v3.3.7 (http://getbootstrap.com)

    or

    2.3.4.1 EDGE BS4

    includes/template_bottom.php

    line 47:

      <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>

     


  7. @Tsimi, @MITCH70,

    I played around a bit more and found a solution where the ht module would only be required for the session unregister of the discount code.

    The only scenario where this makes sense/is required is the following:

    - discount input is allowed for guests/not logged in users in shopping cart

    - customer logged in and goes to checkout and introduces a discount code

    - he doesn't finish the order logs off and leaves the computer.

    - another user uses the same computer/session and goes as a guest to shopping cart, he will see the discount code from the other user which abandoned the checkout.

    - if he continues a purchase he can use the discount code which may have not been given to him

    Is this a real live problem or just a theorical unperfectness?

    EDIT: The same can happen in the old version if input in shopping cart is allowed to guests and the guest introduces a discount code and leaves the computer. Another user can see the code if he uses the computer before session expires.

    The complete settings would be:

    + no ht module required

    + application_top.php code moved to discount_code.php file in the root

    + 2 content modules (shopping cart and checkout payment) containing the validation script

    + checkout_process.php code moved into a hook

    + I believe the optional mod for paypal standard can also be hooked, needs to be tested.

    Like this the only core changes left would be the content module and hook calls

     

    Your thoughts?


  8. New Version uploaded:

    Module Control 1.2.0

    Changes:

    - Added back and fixed support for navbar modules.
    - Added modified navbar content module with modules control support
    - Fixed undefined warnings in navbar if no navbar modules are active in a navbar group

     


  9. Thank you Mitch for testing. The apply button is only required in shopping cart for to reload the page and show the discount in the ship in cart order total module. But you gave me the idea to link it there to the case when ship in cart ot module is used. Otherwise it is not required there neither.


  10. @Tsimi and other testers.

    Some more thoughts:

    I forgot that the old header tag also includes code to unregister the discount code from the session when a customer logs off. Thinking about it seems to me that this is not rquired. What harm can be done if the discount code keeps session registered? Anyway the discount codes are validated again on each checkout_confirmation load. Also when logging in again a new session is created anyway. Or do I miss something on this?

    But if we keep the ht module, we could do the following:

    + move the code from application_top.php to the ht module: one important core modification less
    + we can move the validation script from the content modules to the header tag module: only one copy of the script -> easier  maintenance and update
    + we can keep the session unregister code for any case as in the old version
    - one module (ht) more in the package

     

    I created the above scenario version hewre it is for testing:

    - remove the code in application_top.php
    - install the new ht moduel

    test, test ,test

    give feedback

    Thank you

     

    Discount_Codes_5.0.0_beta_01.zip


  11. On 5/31/2019 at 8:36 PM, MITCH70 said:

    Hi,

    New files did work almost for me. Only in shopping cart its not showing the validation icons and border is different.
    Maybe I forgot something and will check the files again.

    discount.jpg.08e320165af9b57fdb9c03c6a33836f3.jpgdiscount2.jpg.06c6ae414982aca9eb688ada577d054e.jpg

    Sorry, yes the template filename need to be updated. Please rename the shopping cart template file from "discount_code.php" to "tpl_cm_sc_discount_code.php"


  12. 3 hours ago, supercheaphobb said:

    Ok a silly problem I am having the order editor is opening in a new tab

    If I go to orders then edit I am at my normal edit page which is want I want but I click edit again top right button and the order editor open in a new tab

    How can I stop this?

    Remove target="_blank" from the link


  13. Hello @Omar_one,

    I had a deeper look now and found that the navbar modules are not processed at all in osc_template.php class. They are processed and included in the navbar parent module. Therefore it does not make sense to include them in Modules Control.

    I'll remove them and update. Anyway it's not common to switch off the navbar modules for selected pages and if needed it can be done in the modules themself.

    Thanks for your help and patience.

    Best regards
    Rainer


  14. @Tsimi, @MITCH70, @DAVID3733, and all other BS4 users:

    Here the BS4 content modules for shoppin_cart.php and checkout_payment.php.

    Only the modules and english language files are included. All other files from FROZEN should work.

    Make sure to:

    - uninstall the discount code ht-module
    - remove the hardcoded example Tsimi has posted above (if you have added)
    - add the following lines to checkout_payment.php just above the comments section line 226:

      <div class="row">
        <?php echo $oscTemplate->getContent('checkout_payment'); ?>
      </div>

    - install the shopping cart and checkout payment content modules

    test, test , test

    give feedback, please

    PS: Maybe some fine tuning of the html output can be added

    Tsimi,

    I suggest to name the new version "Discount_Codes_5.0.0_BS4" or "Discount_Codes_5.0.0_BS3_BS4" or just leave it in "Discount_Codes_5.0.0_BS" and explain the other stuff in the description?

    I would include the generic files in a catalog folder like now and add one folder with the content modules for BS4 and another for BS3. For coherency I would also add a checkout_payment content module for BS3 and remove the ht-module.

    Your thoughts?

    2.3.4._EDGE_BS4.zip


  15. @Tsimi, just to be sure, are you testing this on the latest EDGE BS4 and Discount_Codes_4.4.3_BS?

    I just repeated installation on latest vanilla EDGE BS4 and the same, input shows, spinner moves, "not validated" icon shows on any code I tried. When I continue to checkout confirmation, no discount code shows up. But discount code is correct registered in session.

    EDIT: Was running too fast, I read now the instructions and saw that I forgot like a bloody beginner to add the code to application_top.php. LOL 😂

×