Custom checkout cached?

Hello
I'm customising the checkout template but I noticed that often FC displays an old template and not the most recent. Then if I login and save the configuration (without any changes) the correct template is shown. Is it something related to cache? How can I avoid this behavior?
Comments
  • fc_adamfc_adam FoxyCart Team
    @dario,

    You noted that it's after re-saving the template that it kicks in - have you tried waiting for a half a minute or so to see if it updates itself as well? There may be a momentary lag before the cached template updates.

    The next time it happens - could you wait for a little while and see if it does update? That will help us focus on where the issue may be - if it's just the cache lagging, or if it's not correctly updating in certain instances.
  • Hello @fc_adam
    I just had the issue, I waited for some minutes without saving but when I refreshed the page it was still showing the wrong template.
  • pixelchutespixelchutes Member
    edited January 2015
    @dario @fc_adam
    I believe this issue has now been resolved. (see this thread)
  • fc_adamfc_adam FoxyCart Team
    @pixelchutes,

    Yes - thanks for posting!
  • @fc_adam

    I don't know if it the same issue but actually in my Checkout, the output is not as it should be. I have changed the section for purchase order on twig template but I don't see any of these changes in the shop.
    Here's the test website mycs.io and below you find the template code. As you see the purchase section still show po# with the input field but there's no radio for bank transfer option...any idea? Is it something related to cache?



    {% if config.supports_purchase_order and not is_updateinfo %}
    <div class="fc-form-group" data-fc-error-for="purchase_order" data-fc-error-class="fc-alert-container--error">
    <div id="fc-payment-method-purchase-order" class="fc-container__grid--payment-method fc-payment-method--purchase-order">
    {% set po_error_string = utils.get_error_string('purchase_order', messages.errors) %}
    <div class="fc-input-group-container {% if payment_method_input_type == 'radio' %}fc-input-group-container--radio{% endif %} {% if payment_method_type == 'purchase_order' %}fc-input-group-container--active{% endif %}">
    <label class="fc-input-group-container__title {% if payment_method_input_type == 'hidden' %}fc-input-group-container__title--forced{% endif %}">
    <input type="{{ payment_method_input_type }}"
    {{ checked(payment_method_type, 'purchase_order') }}
    id="fc_payment_method_purchase_order"
    name="fc_payment_method"
    value="purchase_order"
    autocomplete="off"
    class="fc-form-control fc-form-control--po"/>
    {{ config.lang.checkout_pay_with_purchase_order|raw }}
    </label>

    {% if payment_method_type == 'purchase_order' %}
    <div class="fc-form-group">
    <div class="fc-input-group-container fc-input-group-container--radio">

    <div class="row">
    <label for="bank_transfer">
    <input type="radio"
    id="bank_transfer"
    name="purchase_order"
    value="Bank transfer"
    data-fc-required
    {% if purchase_order == "Bank transfer" %}checked{% endif %}/>
    Banküberweisung (Vorkasse)
    </label>
    </div>
    {# ORIGINAL PURCHASE ORDER FIELD
    <input type="text"
    id="purchase_order"
    name="purchase_order"
    value="{{ purchase_order }}"
    maxlength="30"
    placeholder=""
    autocomplete="off"
    data-fc-required
    class="fc-form-control fc-form-control--po"/>
    #}
    </div>
    </div>
    {% endif %}
    </div>
    <div class="fc-alert fc-alert--danger {{ po_error_string ? 'show' : 'hidden' }}" data-fc-error-for="purchase_order" data-fc-error-class="show,hidden">
    <div class="">{{ config.lang.checkout_error_purchase_order }}</div>
    </div>
    </div>
    </div>
    {% endif %}{# config.supports_purchase_order and not is_updateinfo #}

  • fc_adamfc_adam FoxyCart Team
    @dario,

    Can you confirm your store for me please?
  • fc_adamfc_adam FoxyCart Team
    @dario,

    Thanks for whispering that information. We think we can see what's happening, and we're looking into why it's happening. We'll be back in touch soon.
  • fc_adamfc_adam FoxyCart Team
    @dario,

    It was indeed related to an issue on our side - we've just rolled out a fix for it and looking at your checkout it appears to be working correctly now. Sorry for any inconvenience with your testing.
  • Hello
    I noticed another small issue; in my checkout template I load two images with the following:
    {% set resources_url = 'https://s3-eu-west-1.amazonaws.com/website-production-s3borigin-iqnx4pyfbvrt/' %}
    ....
    <a href="#">
    <img class="hidden-xs" src="{{ resources_url }}img/logo_white_transparent.png" alt="mycs logo">
    <img class="visible-xs" src="{{ resources_url }}img/logo_white_small.png" alt="mycs logo">
    </a>
    I noticed that the console shows 2 404 errors for the 2 files:

    https://mycs-at.foxycart.com/img/logo_white_transparent.png
    https://mycs-at.foxycart.com/img/logo_white_small.png


    which are not required by my template. It looks like the checkout page is loading the 2 images before evaulating {{resources_url}} and get the right url of them. Am I wrong?

    Shop is at.mycs.com, checkout page here https://mycs-at.foxycart.com/

    thanks


  • fc_adamfc_adam FoxyCart Team
    @dario,

    I think you're right there - the script is seeing it as a relative URL to the store, and so appending it with that. Try instead setting it up like this and it should work for you:
    {% set resources_url = 's3-eu-west-1.amazonaws.com/website-production-s3borigin-iqnx4pyfbvrt/' %}
    ....
    <a href="#">
    <img class="hidden-xs" src="https://{{ resources_url }}img/logo_white_transparent.png" alt="mycs logo">
    <img class="visible-xs" src="https://{{ resources_url }}img/logo_white_small.png" alt="mycs logo">
    </a>
    The difference is the src values are prepended with https:// to prevent it being seen as a relative path - and that is also taken from the resources_url value.
Sign In or Register to comment.