• Resolved jorismathijssen

    (@jorismathijssen)


    Hi! I have a problem with my additional fees that I set up.
    They are not visible when I’m on my shopping cart page. They become visible when I enter the checkout and stay visible when I go back to the shopping cart page.

    So it doesn’t appear on the initial shopping cart visit.
    “Hiding on shopping cart” is not turned on.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author tychesoftwares

    (@tychesoftwares)

    Hi @jorismathijssen,

    Thank you for getting in touch and explaining the situation you’re encountering with your additional payment gateway fees. I understand that you’ve noticed a behavior that might appear a bit unusual at first.

    The reason you’re not seeing the additional payment gateway fees on the shopping cart page is that additional fees, such as shipping charges or taxes, are typically applied during the checkout process and are not immediately displayed on the shopping cart page.

    This is a deliberate design choice to ensure that customers see the most accurate and relevant fees based on their specific payment method. It’s intended to prevent any confusion that might arise from displaying fees too early in the shopping process, before selecting Payment Gateway.

    Please feel free to ask any more questions or share additional information as needed. We’re here to help!

    Thread Starter jorismathijssen

    (@jorismathijssen)

    Hi Tyche,

    That does indeed sound very logical! Sorry for the confusion!

    Do you maybe have an idea or suggestion where I could look to show some fees before a payment method is selected? New laws in my country force me to show all “hidden” fees to be presented when an item is added to a shopping cart… :/

    Plugin Author tychesoftwares

    (@tychesoftwares)

    Hi @jorismathijssen,

    No problem.

    I understand your concern. I’ll have a word with a team and will let you know how can we help you to achieve your requirements.

    Thread Starter jorismathijssen

    (@jorismathijssen)

    I think I found a solution by using the general setting and not a fee per payment method. That is obviously a better solution than adding a fee for each payment method and it is also visible during shopping cart!

    Edit: Never mind, I think I went to the checkout page after changing the settings and when I wasn’t came back to the shopping cart page the fee was added.
    It still wasn’t visible on first visit.

    Plugin Author tychesoftwares

    (@tychesoftwares)

    Hi @jorismathijssen,

    We have added the hook in the plugin to show the fees on the initial shopping cart page even before selecting the payment method on checkout page & I am sending you a patch file to address this.

    1. You can download the code patch from this link – https://www.dropbox.com/scl/fi/8my69ezmkd2yzdsqsmwqr/class-alg-wc-checkout-fees.php?rlkey=na2zgpr8g05jdq9nfzni8f503&dl=0
    2. After downloading the file, you can replace with the original file at /wp-content/plugins/checkout-fees-for-woocommerce/includes/ folder.
    3. Add the below code to functions.php file of your current active theme of your site.

      add_filter( ‘alg_wc_add_default_gateway_on_cart’, ‘add_default_gateway_on_shoping_cart’, 10, 1 );
      /** * Add default gatway to the shopping cart */
      */
      function add_default_gateway_on_shoping_cart( $current_gateway ) {
      if ( ” != $current_gateway ) {
      return $current_gateway;
      }
      $gateways = WC()->payment_gateways->get_available_payment_gateways();
      if ( ! empty( $gateways ) ) {
      foreach ( $gateways as $gateway ) {
      if ( $gateway->enabled == ‘yes’ ) {
      $current_gateway = $gateway->id;
      break;
      }
      }
      }
      return $current_gateway;
      }
    4. The patch makes the necessary changes to fix the bug and has been tested thoroughly. But please make sure you take a backup before replacing the file

      Please let me know if you have any questions or issues with the patch.
Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Additional Fees not visible on initial shopping cart page visit’ is closed to new replies.