diff --git a/payment/uc_2checkout/uc_2checkout.module b/payment/uc_2checkout/uc_2checkout.module index fa2128d..370cef9 100644 --- a/payment/uc_2checkout/uc_2checkout.module +++ b/payment/uc_2checkout/uc_2checkout.module @@ -6,6 +6,7 @@ */ use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Url; /** * Implements hook_help(). @@ -20,6 +21,12 @@ function uc_2checkout_help($route_name, RouteMatchInterface $route_match) { $route_match->getParameter('uc_payment_method')->getPlugin()->getPluginId() == '2checkout') { return '

' . t('To accept PayPal payments in 2Checkout, please ensure that demo mode is disabled and your store currency is one of USD, AUD, CAD, EUR or GBP.') . '

'; } + elseif ($route_name == 'help.page.uc_2checkout') { + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The 2Checkout module is a part of Ubercart - Payment Package. 2Checkout processes Ubercart payments using 2Checkout.com. Configure Payment Methods.
For more information, see the online documentation for the Ubercart module.', [':2checkout-configure' => Url::fromRoute('entity.uc_payment_method.collection')->toString(), ':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart']) . '

'; + return $output; + } } /** diff --git a/payment/uc_authorizenet/uc_authorizenet.module b/payment/uc_authorizenet/uc_authorizenet.module index c994b54..198925b 100644 --- a/payment/uc_authorizenet/uc_authorizenet.module +++ b/payment/uc_authorizenet/uc_authorizenet.module @@ -6,11 +6,26 @@ */ use Drupal\uc_order\OrderInterface; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Url; define('UC_AUTHORIZENET_TEST_GATEWAY_URL', 'https://test.authorize.net/gateway/transact.dll'); define('UC_AUTHORIZENET_LIVE_GATEWAY_URL', 'https://secure.authorize.net/gateway/transact.dll'); /** + * Implements hook_help(). + */ +function uc_authorizenet_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.uc_authorizenet': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The Authorize.net module is a part of Ubercart - Payment Package. Authorize.net processes Ubercart payments using Authorize.net. It supports AIM and ARB. Configure Payment Methods.
For more information, see the online documentation for the Ubercart module.', [':authorizenet-configure' => Url::fromRoute('entity.uc_payment_method.collection')->toString(), ':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart']) . '

'; + return $output; + } +} + +/** * Implements hook_uc_payment_gateway(). */ function uc_authorizenet_uc_payment_gateway() { diff --git a/payment/uc_credit/uc_credit.module b/payment/uc_credit/uc_credit.module index 594137a..f2ac98b 100644 --- a/payment/uc_credit/uc_credit.module +++ b/payment/uc_credit/uc_credit.module @@ -46,6 +46,12 @@ define('UC_CREDIT_KEYFILE_NAME', 'uc_credit.key'); */ function uc_credit_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { + case 'help.page.uc_credit': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The Credit Card module is a part of Ubercart - Payment Package. Credit Card processes payments support for credit card at checkout. Configure Payment Methods.', [':payment-configure' => Url::fromRoute('entity.uc_payment_method.collection')->toString()]) . '

'; + $output .= '

' . t('Read more about Accepting credit card payments. For more information, see the online documentation for the Ubercart module.', [':credit-online' => 'https://www.drupal.org/node/1320106', ':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart']) . '

'; + return $output; case 'uc_credit.terminal': return '

' . t('Use this terminal to process credit card payments through your default gateway.') . '

'; } diff --git a/payment/uc_payment/uc_payment.module b/payment/uc_payment/uc_payment.module index 2c28943..58d0599 100644 --- a/payment/uc_payment/uc_payment.module +++ b/payment/uc_payment/uc_payment.module @@ -20,6 +20,29 @@ use Drupal\uc_payment\ExpressPaymentMethodPluginInterface; use Drupal\uc_payment\Form\OffsitePaymentMethodForm; use Drupal\uc_payment\OffsitePaymentMethodPluginInterface; use Drupal\uc_payment\PaymentReceiptInterface; +use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Url; + +/** + * Implements hook_help(). + */ +function uc_payment_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.uc_payment': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The Payment module is an optional Core component of Ubercart Package. This module enables payments to be taken at checkout. Read Payment settings documentation for selling files in Ubercart site. For more information, see the online documentation for the Ubercart module.', [':payment-online' => 'https://www.drupal.org/node/1309222', ':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart']) . '

'; + $output .= '

' . t('Uses') . '

'; + $output .= '
'; + $output .= '
' . t('Managing Payment Methods') . '
'; + $output .= '
' . t('By default "No payment required" method is enabled. You can add more payment methods by installing additional payment modules. Adding a payment method allows user to choose which payment gateway to use while checkout. You can also Sort/Edit/Delete payment methods in Payment methods page', [':payment-methods' => Url::fromRoute('entity.uc_payment_method.collection')->toString()]) . '
'; + $output .= '
' . t('Manage Order payments') . '
'; + $output .= '
' . t('You can view/delete payments applied in an order. Read more about configuring payment settings.', [':payment-online' => 'https://www.drupal.org/node/1309222']) . '
'; + $output .= '
'; + return $output; + + } +} /** * Implements hook_theme(). diff --git a/payment/uc_paypal/uc_paypal.module b/payment/uc_paypal/uc_paypal.module index 0cdc433..7181bec 100644 --- a/payment/uc_paypal/uc_paypal.module +++ b/payment/uc_paypal/uc_paypal.module @@ -10,11 +10,19 @@ */ use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Url; /** * Implements hook_help(). */ function uc_paypal_help($route_name, RouteMatchInterface $route_match) { + if ($route_name == 'help.page.uc_paypal') { + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The PayPal module is a part of Ubercart - Payment Package. PayPal module processes Ubercart payments via PayPal Payments Standard, WPP and Express Checkout. Configure Payment Methods.', [':payment-configure' => Url::fromRoute('entity.uc_payment_method.collection')->toString()]) . '

