Skip to content

Commit

Permalink
improved faq page
Browse files Browse the repository at this point in the history
  • Loading branch information
mandan2 committed Sep 19, 2023
1 parent 867408b commit 877f838
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 17 deletions.
7 changes: 6 additions & 1 deletion src/Builder/FormBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,11 @@ private function getShippingOptions(string $tab): array

$mappedCarriers = [];

$mappedCarriers[] = [
'id' => 0,
'name' => $this->module->l('Not selected', self::FILE_NAME),
];

foreach ($carriers as $carrier) {
$mappedCarrier = [];

Expand All @@ -858,7 +863,7 @@ private function getShippingOptions(string $tab): array
$options = [
'type' => 'select',
'label' => $this->module->l('Select shipping option to use in subscription orders', self::FILE_NAME),
'desc' => $this->module->l('This method is used when recurring orders are created.', self::FILE_NAME),
'desc' => $this->module->l('WARNING: do not change selection after getting first subscription order.', self::FILE_NAME),
'tab' => $tab,
'name' => Config::MOLLIE_SUBSCRIPTION_ORDER_CARRIER_ID,
'options' => [
Expand Down
33 changes: 18 additions & 15 deletions subscription/Controller/Symfony/SubscriptionFAQController.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,23 @@ class SubscriptionFAQController extends AbstractSymfonyController
*/
public function indexAction()
{
return $this->render('@Modules/mollie/views/templates/admin/Subscription/subscriptions-faq.html.twig',
[
'subscriptionCreationTittle' => $this->module->l('Subscription creation', self::FILE_NAME),
'subscriptionCreation' => $this->module->l('To create a subscription option for a product variation, assign it a Mollie subscription attribute.', self::FILE_NAME),
'importantInformationTittle' => $this->module->l('IMPORTANT points', self::FILE_NAME),
'importantInformation' => $this->module->l('When you add Mollie subscription attributes, make sure you always include \'none\' as a fallback.', self::FILE_NAME),
'cartRuleTitle' => $this->module->l('Cart rules', self::FILE_NAME),
'cartRule' => $this->module->l('A customer can\'t add a subscription item to the shopping cart if it already contains a non-subscription item.', self::FILE_NAME),
'cartRule2' => $this->module->l('A customer can\'t add subscription items with different recurring periods to the same shopping cart.', self::FILE_NAME),
'cartRule3' => $this->module->l('Do not use cart rules with subscription products as this will cause errors due to incorrect pricing.', self::FILE_NAME),
'subscriptionOrderLogicTitle' => $this->module->l('Recurring order creation', self::FILE_NAME),
'recurringOrderCreation' => $this->module->l('Mollie for Prestashop automatically creates a new order when the previous order is paid for.', self::FILE_NAME),
'recurringOrderPrice' => $this->module->l('Recurring orders always use the product price that was specified when the related subscription was created.', self::FILE_NAME),
'recurringOrderAPIChanges' => $this->module->l('Recurring order will override the “Method” payment setting and will be using Mollie’s Payment API.', self::FILE_NAME),
]);
return $this->render('@Modules/mollie/views/templates/admin/Subscription/subscriptions-faq.html.twig', [
'subscriptionCreationTittle' => $this->module->l('Subscription creation', self::FILE_NAME),
'subscriptionCreation' => $this->module->l('To create a subscription option for a product variation, assign it a Mollie subscription attribute.', self::FILE_NAME),
'importantInformationTittle' => $this->module->l('IMPORTANT points', self::FILE_NAME),
'importantInformation' => $this->module->l('When you add Mollie subscription attributes, make sure you always include \'none\' as a fallback.', self::FILE_NAME),
'carrierInformationTitle' => $this->module->l('IMPORTANT subscription carrier points', self::FILE_NAME),
'carrierInformation1' => $this->module->l('Make sure to select default carrier for recurring orders in advanced settings.', self::FILE_NAME),
'carrierInformation2' => $this->module->l('Carrier should cover all supported shop regions.', self::FILE_NAME),
'carrierInformation3' => $this->module->l('Carrier cannot be changed after first subscription order is placed.', self::FILE_NAME),
'carrierInformation4' => $this->module->l('Selected carrier pricing/weight settings or carrier selection in Mollie should not change. If they do, subscription orders must be cancelled.', self::FILE_NAME),
'cartRuleTitle' => $this->module->l('Cart rules', self::FILE_NAME),
'cartRule' => $this->module->l('A customer can\'t add subscription items with different recurring periods to the same shopping cart.', self::FILE_NAME),
'cartRule2' => $this->module->l('Do not use cart rules with subscription products as this will cause errors due to incorrect pricing.', self::FILE_NAME),
'subscriptionOrderLogicTitle' => $this->module->l('Recurring order creation', self::FILE_NAME),
'recurringOrderCreation' => $this->module->l('Mollie for Prestashop automatically creates a new order when the previous order is paid for.', self::FILE_NAME),
'recurringOrderPrice' => $this->module->l('Recurring orders always use the product price that was specified when the related subscription was created.', self::FILE_NAME),
'recurringOrderAPIChanges' => $this->module->l('Recurring order will override the “Method” payment setting and will be using Mollie’s Payment API.', self::FILE_NAME),
]);
}
}
19 changes: 18 additions & 1 deletion views/templates/admin/Subscription/subscriptions-faq.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,24 @@
</div>
</div>

<div class="row">
<div class="col-lg-12">
<div class="card">
<h3 class="card-header">
<i class="material-icons">info_outline</i> {{ carrierInformationTitle }}
</h3>
<div class="card-block">
<div class="card-text">
<p>{{carrierInformation1}}</p>
<p>{{carrierInformation2}}</p>
<p>{{carrierInformation3}}</p>
<p>{{carrierInformation4}}</p>
</div>
</div>
</div>
</div>
</div>

<div class="row">
<div class="col-lg-12">
<div class="card">
Expand All @@ -68,7 +86,6 @@
<div class="card-text">
<p>{{cartRule}}</p>
<p>{{cartRule2}}</p>
<p>{{cartRule3}}</p>
</div>
</div>
</div>
Expand Down

0 comments on commit 877f838

Please sign in to comment.