Add merchant email and phone number to receipt (probably "general_information")

This must be an easy one.
How do I add my merchant name, email, and phone number to the "General Information" section of the online receipt?
I'd also like to add a little note to say, "Please check your spam folder, since my email receipt may wind up there"

Yes, I see there's a block called general_information
How do I add things to it?

Thanx,
-Cliff
Comments
  • fc_adamfc_adam FoxyCart Team
    @CliffS,

    Good question. We don't currently have a configuration option for adding additional information to the "General Information" section, so you'll need to customise the template instead.

    Within your store's FoxyCart administration - head to the "receipt" section and select "custom template". The text area will appear with the default receipt template there. Inside the textarea, look for these lines of code:
    {% embed 'receipt.inc.twig' %}
    {% endembed %}
    And replace it with this:
     {% embed 'receipt.inc.twig' %}

    {% block general_information %}
    <div id="fc-receipt__section--general-information" class="fc-receipt__section">
    <fieldset>
    <legend>{{ config.lang.checkout_general_information|raw }}</legend>
    <div class="fc-form-group fc-form-group--static fc-form-group--receipt--store-name">
    <label class="fc-form-label fc-container__grid--static-label--store-name">{{ config.lang.checkout_merchant|raw }}</label>
    <div class="fc-container__grid--static-input--store-name">
    <p class="fc-form-control--static">{{ config.store_name }}</p>
    </div>
    </div>
    <div class="fc-form-group fc-form-group--static fc-form-group--receipt--order-id">
    <label class="fc-form-label fc-container__grid--static-label--order-id">{{ config.lang.checkout_order_id|raw }}</label>
    <div class="fc-container__grid--static-input--order-id">
    <p class="fc-form-control--static">{{ order_id }}</p>
    </div>
    </div>
    {% if purchase_order %}
    <div class="fc-form-group fc-form-group--static fc-form-group--receipt--purchase-order">
    <label class="fc-form-label fc-container__grid--static-label--purchase-order">{{ config.lang.checkout_purchase_order|raw }}</label>
    <div class="fc-container__grid--static-input--purchase-order">
    <p class="fc-form-control--static">{{ purchase_order }}</p>
    </div>
    </div>
    {% endif %}
    {% if payment_type == 'plastic' and cc_number_masked %}
    <div class="fc-form-group fc-form-group--static fc-form-group--receipt--credit-card">
    <label class="fc-form-label fc-container__grid--static-label--credit-card">{{ config.lang.checkout_card_number|raw }}</label>
    <div class="fc-container__grid--static-input--credit-card">
    <p class="fc-form-control--static">{{ cc_number_masked }} ({{ cc_type }})</p>
    </div>
    </div>
    {% endif %}

    <div class="fc-form-group fc-form-group--static fc-form-group--receipt--date">
    <label class="fc-form-label fc-container__grid--static-label--date">{{ config.lang.checkout_date|raw }}</label>
    <div class="fc-container__grid--static-input--date">
    <p class="fc-form-control--static">{{ checkout_date }}</p>
    </div>
    </div>
    <div class="fc-form-group fc-form-group--static fc-form-group--receipt--processor-response">
    <label class="fc-form-label fc-container__grid--static-label--processor-response">{{ config.lang.checkout_processor_response|raw }}</label>
    <div class="fc-container__grid--static-input--processor-response">
    <p class="fc-form-control--static">{{ processor_response }}</p>
    </div>
    </div>

    <div class="fc-form-group fc-form-group--static">
    <label class="fc-form-label">Custom label</label>
    <div class="fc-container__grid--static-input">
    <p class="fc-form-control--static">Custom Value</p>
    </div>
    </div>

    </fieldset><!-- #fc_receipt_general -->
    </div>
    {% endblock general_information %}

    {% endembed %}

    What that code does is adds the default "general information" block of code and allows you to overwrite it - while maintaining the rest of the default receipt template. A whole bunch of the code within the general information block is the default markup that makes up that section in the receipt. Right towards the end though is the following code:
    <div class="fc-form-group fc-form-group--static">
    <label class="fc-form-label">Custom label</label>
    <div class="fc-container__grid--static-input">
    <p class="fc-form-control--static">Custom Value</p>
    </div>
    </div>
    That is an example of adding in an additional name/value pair to the general information.


    In terms of the additional note - it depends where you want to add it. You could customise the receipt again to add it somewhere, or you could add it to the green area at the top by editing the entry within the 'language' section of your store's administration that matches.
  • Whew! I figured this would be easy.
  • brettbrett FoxyCart Team
    @CliffS, it should be. For some reason, when we figure out what would be configurable, this wasn't part of it, but it definitely should be. We'll take a look at adding this to v2.0, because it's come up a few times, and it's silly we don't have a default template config option for it.
  • Thanks Brett.

    Please inform if/when this happens!
Sign In or Register to comment.