'; + $output .= '

' . t('For more information, see the online documentation for the Ubercart module.', [':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart']) . '

'; + return $output; + } // @todo: write better help! // Provide information and instructions on the payment method add form. if ($route_name == 'entity.uc_payment_method.add_form') { diff --git a/shipping/uc_fulfillment/uc_fulfillment.module b/shipping/uc_fulfillment/uc_fulfillment.module index 91a38af..018c776 100644 --- a/shipping/uc_fulfillment/uc_fulfillment.module +++ b/shipping/uc_fulfillment/uc_fulfillment.module @@ -20,6 +20,13 @@ use Drupal\uc_fulfillment\Shipment; */ function uc_fulfillment_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { + case 'help.page.uc_fulfillment': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The Fulfillment module is a part of Ubercart - Core Optional Package. The fulfillementllment module defines the fulfillement methods. By default "Ship Manually" method is listed in Fulfillment Methods page. To add additional fulfillment methods you must install additional modules.', [':fulfillment-manage' => Url::fromRoute('entity.uc_fulfillment_method.collection')->toString()]) . '

'; + $output .= '

' . t('For more information, see the online documentation for the Ubercart module.', [':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart']) . '

'; + return $output; + break; case 'uc_fulfillment.new_package': return '

' . t('Organize products into packages. Package numbers in multiple shipping types are of the first shipping type they appear in. All packages are given a unique ID when they are saved. Choose the default package "Sep." to automatically create a package for each of the selected quantity of products in that row.') . '

'; break; diff --git a/shipping/uc_quote/uc_quote.module b/shipping/uc_quote/uc_quote.module index a56d591..13c8f25 100644 --- a/shipping/uc_quote/uc_quote.module +++ b/shipping/uc_quote/uc_quote.module @@ -17,6 +17,36 @@ use Drupal\Core\Url; use Drupal\uc_order\Entity\Order; use Drupal\uc_order\OrderInterface; use Drupal\uc_store\Address; +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function uc_quote_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.uc_quote': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The Shipping Quotes module is a part of Ubercart - Core Optional Package. The Shipping Quotes module enables shipping quotes to be calculated and displayed at checkout.') . '

'; + $output .= '

' . t("In Ubercart, the order fulfillment is separated from the shipping quotes. The cost to the customer for shipping may have no bearing at all on how the products are shipped. Several quoting modules are available that each represent a set of rules to apply to an order to determine how much fulfillment should cost. Some need only the address of the customer, others use the composition of the products in the order, and still others communicate with a third party (usually the transport company) to get the quote. The store administrato's first job is to decide which quoting methods will be used.") . '

'; + $output .= '

' . t('Read more about configuring Shipping quote settings.', [':quote-online' => 'https://www.drupal.org/node/1309216']) . '

'; + $output .= '

' . t('For more information, see the online documentation for the Ubercart module.', [':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart']) . '

'; + $output .= '

' . t('Uses') . '

'; + $output .= '
'; + $output .= '
' . t('Quote methods') . '
'; + $output .= '
' . t('This page displays an overview of the various shipping quote methods available to Ubercart. Each quote method may be enabled or disabled and given a weight to determine its position in the returned quote. This allows the user to attach conditions and rules for the method that define the situations it is allowed to return a quote. If the conditions fail, a quote is not returned by that method. This is particularly useful for setting up one method to handle domestic shipments, and another for international orders.') . '
'; + $output .= '
' . t('Quote settings') . '
'; + $output .= '
' . t("This section handles global settings that control the display of debug information. They may be helpful in determining what a problem with the shipping quotes is so it can be fixed. The default store address is used as the originating shipping address when it is not overridden by a manufacturer's or product's shipping location.") . '
'; + $output .= '
'; + return $output; + + break; + case 'uc_fulfillment.new_package': + return '

' . t('Organize products into packages. Package numbers in multiple shipping types are of the first shipping type they appear in. All packages are given a unique ID when they are saved. Choose the default package "Sep." to automatically create a package for each of the selected quantity of products in that row.') . '

'; + + break; + } +} /** * Implements hook_theme(). diff --git a/shipping/uc_ups/uc_ups.module b/shipping/uc_ups/uc_ups.module index 901bd24..cfc64d1 100644 --- a/shipping/uc_ups/uc_ups.module +++ b/shipping/uc_ups/uc_ups.module @@ -6,9 +6,27 @@ */ use Drupal\Core\Form\FormStateInterface; +use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Url; /** + * Implements hook_help(). + */ +function uc_ups_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.uc_ups': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The UPS module is a part of Ubercart - Shipping Package. The UPS module uses the Rate and Services Selection XML Tool to get shipping rates published by UPS.') . '

'; + $output .= '

