Jump to content

raiwa

♥Ambassador
  • Content count

    3,462
  • Joined

  • Last visited

  • Days Won

    115

Posts posted by raiwa


  1. 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.


  2. @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


  3. 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"


  4. 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


  5. 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


  6. @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


  7. @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 😂


  8. 24 minutes ago, peterbuzzin said:

    Artcolnc's reply has helped but still unsure if CE is the Frozen download everyone talks about, it reads historically like it is but I've had to read between the lines to establish that.  I think interchanging references contribute to the confusion also, if 2.3.4.1 CE is 2.3.4.1 Frozen and vice versa, then one of those terms should be picked and stuck to.  I've seen both used separately in the forums.

    CE stands for Community Edition and refers (now) to the complete series of Burt's bootstrapped edition. From early 2.3.3. 2014 repo until actual 2.3.4.1 EDGE BS4, including the fixed GOLD and FROZEN versions.  The name "CE" appeared maybe a couple of years ago just to distinguish Burt's repos made with the help of other "Community" members from the "official" versions.


  9. 11 minutes ago, Tsimi said:

    I didn't mean to put more work into your hands. That was not my intention. Just wanted to check if something is wrong on my end.
    I couldn't agree more. Updating an add-on for various CE versions is becoming a bit of a pain in the rear. Better wait for a release or more close to final version.
     

    No worries, this was a general statement, not opposed to your question 😉


  10. Hello @Tsimi,

    I do have no plans to update add-ons to EDGE BS4 right now. My plans are to wait for the next stable release, CE BS4 or official BS4. I really have no time any more to run constantly behind EDGE updates.

    Anyway EDGE BS4 is intended for people who are able to update the add-ons themselve.

    Now in the case of discount code, the code breaks on a more serious way than just BS4 tags. So I'll see if I can find some time to bite the bullet and update it.

    Beside the change to footer-scripts group, the class selector in the ht-template needs to be changed to the following:

            $('div.contentContainer .form-group').before('<h2><?php echo TEXT_DISCOUNT_CODE; ?></h2><div class="col-xs-6 col-sm-3">\n\

     

    As a general suggestion I would use the opportunity to remove the ht-module and replace it by  a hook or better by a content module for the checkout_payment page.

    My favorite is a content module because of the following reasons:

    + we use already a content module for shopping cart, more coherency within the add-on
    + content module can beter controlled in admin: module width and sort order (if used with modular checkout)
    + fits perfect with modular checkout
    + stable and independent of core updates/changes or customizations
    - needs one line of additional code (content module call) in checkout_payment.php if modular checkout is not used

    Your thoughts?

     

    Kind regards
    Rainer


  11. Hello @Omar_one,

    I got it finally to show the error. It only is produced for the navbar modules. If one of the navbar groups is empty the error shows together with another notice error. I tested before with all module groups except the navbar, thats why I couldn't reproduce it until now 😉. Your fix only solves the warning error you posted, but not the notice error.

    Anyway I found by the way that the module controle doesn't work with navbar modules. Even they are ticked to be hidden, they still show up. It seems to be related to the fact that navbar modules are a subgroup of the navbar content module.

    I believe this bug is the underlaying reason for the error messages. Once the navbar modules will work properly, the errors should also disappear.

    I'll dive back into the code to find a fix when I find some time. For now, just leave the navbar modules unticked. (I believe the error shows only if one navbar group is empty which should not be the case in a real store).


  12. @Omar_one,

    I tried again and impossible to get the warning message.

    I switched off all footer modules, echoed the following:

          if ( $group == 'footer_scripts' ) {
            echo '<br><br>$this->_blocks[$group])' . print_r($this->_blocks[$group]);
            die;
          }

    And get displayed:

    Array ( [0] => [1] => ) 

    without error message.

    My error settings are:

      error_reporting(E_ALL);
      ini_set('display_errors','1'); 

    So I can only guess that you have some additional modifications or specific settings which produce it on your site.

    Do you have added any group which is not core like a second navbar with it's group? Which group you have empty? On which page the error shows up?


  13. thanks, but this error may also occur in core. This line of code is unmodified and identical in core. Anyway I’ll test and include it in the next update.

    Is this stable? Shouldn’t there be a condition if empty or similar. Otherwise what happens if the group is not empty? Array on an array?

    Could it be better to put this line in a condition  which checks if it’s an array.


  14. 50 minutes ago, IAmGrammy said:

    I'm using the latest Frozen release from Github, Bootstrap 4.

    Sorry, but this info is contradictory. If it’s FROZEN, it’s BS3, if it’s BS4, it’s EDGE (not FROZEN).

    Anyway search the marketplace for admin levels, there are several add-ons available. All of them are older and may need some update.


  15. New Version 1.0.1 uploaded.

    Modules Control

    Change-Log Version 1.0.2:
    - added missing language definitions for success messages
    - changed button labels to be more comprehensive and logical
    - changed $_GET to $_POST variable for virtually unlimited page/module combinations
    - tested under PHP 7.2

     


  16. Hello @Omar_one,

    I found some time to update the module. I tried, but could not reproduce this error:

    On 11/8/2018 at 11:34 AM, Omar_one said:

    under php7.2  I get warring

    
    PHP Warning:  implode(): Invalid arguments passed in /home/shop/includes/classes/osc_template.php on line 87

     

    Can you please explain the exact situation when you got it.

    EDIT: I just compared and this line of code is identical to the unmodified core.

    Best regards
    Rainer


  17. You have to do the second part also in checkout_shipping.php.

    You need to invert the order of shipping method /icon and the radio button in this part of the code

          <tr class="table-selection">
            <td>
              <strong><?php echo $quotes[$i]['module']; ?></strong>
              <?php
              if (isset($quotes[$i]['icon']) && tep_not_null($quotes[$i]['icon'])) echo '&nbsp;' . $quotes[$i]['icon'];
              ?>
    
              <?php
              if (isset($quotes[$i]['error'])) {
                echo '<div class="help-block">' . $quotes[$i]['error'] . '</div>';
              }
              ?>
    
              <?php
              if (tep_not_null($quotes[$i]['methods'][$j]['title'])) echo '<div class="help-block">' . $quotes[$i]['methods'][$j]['title'] . '</div>';
              ?>
              </td>
    
    <?php
                if ( ($n > 1) || ($n2 > 1) ) {
    ?>
    
            <td align="right">
              <?php
              if (isset($quotes[$i]['error'])) {
                // nothing
                echo '&nbsp;';
              }
              else {
                echo $currencies->format(tep_add_tax($quotes[$i]['methods'][$j]['cost'], (isset($quotes[$i]['tax']) ? $quotes[$i]['tax'] : 0))); ?>&nbsp;&nbsp;<?php echo tep_draw_radio_field('shipping', $quotes[$i]['id'] . '_' . $quotes[$i]['methods'][$j]['id'], $checked, 'required aria-required="true"');
              }
              ?>
            </td>

     


  18. EDGE BS4 is still under development and continuous changing occur. You may publish an add-on for it and a few days, weeks, months later you have to update it to keep it compatible.

    Meanwhile FROZEN is frozen and your add-on will stay working with it. That's why I still didn't begin to update my FROZEN BS3 add-ons for latest EDGE and BS4. I prefer to wait for the next stable release. 😉

    Most users/developers here recommend EDGE BS4 only for developers or shop owners with coding skills to be able to update FROZEN BS3 add-ons themself.

×