Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sunnysideup committed Mar 15, 2017
2 parents ec00467 + 2eee109 commit 777fcec
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 9 deletions.
6 changes: 1 addition & 5 deletions code/OrderConfirmationPage.php
Expand Up @@ -67,7 +67,6 @@ class OrderConfirmationPage extends CartPage
'PaymentSuccessfulMessage' => '<p>Your order will be processed.</p>',
'PaymentNotSuccessfulMessage' => '<p>Your order will not be processed until your payment has been completed.</p>',
'PaymentPendingMessage' => '<p>Please complete your payment before the order can be processed.</p>',
'FeedbackFormLinkText' => 'Do have any feedback about the order process? Let us know ... ',
'FeedbackHeader' => 'Feedback',
'FeedbackValuesFieldLabel' => 'How likely are you to recommend us to your friends?',
'FeedbackValuesOptions' => 'Not At All, Not Likely, Not Sure, Likely, Very Likely',
Expand Down Expand Up @@ -177,7 +176,6 @@ public function customFieldLabels()
'PaymentPendingMessage' => _t('OrderConfirmationPage.PAYMENTPENDINGMESSAGE', 'Message showing when the order has not been paid in full - but the payment is pending.'),
'EnableGoogleAnalytics' => _t('OrderConfirmationPage.ENABLEGOOGLEANALYTICS', 'Enable E-commerce Google Analytics. Make sure it is turned on in your Google Analytics account.'),
'IsFeedbackEnabled' => _t('OrderConfirmationPage.ISFEEDBACKENABLED', 'Enable Feedback Form'),
'FeedbackFormLinkText' => _t('OrderConfirmationPage.FEEDBACKFORMLINKTEXT', 'Email Link Text'),
'FeedbackHeader' => _t('OrderConfirmationPage.FEEDBACKHEADER', 'Feedback Form Header'),
'FeedbackValuesFieldLabel' => _t('OrderConfirmationPage.FEEDBACKVALUESFIELDLABEL', 'Feedback Form Options Label'),
'FeedbackValuesOptions' => _t('OrderConfirmationPage.FEEDBACKVALUESOPTIONS', 'Feedback Form Options'),
Expand Down Expand Up @@ -256,9 +254,7 @@ public function getCMSFields()
TextField::create('FeedbackFormSubmitLabel', $fieldLabels['FeedbackFormSubmitLabel'])
->setRightTitle('Text shown on the feedback form submit button'),
TextField::create('FeedbackFormThankYou', $fieldLabels['FeedbackFormThankYou'])
->setRightTitle('Thank you message displayed to user after submitting the feedback form'),
TextField::create('FeedbackFormLinkText', $fieldLabels['FeedbackFormLinkText'])
->setRightTitle('This is the text shown for the <strong>request feedback link</strong> included in order emails')
->setRightTitle('Thank you message displayed to user after submitting the feedback form')
)
);
return $fields;
Expand Down
1 change: 0 additions & 1 deletion code/forms/OrderForm_Feedback.php
Expand Up @@ -18,7 +18,6 @@ public function __construct(Controller $controller, $name, Order $order)
}
$fields = FieldList::create(
array(
HeaderField::create('FeedbackHeading', $this->getValueFromOrderConfirmationPage('FeedbackHeader'), 3),
OptionsetField::create(
'Rating',
$this->getValueFromOrderConfirmationPage('FeedbackValuesFieldLabel'),
Expand Down
7 changes: 6 additions & 1 deletion templates/Includes/LayoutOrderConfirmationPageInner.ss
Expand Up @@ -12,7 +12,12 @@
<% end_with %>
<% if PaymentForm %><div id="PaymentForm">$PaymentForm</div><% end_if %>
<% if CancelForm %><div id="CancelForm">$CancelForm</div><% end_if %>
<% if FeedbackForm %><div id="FeedbackForm">$FeedbackForm</div><% end_if %>
<% if FeedbackForm %>
<div id="FeedbackForm">
<h3>$FeedbackHeader</h3>
$FeedbackForm
</div>
<% end_if %>
<% else %>
<p class="message bad"><% _t("OrderConfirmationPage.COULDNOTBEFOUND","Your order could not be found.") %></p>
<% end_if %>
Expand Down
1 change: 1 addition & 0 deletions templates/Includes/Order.ss
Expand Up @@ -16,6 +16,7 @@

<% include Order_PrintAndMail %>


</div>


Expand Down
12 changes: 10 additions & 2 deletions templates/Includes/Order_FeedbackFormLink.ss
@@ -1,3 +1,11 @@
<% if $EnableFeedbackForm %>
<a href="$FeedbackFormLink">$FeedbackFormLinkText</a>
<% if $FeedbackLink %>
<h5>
<a href="$FeedbackLink">
<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg" style="transform: scale(-1,1);">
<path d="M0 0h24v24H0z" fill="none"/>
<path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-7 12h-2v-2h2v2zm0-4h-2V6h2v4z"/>
</svg>
Do have any feedback about the order process? Let us know ...
</a>
</h5>
<% end_if %>

0 comments on commit 777fcec

Please sign in to comment.