' . t('The quote method can request quotes from either the test or production environment on UPS\'s servers. Use the testing mode until you are fairly certain no more errors occur when requesting quotes. The production environment probably has the most accurate information about shipping rates.') . '

'; + $output .= '

' . t('Read more about configuring UPS shipping.', [':ups-online' => 'https://www.drupal.org/node/1309214']) . '

'; + $output .= '

' . t('For more information, see the online documentation for the Ubercart module.', [':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart']) . '

'; + return $output; + break; + } +} + +/** * Implements hook_menu(). */ function uc_ups_menu() { diff --git a/shipping/uc_usps/uc_usps.module b/shipping/uc_usps/uc_usps.module index f7ade42..760b9d2 100644 --- a/shipping/uc_usps/uc_usps.module +++ b/shipping/uc_usps/uc_usps.module @@ -5,9 +5,25 @@ * United States Postal Service (USPS) shipping quote module. */ +use Drupal\Core\Routing\RouteMatchInterface; use Drupal\Core\Url; /** + * Implements hook_help(). + */ +function uc_usps_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.uc_usps': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The U.S. Postal Service module is a part of Ubercart - Shipping Package. The U.S. Postal Service shipping quote module determines cost for shipping an order via USPS. It uses the USPS Web Services API to send the order details to USPS and retrieve a result for display on the checkout page. This result will be exactly the same as if you went to the USPS web site and filled in your package details manually. The site administrator may restrict which USPS shipping methods are presented to your customer for selection.
Read more about configuring US Postal Service shipping.', [':usps-online' => 'https://www.drupal.org/node/1308256']) . '

'; + $output .= '

' . t('For more information, see the online documentation for the Ubercart module.', [':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart']) . '

'; + return $output; + break; + } +} + +/** * Implements hook_theme(). */ function uc_usps_theme() { diff --git a/uc_ajax_admin/uc_ajax_admin.module b/uc_ajax_admin/uc_ajax_admin.module index 09f20a5..7d55440 100644 --- a/uc_ajax_admin/uc_ajax_admin.module +++ b/uc_ajax_admin/uc_ajax_admin.module @@ -9,11 +9,18 @@ use Drupal\Core\Render\Element; use Drupal\Core\Routing\RouteMatchInterface; use Drupal\uc_order\Entity\Order; use Drupal\uc_order\Entity\OrderProduct; +use Drupal\Core\Url; /** * Implements hook_help(). */ function uc_ajax_admin_help($route_name, RouteMatchInterface $route_match) { + if ($route_name == 'help.page.uc_ajax_admin') { + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The Ubercart Ajax Administration module is a part of Ubercart - Extras Package. Use Ubercart Ajax Administration module to configure AJAX behaviors in Ubercart Forms. Click to Configure Ajax behaviors.
For more information, see the online documentation for the Ubercart module.', [':ajax-configure' => Url::fromRoute('uc_ajax_admin.settings')->toString(), ':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart']) . '

'; + return $output; + } if ($route_name == 'uc_ajax_admin.settings') { $output = '

' . t('Use this page to configure Ajax behaviors on the form. The table below associates triggering form input elements with panes. The contents of each associated pane will be refreshed whenever the customer clicks on or changes the triggering form element. For example, you can cause the available payment methods to be refreshed when the customer changes their billing zone.') . '

'; $output .= '

' . t("Note that the triggering elements you can choose are listed based on the form as it would be displayed to you right now. For example, if none of your shipping methods apply to the current cart contents, you won't see the shipping quote selection element. If you don't see the form element you wish to use as a trigger, try adding some products to the shopping cart or otherwise simulating the customer experience, and verify that those elements are present on the form itself.") . '

'; diff --git a/uc_attribute/uc_attribute.module b/uc_attribute/uc_attribute.module index 944830c..cb56850 100644 --- a/uc_attribute/uc_attribute.module +++ b/uc_attribute/uc_attribute.module @@ -33,6 +33,20 @@ use Drupal\uc_order\OrderProductInterface; */ function uc_attribute_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { + case 'help.page.uc_attribute': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The Product Attributes module is an optional Core component of Ubercart Package. Products are not created equally, and in some cases the customer gets to decide the type of product they want. For example, your store may sell t-shirts, and the customer may find a design they like but need to get it in a certain size. In a situation like this, you will need to take advantage of the product attribute system in Ubercart. It lets you define attributes (like size), give them options (like small, medium, and large), and enable attributes and options on a per-product basis. Read Product attributes and options documentation for configuring Attributes and options. For more information, see the online documentation for the Ubercart module.', [':attributes-online' => 'https://www.drupal.org/node/1311856', ':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart']) . '

'; + $output .= '

' . t('Uses') . '

