Skip to content
  1. Extras
  2. msProfile
  3. Snippets
  4. msProfileCharge

msProfileCharge

Snippet for topping up the user's internal account.

NameDefaultDescription
&tplFormtpl.msProfile.charge.formChunk for the account top-up form. You can use @INLINE chunks without filters and snippets.
&tplPaymenttpl.msProfile.charge.paymentChunk for a single payment method. You can use @INLINE chunks without filters and snippets.
&tplOrdertpl.msOrder.successChunk for successful order. By default uses miniShop2 chunk — tpl.msOrder.success.
&paymentsComma-separated list of payment method ids. Prefix with minus to exclude a method.
&sortbyorderField to sort payment methods by.
&sortdirASCSort direction: ascending or descending.
&limit0Result limit.
&outputSeparator\nCharacter to separate output; default is newline.
&minSum200Minimum amount for account top-up.
&maxSum0Maximum amount for account top-up.
&showInactivetrueShow inactive payment methods. Default yes, so methods disabled for miniShop2 payment can still be used.

When the snippet is called, the account top-up form is displayed. Top-up uses the configured miniShop2 payment methods.

Note that you can configure the store so all actual purchases go only from the user account, and the user tops up via available payment methods. To do this, disable all methods in miniShop2 settings (except CustomerAccount) so they do not appear at checkout. The msProfileCharge snippet will still use them — this is controlled by the &showInactive parameter.

You can also specify which methods to include or exclude with the &payments parameter.

When topping up, a standard miniShop2 order is created with a virtual product "Account top-up", and the user receives an email. Requires miniShop2 2.1.8 or higher for virtual products.