'; + $output .= '
'; + $output .= '
' . t('Managing Product Attributes') . '
'; + $output .= '
' . t('To manage attributes you need to goto Attributes overview page. This page shows a table of existing attributes. To add a new Attribute, click "Add new attribute" button and fill up the form. After adding a new attribute, a table will show up, here you have to add options for the attribute. Click "Add new option" to add an option for current Attribute. you can also set price and display order for each of these options. Read more documentation about Creating an attribute and its options.', [':attributes-online' => 'https://www.drupal.org/node/1311856', ':attributes' => Url::fromRoute('uc_attribute.overview')->toString()]) . '
'; + $output .= '
' . t('Assigning attributes to products') . '
'; + $output .= '
' . t('To assign an attribute to a product. Browse to the product and click Edit, click on Attributes tab. Click a link labeled "add attributes to this product". Select the attributes you want to add for this product and submit the form. You can now select the option you want when you go to add this product to the cart. Items in the cart will have lines showing the customer their selections.') . '
'; + $output .= '
' . t('Making a textfield attribute') . '
'; + $output .= '
' . t('If you simply need a text field where a customer can enter, for example, a name to be engraved on a plaque, follow the above steps for creating an attribute but don\'t create any options for it. Any attribute assigned to a product with no options enabled will be displayed in the add to cart form as a text field where the customer can enter their own message. There are limits to this method in number of characters allowed and the lack of validation, so you may end up needing to have a custom module made if you need to change either one of these things. For more information read Product attributes and options online documentation.', [':attributes-online' => 'https://www.drupal.org/node/1311856']) . '
'; + $output .= '
'; + return $output; // Help messages for the attributes overview on products and classes. case 'uc_attribute.product_attributes': return '

' . t('Add attributes to this product using the add attributes form. You may then adjust the settings for these attributes on this page and go on to configure their options in the Options tab.', [':url' => Url::fromRoute('uc_attribute.product_attributes_add', ['node' => $route_match->getRawParameter('node')])->toString()]) . '

'; diff --git a/uc_cart/uc_cart.module b/uc_cart/uc_cart.module index cf9288e..cb6a308 100644 --- a/uc_cart/uc_cart.module +++ b/uc_cart/uc_cart.module @@ -14,6 +14,27 @@ use Drupal\Core\Render\Element; use Drupal\Core\Url; use Drupal\uc_cart\CartInterface; use Drupal\uc_payment\PaymentReceiptInterface; +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function uc_cart_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.uc_cart': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The Cart module is a Core component of Ubercart Package. It provides a shopping cart which enables users to add products to cart and purchase items on Ubercart Store. See the Cart settings documentation for customizing cart for Ubercart site. For more information, see the online documentation for the Ubercart module.', [':cart-online' => 'https://www.drupal.org/node/1309322', ':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart']) . '

'; + $output .= '

' . t('Uses') . '

'; + $output .= '
'; + $output .= '
' . t('Viewing Shopping Cart') . '
'; + $output .= '
' . t('Shopping cart can be viewed as a Block or as a Page. Shopping cart lists all the products along with their quantity, price and other details which can be customized at Cart settings.', [':cart-settings' => Url::fromRoute('uc_cart.cart_settings')->toString()]) . '
'; + $output .= '
' . t('Checkout') . '
'; + $output .= '
' . t('To make a purchase, User needs to checkout and make payment. Checking out is a multi-step process, which can be configured in Checkout settings page. To know more about configuring Checkout settings, check the online documentation for Checkout settings.', [':checkout-settings' => Url::fromRoute('uc_cart.checkout_settings')->toString(), ':checkout-online' => 'https://www.drupal.org/node/1309324']) . '
'; + $output .= '
'; + return $output; + } +} /** * Implements hook_cron(). diff --git a/uc_cart_links/src/Controller/CartLinksHelp.php b/uc_cart_links/src/Controller/CartLinksHelp.php index 7078fe8..01f5e7f 100644 --- a/uc_cart_links/src/Controller/CartLinksHelp.php +++ b/uc_cart_links/src/Controller/CartLinksHelp.php @@ -23,13 +23,17 @@ class CartLinksHelp { '#prefix' => '

', '#suffix' => '

', ); + $prefix = '

' . t('About') . '

'; + $prefix .= '

'; $build['introduction'] = array( - '#prefix' => '

', + '#prefix' => $prefix, '#markup' => t("Cart Links allow you to craft links that add products to customer shopping carts and redirect customers to any page on the site. A store owner might use a Cart Link as a 'Buy it now' link in an e-mail, in a blog post, or on any page, either on or off site. These links may be identified with a unique ID, and clicks on these links may be reported to the administrator in order to track the effectiveness of each unique ID. You may track affiliate sales, see basic reports, and make sure malicious users don't create unapproved links."), '#suffix' => '

', ); + $prefix = '

' . t('Uses') . '

'; + $prefix .= '

' . t('The following actions may be configured to occur when a link is clicked:') . '

'; $build['uses'] = array( - '#prefix' => t('The following actions may be configured to occur when a link is clicked:'), + '#prefix' => $prefix, '#theme' => 'item_list', '#items' => array( t("Add any quantity of any number of products to the customer's cart, with specific attributes and options for each added product, if applicable."), diff --git a/uc_catalog/uc_catalog.module b/uc_catalog/uc_catalog.module index 1fff79c..c024fe0 100644 --- a/uc_catalog/uc_catalog.module +++ b/uc_catalog/uc_catalog.module @@ -24,6 +24,18 @@ use Drupal\node\NodeTypeInterface; */ function uc_catalog_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { + case 'help.page.uc_catalog': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The Catalog module is an optional Core component of Ubercart Package. Catalog module makes it easy to start selling products on Ubercart site by showing products in a better way to customers. When it is first installed, a vocabulary named Product Catalog is created. See the Catalog settings documentation for customizing cart for Ubercart site. For more information, see the online documentation for the Ubercart module.', [':catalog-online' => 'https://www.drupal.org/node/1311866', ':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart']) . '

'; + $output .= '

' . t('Uses') . '

'; + $output .= '
'; + $output .= '
' . t('Configuring Catalog') . '
'; + $output .= '
' . t('The Catalog settings page under Store Administration lets you change which vocabulary is used as the product catalog. There is also a text field to set the URL that links to the main catalog page. The checkboxes contain various display settings for the catalog block and pages. The choice for the number of grid columns should be based on your theme.', [':catalog-settings' => Url::fromRoute('uc_catalog.settings')->toString()]) . '
'; + $output .= '
' . t('Orphaned Products') . '
'; + $output .= '
' . t('Orphaned products are products that you have created but not yet assigned to a category in your product catalog. All such products will appear as links below that you can follow to edit the product listings to assign them to categories.', [':orphaned-products' => Url::fromRoute('uc_catalog.orphans')->toString()]) . '
'; + $output .= '
'; + return $output; case 'uc_catalog.orphans': return '

' . t('Orphaned products are products that you have created but not yet assigned to a category in your product catalog. All such products will appear as links below that you can follow to edit the product listings to assign them to categories.') . '

'; diff --git a/uc_file/uc_file.module b/uc_file/uc_file.module index 14eb1df..c7aec0d 100644 --- a/uc_file/uc_file.module +++ b/uc_file/uc_file.module @@ -28,6 +28,23 @@ define('UC_FILE_LIMIT_SENTINEL', -1); */ function uc_file_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { + case 'help.page.uc_file': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The File Downloads module is an optional Core component of Ubercart Package. To start selling files, you need to make sure you have enabled the File Downloads module. The File Downloads module makes use of Ubercart\'s product feature system that lets you attach additional features to products (e.g. file download or discount). Read selling files documentation for selling files in Ubercart site. For more information, see the online documentation for the Ubercart module.', [':file-online' => 'https://www.drupal.org/node/1311834', ':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart']) . '

'; + $output .= '

' . t('Uses') . '

'; + $output .= '
'; + $output .= '
' . t('Configuring File Downloads') . '
'; + $output .= '
' . t('After enabling the module, you\'ll want to set the permissions on who can access what parts of the module. You will also need to set up the file downloads directory that will be used to store all the digital products you will be selling for your store. If you haven\'t set it (or Ubercart can\'t find the directory you have specified), you will see a warning on the Store administration page (Administer > Store administration).') . '
'; + $output .= '
' . t('If you\'re perhaps wondering why you should have to specify a file download directory instead of using Drupal\'s files directory, a separate directory is needed for security reasons; specifying a directory outside of your web root prevents the possibility of someone figuring out where your files are stored and downloading them directly off your web server instead of paying for them. Read more about settings documentation online', [':file-online' => 'https://www.drupal.org/node/1311834']) . '
'; + $output .= '
' . t('Adding Files to file manager') . '
'; + $output .= '
' . t('Once your file download directory has been setup you\'re ready to start adding files to the directory so that they can be used for file downloads. There are two ways to do this. One is through the built in file manager located in Administer > Store administration > Products > View file downloads, this file manager shows all files located in your file directory (with products or SKUs are associated with them) and allows you to delete them or upload new files. Depending on your website\'s configuration, you might want to upload files that are too big for Ubercart to upload. In which case, you will have to use the second method, upload the files directly through a FTP/SFTP/SSH client to your file downloads directory. After uploading the files directly, they should appear in file manager.', [':file-manager' => Url::fromRoute('uc_file.downloads')->toString()]) . '
'; + $output .= '
' . t('Adding Files to Products') . '
'; + $output .= '
' . t('To sell a file, you need to associate File with an Ubercart Product. First create a product. Once your product is created you should see a "Features" tab on the product edit page. After clicking the "Features" link, you\'ll see a empty list of product features. Select "File download" from the Add a new feature select box and click "Add". The next step is to fill out the feature form with details like: Model/SKU, File Download, Description, etc.') . '
'; + $output .= '
' . t('Downloading Files') . '
'; + $output .= '
' . t('At this point, any customers that purchase the product should have a file download granted once their order goes into the status you have specified. From here it is up to you to set up a conditional action that will move the order into the correct status once a customer has paid, and then to notify the customer where they can go to download the file they\'ve purchased. Once a customer is granted a download they can go to My account > Files to download the file. For more information read selling files documentation online', [':file-online' => 'https://www.drupal.org/node/1311834']) . '
'; + $output .= '
'; + return $output; case 'uc_product.feature_add': if ($route_match->getRawParameter('fid') == 'file') { return '

' . t('Attach a file download to your product by selecting the specific product SKU and overriding the default download limits, if desired.') . '

'; diff --git a/uc_googleanalytics/uc_googleanalytics.module b/uc_googleanalytics/uc_googleanalytics.module index 6955231..ccbdd2f 100644 --- a/uc_googleanalytics/uc_googleanalytics.module +++ b/uc_googleanalytics/uc_googleanalytics.module @@ -13,6 +13,21 @@ use Drupal\Component\Serialization\Json; use Drupal\uc_order\Entity\Order; use Drupal\uc_order\OrderInterface; +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function uc_googleanalytics_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.uc_googleanalytics': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The Google Analytics for Ubercart module is a part of Ubercart - Extras Package. It adds e-commerce tracking to Google Analytics module. For more information, see the online documentation for the Ubercart module.', [':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart']) . '

'; + return $output; + break; + } +} /** * Implements hook_enable(). diff --git a/uc_order/uc_order.module b/uc_order/uc_order.module index 66f8133..178f2f8 100644 --- a/uc_order/uc_order.module +++ b/uc_order/uc_order.module @@ -31,6 +31,21 @@ require_once dirname(__FILE__) . '/uc_order.line_item.inc'; */ function uc_order_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { + case 'help.page.uc_order': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('When a customer goes through checkout, an order is first created when they review it prior to confirmation. This is so that information may be easily added to the form on the checkout screen if they need to go back to modify their information. The order\'s status is set to "In Checkout", and it is updated to "Pending" once checkout is complete. ') . '

'; + $output .= '

' . t('The Order module is a Core component of Ubercart Package. This lets store administrators browse orders that were never checked out and make follow-up calls to customers to try and make the sale. See the Order settings documentation for customizing Order settings for Ubercart site. For more information, see the online documentation for the Ubercart module.', [':order-online' => 'https://www.drupal.org/node/1311868', ':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart']) . '

'; + $output .= '

' . t('Uses') . '

'; + $output .= '
'; + $output .= '
' . t('Viewing Customers') . '
'; + $output .= '
' . t('Shows a list of all customers who have placed an order in your site.', [':customers' => Url::fromUri('internal:/admin/store/customers/view')->toString()]) . '
'; + $output .= '
' . t('Viewing and Searching Orders') . '
'; + $output .= '
' . t('You can view existing order or search order.', [':view-order' => Url::fromUri('internal:/admin/store/orders/view')->toString(), ':search-order' => Url::fromUri('internal:/admin/store/orders/search')->toString()]) . '
'; + $output .= '
' . t('Configuring Order settings') . '
'; + $output .= '
' . t('Order can vary from one store to other. Configure Order workflows, Fields, Display settings in Order workflow settings page. To read more, check online documentation for Order Settings.', [':order-settings' => Url::fromRoute('uc_order.workflow')->toString(), ':order-online' => 'https://www.drupal.org/node/1311868']) . '
'; + $output .= '
'; + return $output; case 'uc_order.workflow': return '

' . t('Order statuses with a list position below zero are considered inactive when filtering lists of orders.') . '

'; } diff --git a/uc_product/uc_product.module b/uc_product/uc_product.module index f02a62d..d82b0b8 100644 --- a/uc_product/uc_product.module +++ b/uc_product/uc_product.module @@ -21,6 +21,31 @@ use Drupal\field\Entity\FieldStorageConfig; use Drupal\node\Entity\NodeType; use Drupal\node\NodeInterface; use Drupal\node\NodeTypeInterface; +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function uc_product_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.uc_product': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The Product module is a Core component of Ubercart Package. Products are things which can be sold in store. When you first install Ubercart, you will have a single node type to use called Product. The Product node type holds all the information Ubercart needs to sell and ship products on your website. Goto View Products to list all products available in your site. For more information, see the online documentation for the Ubercart module.', [':product-online' => 'https://www.drupal.org/node/1311870', ':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart', ':view-products' => Url::fromUri('internal:/admin/store/products/view')->toString()]) . '

'; + $output .= '

' . t('Uses') . '

'; + $output .= '
'; + $output .= '
' . t('Adding Products') . '
'; + $output .= '
' . t('To add a new product, use Content -> Add Content -> Product. (If you don\'t see the Product option under Add Content, go to the Permissions page and make sure your role has the right permissions to create and edit Product nodes) The Ubercart 3.0 User Manual has detailed information about adding products.', [':detailed' => 'http://www.ubercart.org/docs/user/30523/clone_basic_product_creation']) . '
'; + $output .= '
' . t('Configuring Product Fields and Settings') . '
'; + $output .= '
' . t('You can customize the fields and display settings for your products. Check Product settings page. To read more, check online documentation for Product Settings.', [':product-settings' => Url::fromRoute('uc_product.settings')->toString(), ':product-online' => 'https://www.drupal.org/node/1311870']) . '
'; + $output .= '
' . t('Product Classes') . '
'; + $output .= '
' . t('Ubercart lets you add multiple product node types beyond the default Product type. These additional types are referred to as Product classes. Ubercart will treat any Product class as a normal Product node, automatically adding product images and all the other fields needed by Ubercart as well as letting customers view these classes in the catalog and add them to their carts. Ubercart allows you to assign attributes and options defaults to each Product class. Configure Product Classes for your site. To read more, check online documentation about Product Classes.', [':manage-classes' => Url::fromUri('internal:/admin/store/products/classes')->toString(), ':online-class' => 'https://www.drupal.org/node/1310466']) . '
'; + $output .= '
' . t('Orphaned Products') . '
'; + $output .= '
' . t('Orphaned products are products that you have created but not yet assigned to a category in your product catalog. All such products will appear as links below that you can follow to edit the product listings to assign them to categories. View orphaned products.', [':orphaned-products' => Url::fromUri('internal:/admin/store/products/orphans')->toString()]) . '
'; + $output .= '
'; + return $output; + } +} /** * Implements hook_page_attachments(). diff --git a/uc_product_kit/uc_product_kit.module b/uc_product_kit/uc_product_kit.module index da24bfd..0f43608 100644 --- a/uc_product_kit/uc_product_kit.module +++ b/uc_product_kit/uc_product_kit.module @@ -20,12 +20,27 @@ use Drupal\node\NodeTypeInterface; use Drupal\uc_order\OrderInterface; use Drupal\uc_order\OrderProductInterface; use Symfony\Component\HttpFoundation\RedirectResponse; +use Drupal\Core\Routing\RouteMatchInterface; define('UC_PRODUCT_KIT_UNMUTABLE_NO_LIST', -1); define('UC_PRODUCT_KIT_UNMUTABLE_WITH_LIST', 0); define('UC_PRODUCT_KIT_MUTABLE', 1); /** + * Implements hook_help(). + */ +function uc_product_kit_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.uc_product_kit': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The Product Kit module is a part of Ubercart - Extras Package. The product kit module allows you to group products as bundles, so that you can actually add the entire kit(rather than its individual components) to your cart with an optional discount. For more information, see the online documentation for the Ubercart module.', [':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart']) . '

'; + return $output; + break; + } +} + +/** * Implements hook_page_attachments(). */ function uc_product_kit_page_attachments(&$page) { diff --git a/uc_report/uc_report.module b/uc_report/uc_report.module index 385ce25..d1d5f2d 100644 --- a/uc_report/uc_report.module +++ b/uc_report/uc_report.module @@ -19,6 +19,22 @@ use Drupal\uc_order\Entity\OrderStatus; * Implements hook_help(). */ function uc_report_help($route_name, RouteMatchInterface $route_match) { + if ($route_name == 'help.page.uc_report') { + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The Report module is an optional Core component of Ubercart Package. This module creates reports for customers, for products, and for sales. All reports, with the exception of the sales summary, can be exported to a CSV file. Read Viewing reports documentation. For more information, see the online documentation for the Ubercart module.', [':report-online' => 'https://www.drupal.org/node/1312384', ':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart']) . '

'; + $output .= '

' . t('Uses') . '

'; + $output .= '
'; + $output .= '
' . t('Viewing Customer reports') . '
'; + $output .= '
' . t('In the customer report you\'ll be able to view all customers (or users) of your site. For each customer (user) account you\'ll be able to view the customer name (the billing or shipping name depending on preference), the user name, the total number of orders placed by the account, the total number of products ordered, the total revenue produced for the store, and the average amount of revenue the customer has produced for each order. Clicking on customer names will take you to their current orders, while clicking on a user name will take you to their user account page where their order history can be reviewed.') . '
'; + $output .= '
' . t('Viewing Product reports') . '
'; + $output .= '
' . t('In the product report you will be able to view all products on your site. For each you can review the product name and model, the number of views the product has received (if the Statistics module is enabled), the number of the product sold, the revenue produced for the store, and the gross profit from the sales of the product. If your product has attributes and model/SKU adjustments, this data will be further broken down by model/SKU name.') . '
'; + $output .= '
' . t('Viewing Sales reports') . '
'; + $output .= '
' . t('This report creates a general overview of the store sales in a few tables. The first table provides the number of orders, income produced, and the average income per order for the current day, yesterday, and the daily average. Below that, a monthly projection is provided. The second table provides the grand total sales, total customers, new customers for the day, and current logged in customers. The last table provides a breakdown of order statuses for all orders in the store.') . '
'; + $output .= '
'; + return $output; + } + $output = ''; $route = \Drupal::routeMatch()->getRouteName(); diff --git a/uc_role/uc_role.module b/uc_role/uc_role.module index 81e6857..9f28926 100644 --- a/uc_role/uc_role.module +++ b/uc_role/uc_role.module @@ -23,6 +23,24 @@ use Drupal\user\UserInterface; */ function uc_role_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { + case 'help.page.uc_role': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The Roles Assignments module is an optional Core component of Ubercart Package. Roles Assignments module assigns roles(permanent or expirable) based on product purchased. Read Selling site access(roles) documentation for configuring roles assignments in Ubercart site. For more information, see the online documentation for the Ubercart module.', [':role-online' => 'https://www.drupal.org/node/1312418', ':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart']) . '

'; + $output .= '

' . t('Uses') . '

'; + $output .= '
'; + $output .= '
' . t('Configuring Role Assignments') . '
'; + $output .= '
' . t('If you haven\'t setup the module you will see a warning message at Administer > Store administration. The Roles module is set up under Administer > Store administration > Configuration > Product setting. Check online documentation to know more about settings.', [':role-online' => 'https://www.drupal.org/node/1312418']) . '
'; + $output .= '
' . t('Adding Role assignment to Product') . '
'; + $output .= '
' . t('To assign a role to a product, First create a product or edit an existing one. Once your product is created you should see a "Features" tab on the product edit page. After clicking the "Features" link, you\'ll see a empty list of product features. Select "Role assignment" from the Add a new feature select box and click "Add".') . '
'; + $output .= '
' . t('User/Role expiration Administration') . '
'; + $output .= '
' . t('For viewing any role expirations you can browse to Administer > User management > Users > Role expiration. On this page you will see all role expirations that are set to occur. From this page you can view people\'s user page, edit their role expirations, or delete their role expirations.') . '
'; + $output .= '
' . t('Customer Notification') . '
'; + $output .= '
' . t('If you wish to send the customer a notification about new roles, you can do so with the built in notification support. To do this make sure you enable the Notify module in the same place where you enabled the Roles module. After the Notify module is enabled, you can browse to Administer > Store administration > Configuration > Notification settings > Role assignment where you can set up the email templates that will get set out to the customer once they complete the sale. On this form you will see four links, each dealing with a different notification: new role assignment, expiration of a role, renewal of a role, and a reminder message of a pending expiration.') . '
'; + $output .= '
'; + $output .= '

' . t('To know more about configuring assigning roles check online documentation.', [':role-online' => 'https://www.drupal.org/node/1312418']) . '

'; + return $output; + break; case 'uc_role.expiration': return '

' . t('Ubercart grants certain roles to customers when they purchase products with a role assignment feature. These can be permanent or temporary roles. Here you can view and edit when temporary roles are set to expire.') . '

'; break; diff --git a/uc_stock/uc_stock.module b/uc_stock/uc_stock.module index dc9572b..2f4b041 100644 --- a/uc_stock/uc_stock.module +++ b/uc_stock/uc_stock.module @@ -14,12 +14,19 @@ */ use Drupal\Core\Routing\RouteMatchInterface; +use Drupal\Core\Url; /** * Implements hook_help(). */ function uc_stock_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { + case 'help.page.uc_stock': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The Stock module is a part of Ubercart - Extras Package. The Stock module creates a report for all SKUs that are tracked by the module. The shows all track SKUs, their associated product, stock value, and threshold value (the value at which an admin is notified of the stock level). Like the reports generated by the Reports module, you can export the report to a CSV file.') . '

'; + $output .= '

' . t('The stock settings page contains all the configurations for the Ubercart\'s stock keeping module. Read how to configure Stock Settings online documentation. For more information, see the online documentation for the Ubercart module.', [':stock-online' => 'https://www.drupal.org/node/1311874', ':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart', ':stock-settings' => Url::fromRoute('uc_stock.settings')->toString()]) . '

'; + return $output; case 'uc_stock.edit': return '

' . t('To keep track of stock for a particular product SKU, make sure it is marked as active and enter a stock value. When the stock level drops below the threshold value, you can be notified based on your stock settings.') . '

'; case 'admin/store/reports/stock': diff --git a/uc_store/uc_store.module b/uc_store/uc_store.module index a8a7490..df45a51 100644 --- a/uc_store/uc_store.module +++ b/uc_store/uc_store.module @@ -137,12 +137,27 @@ function template_preprocess_uc_price(&$variables) { function uc_store_help($route_name, RouteMatchInterface $route_match) { switch ($route_name) { case 'help.page.uc_store': - $output = '

' . t('Ubercart') . '

'; - $output .= '

' . t('Use the following links to find documentation and support:') . '

'; + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The Store module is a Core component of Ubercart Package. It is responsible for handling store settings and Management of your Ubercart store. See the Store settings documentation for customizing your store. For more information, see the online documentation for the Ubercart module.', array(':store-online' => 'https://www.drupal.org/node/1311876', ':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart')) . '

'; + $output .= '

' . t('Useful links for documentation and support:') . '

'; $output .= ''; + $output .= '

' . t('Uses') . '

'; + $output .= '
'; + $output .= '
' . t('Configuring Store') . '
'; + $output .= '
' . t('Ubercart store has many configuration options like Basic Information, Store address, Currency format, Weight format, Length format, Display settings, Reporting settings. Click configure store to modify your store configurations.', [':store-settings' => Url::fromRoute('uc_store.config_form')->toString(), ':configure-store' => Url::fromUri('internal:/admin/store/config/store')->toString()]) . '
'; + $output .= '
' . t('Configuring Address fields') . '
'; + $output .= '
' . t('You can choose fields to show/hide while displaying an address field.', [':configure-address' => Url::fromUri('internal:/admin/store/config/store/fields')->toString()]) . '
'; + $output .= '
' . t('Viewing Reports') . '
'; + $output .= '
' . t('Lists various reports for Eg: Customer reports, Product reports, etc. generated by Ubercart modules.') . '
'; + $output .= '
'; + return $output; + + $output = '

' . t('Ubercart') . '

'; + return $output; case 'uc_store.reports': diff --git a/uc_tax/uc_tax.module b/uc_tax/uc_tax.module index 6ef53c1..3d3c569 100644 --- a/uc_tax/uc_tax.module +++ b/uc_tax/uc_tax.module @@ -13,6 +13,21 @@ use Drupal\Core\Form\FormStateInterface; use Drupal\node\Entity\NodeType; use Drupal\node\NodeInterface; use Drupal\uc_order\OrderInterface; +use Drupal\Core\Routing\RouteMatchInterface; + +/** + * Implements hook_help(). + */ +function uc_tax_help($route_name, RouteMatchInterface $route_match) { + switch ($route_name) { + case 'help.page.uc_tax': + $output = ''; + $output .= '

' . t('About') . '

'; + $output .= '

' . t('The Tax module is an optional Core component of Ubercart Package. The Tax module provides tax rules which controls the tax applied to an order. Read Tax settings documentation for configuring Taxes in Ubercart site. For more information, see the online documentation for the Ubercart module.', [':tax-online' => 'https://www.drupal.org/node/1311878', ':ubercart' => 'https://www.drupal.org/documentation/modules/ubercart']) . '

'; + return $output; + } +} + /** * Implements hook_module_implements_alter().