Free
Download the package from the manager of your site.
How to download?
The author
Руслан
Packages
1
Downloads
71
Автор дополнения
Packages
1
Downloads
71
Version 1.1.11-pl
Release date 05.28.2020
Downloads 71
Views 1 048
Warning! This component requires PHP version 5.6 or higher! If your site uses PHP less than required, the installation of this package could break it.
Warning! This package requires MODX not less than 2.4 !
THE COMPONENT DOES NOT CONFLICT WITH OTHER BONUS COMPONENTS AND SUCCESSFULLY SUPPLEMENTS THEM

An interesting and very useful article about the proper use of the bonus program www.retail.ru/rbc/pressreleases/pervaya-sistema-bonusnaya-sistema-skidok/

Marketing component (referral-bonus system based on cashback with your store's own coin and personal promotional codes to account for referrals, the number of which depends on the individual percentage of cashback) bringing customers to stores based on miniShop2 — msReferralProgramCoin

At the request of users added:
  • In the context menu of the list of products added items for mass installation and removal of the flag of product participation in the bonus program for selected products in this list.
  • Two settings for the welcome bonus when registering:
    1. The actual number of bonus coins credited to the buyer's balance during registration (0 by default).
    2. Flag for awarding welcome bonuses only if a valid promo code of the inviter is entered, which will increase the motivation for entering the promo code of the inviter!

  • For ease of installation and control, the product participation flag in the cashback bonus program is added to the product table itself in addition to the checkbox on the «product Properties» tab.
  • Mass manual crediting/debiting of bonus coins from the balance of the users.
  • The component adds recalculation of bonuses for accrual and debiting and accordingly recalculates the total amount of the order taking into account the bonus coins being debited and the cost of delivery when editing the order in the site control panel!
  • Added setting the quantitative ratio of the bonus coin to the store's currency, showing the user how many parts(1, 0.1, ...) of the store's currency will account for one unit of the bonus coin.
in version 1.2.0, the following will be added:
  • Registration via a referral link in addition to the existing registration using the personal promo code of the person who invited you.

An example of usage on one of the client sites is here

Clarification on the mechanism for charging and debiting coins with new features:
  • In the latest version 1.1.6, the multiplicity of coins is added, i.e. if you specify 100 in the settings, then 1 coin will cost 0.01 of the store's currency, and if the buyer has a 3% cashback percentage and purchases for $1000(goods marked for participation in the bonus), then 3000 coins will come to his balance.
  • shopping cart Payment is based on the set maximum percentage of shopping cart payment. if you set up that you can pay 30% of the basket with coins, then when you buy for $10 with the set coin payment checkbox, the order amount will become $7 and the balance will remain 2700 coins from the previous item.
  • Welcome coins can be added to the site's control panel, but I think in version 1.1.7 I will add a setting where you can add the number of welcome bonuses when registering ;)
  • Gold and platinum statuses… no, but it can be modified for an additional payment.
  • You can create the name of the coin yourself in the settings.

ReferralProgramCoin — referral bonus system based on cashback with your store's own coin and personal promo codes:

  1. The name of your bonus coin (written in the system settings) you come up with yourself.
  2. You set the maximum percentage (specified in the system settings) of the order amount that the buyer can pay with bonus coins.
  3. Mark products with the amount of purchases that are calculated cashback returned by your bonus coin to the bonus balance of the buyer.
  4. You set the starting percentage of cashback (specified in the system settings) from the amount of purchases of goods (from which it is allowed to return cashback) returned by bonus coins to the bonus balance of the buyer.
  5. In the site control panel, you can individually set the percentage of cashback for each customer (for example, depending on the amount of their purchases or on the number(you will see this amount there in the site control panel directly in the buyer's data row with the ability to sort the list of buyers by it) of the customers attracted by their promo code.
  6. The buyer shares his personal beautiful and protected from forgery promo code thereby linking the customers who came to him in referrals by the number of which the site Manager decides to increase the individual percentage of cashback of this buyer.
  7. The buyer's promo code is not stored anywhere, but is generated dynamically from the user's ID in the site's database and its creation time in this database, which excludes random input of a valid promo code by a random user! And so the code looks readable and conveniently entered as the first letter of the name of your coin is used as the first letter of the code as a decoration and no matter what language it is entered by the customer therefore received the code since parsing names promotion code to search for its owner first letter is not involved. An example of a promo code of the Viscoin coin is V16R25 and as you may have guessed, when entering a promo code, the owner of this promo code is assigned this buyer, which can play an important role when setting the owner of this promo code an individual percentage of cashback.
  8. You can choose which order statuses to take into account and which order statuses to write off cashback (bonuses) on the customer's bonus balance, which is calculated «on the fly»(dynamically in milliseconds).
  9. And also in the site control panel, you can add or deduct any number of bonus coins from the customer's bonus balance regardless of orders.
  10. In the site control panel on the page of the «cashback Management» component, buyers who have brought more than one referral are included in the rating(number of invited) sorting.
  11. The buyer can pay for the order using coins. Payment in coins is made in one click, and the module calculates the number of coins independently. The buyer can cancel the payment in coins if they change their mind with just one click.
  12. And most importantly — installation and configuration of the component is VERY simple(there is no need to go into snippets and chunks of the trash and change something there according to complex instructions, but add the desired snippet to the desired page and that's it!):
  • on the shopping cart page to return cashback in coins to the buyer's balance and add a payment mechanism for the shopping cart in coins
  • on the product page to display the number of coins received from the purchase of a bonus product based on the individual percentage of the user's cashback
  • on the bonus or user profile page to display balance information and other information for this program.


Attention! The component only works with miniShop2 version 2.4.14 and higher! On lower versions, there will be problems due to the absence of the msOnBeforeSaveOrder event.

DOWNLOAD


QUICK START

1. Msreferralprogramcoin namespace settings


Name: connector URL
Key: msrpc_connector_url
default Value: [[+assetsBasePath]]connector.php
allows you to connect your own Ajax request handler from the component forms.


Name: URL for plug-in styles
Key: msrpc_css_url
default Value: [[+cssBasePath]]main.css
allows you to connect your own CSS style file.


Name: URL for the JS file to connect
Key: msrpc_js_url
default Value: [[+jsBasePath]]web/msrpcincluder.js
allows you to connect your own js scripts.


Name: Initial percentage of bonus coins accrual
Key: msrpc_default_pr_payroll_coins
default Value: 3
The starting percentage of cashback(return of the bonus coin part of the amount of purchases of bonus products) by default (the administrator (Manager) in the site control panel can change the percentage to a specific user by looking at it, for example, the number of users attracted by it) when registering a new user or when entering the bonus program if the user registered before installing the component.


Name: Maximum percentage of payment for the basket with bonus coins
Key: msrpc_max_pr_cart_paid_by_coins
default Value: 30
The maximum percentage of the basket amount that can be paid with bonus coins.


Name: order Statuses for crediting bonus coins
Key: msrpc_order_statuses_for_inc_coins
default Value: 3
Order statuses where bonus coins accrued by these orders are counted on the user's balance(the balance is calculated on the fly (dynamically)).
By default, the status is «Delivered», i.e. if there is a different status including «Canceled», the coins accrued by this order will not be included in the user's balance.


Name: Status of bonus coin debiting orders
Key: msrpc_order_statuses_for_dec_coins
default Value: 1,2,3
Order statuses where bonus coins debited by these orders are counted in the mechanism for debiting the user's balance(the balance is calculated on the fly (dynamically)).
By default, the «Canceled» status is excluded from the debiting mechanism, i.e. the coins debited by this order will not be debited from the user's balance.


Name: bonus coin Name
Key: msrpc_name_bonus_coin
default Value: Coin
The name of the bonus coin — this name will be used wherever it is a bonus coin.


Name: Ratio of the coin to the stores currency
Key: msrpc_ratio_of_coins
default Value: 1
the Ratio(divisor(integer)) of the bonus coin that implements the quantitative ratio of the bonus coin to the store currency. For example, if the divisor = 10 then 1 bonus coin = 0.1 of the store currency.


Name: Number of welcome coins
Key: msrpc_welcome_coins_for_registration
default Value: 0
Enter the number(integer) of coins credited to the user during registration or 0.


Name: Welcome coins with promo code only
Key: msrpc_welcome_coins_if_promocode
default Value: No
Set «Yes» if you need to earn welcome coins during registration only if a valid promo code is entered.


CREATING and USING the PROMOCODE NAME
(IMPORTANT! THIS APPROACH DOES not REQUIRE any SEPARATE TABLES or FIELDS for STORING LINKS between the promo CODE and its OWNER!):


  • for decorative effect, the first letter of the bonus coin name is taken(no matter what language it is in, since when parsing the promo code name to search for the user(whose promo code), the first character from the promo code name will be deleted);
  • the user id(whose promo code) from the modUser table is added to the first letter of the coin name;
  • the letter R is added to the line received in the first two steps(as a separator for the end of the name);
  • after the letter R(no matter in which case users enter it, as well as the first letter of the promo code name), two digits of the timestamp(createdon) of the user(whose promo code) from the modUser table are added.
  • When a user enters a promo code, a number up to the letter R is taken to check the entered promo code for its real existence, and the modUser table searches for the user by an id equal to the received number, and if the user with this id is found, the last two digits of the timestamp are checked(createdon) to match the remaining characters of the promo code name after the letter R and if they are identical, the promo code is considered valid and the incoming user is assigned to the owner of the entered promo code as its referral.


2. Installing a snippet of information about the current user's bonus program
(for example, on a separate page of the bonus program or on a separate page of the user's profile, or distribute information in parts to different tabs of the user's profile)


You need to drag the msReferralProgramCoin snippet to the appropriate place in the resource context or register it there in this way(since it has default settings):

[[!msReferralProgramCoin?]]


  • partially on one profile tab, we output the number of referrals at the bottom of the snippet data without the list of referrals names(remove &tplItem= ' msrpcItem`) and the referrer promo code entry form(remove &tplForm):
    [[!msReferralProgramCoin?
        &tplItem=`0`
        &tplForm=`0`
    ]]
  • partially on another tab, we only display a list of referral names wrapped in a list with the number of referrals written on it:
    [[!msReferralProgramCoin?
        &tplBalance=`0`
        &tplPromo=`0`
        &tplForm=`0`
    ]]
  • partially on the third tab, we will display the form for entering the referrer's promo code:
    [[!msReferralProgramCoin?
        &tplBalance=`0`
        &tplPromo=`0`
        &tplItem=`0`
        &tplList=`0`
    ]]


3. Inclusion of the product in the bonus program


In the site control panel, in the product editing form, on the product Properties tab, you must set the «Participates in the bonus program» flag for this product to participate in the cashback bonus program.


4. (optional)Setting the promo code input field when registering a user


You need to drag the msrpcInputReferrerPromoCode snippet to the appropriate place in the registration form or chunk, or register it there in this way(since it has default settings):

[[!msrpcInputReferrerPromoCode?]]

Example of using the registration form for the Login component in a chunk:
[[!+reg.error.msrpc_referrer_promocode]]
[[!msrpcInputReferrerPromoCode?]]


5. Setting an individual cashback percentage for users in the site control panel and manually adding and debiting bonus coins from the user's(or selected users) balance


go to the site Manager section «Packages/Cashback management „and the“ balance Management » page opens.

In this interface, you can edit the cashback percentage in the cell itself(double-click on it) (zero value — using the default percentage) and add or debit coins from the user's(or selected users) balance in the window opened by clicking on the «Add or debit coins» menu in the drop-down menu by right-clicking on the desired line.


6. Installing the bucket snippet


You must specify the output of the snippet

[[!msrpcCart]]
in the right place on the bucket page (you can pass your chunks by the structure of the chunks msrpcCart.tpl and msrpcCartInfo. tpl
[[!msrpcCart?
    &tpl=`your chunk`
    &tplInfo=`your chunk info`
]]
)


7. Setting a snippet of information in the product card about the number of coins received when purchasing this product


You must specify the output of the snippet

[[!msrpcProduct]]
in the right place of the product template (you can pass your chunk by the chunk structure msrpcProduct.tpl
[[!msrpcProduct?
    &tpl=`your chunk`
]]
and the ability to pass directly the price for calculating coins
[[!msrpcProduct?
    &price=(your price)
]]
(for example, calculating the price with another snippet
[[!msrpcProduct?
    &price=[[!getPrice?
               &id=[[*id]]
           ]]
]]
))


8. Output information about accrual and debiting bonus coins in the order


To display information about debited coins and coins to be credited for the current order, insert a snippet

[[!msrpcOrder]]
(you can pass your chunk by the chunk structure msrpcOrderInfo.tpl
[[!msrpcOrder?
    &tpl=`your chunk`
]]
)

If you output orders in a list with your snippet and your chunk, then to output the number of coins debited, you must output the msrpc_payroll_dec field from the order data array as the native field of the order table and similarly the field of coins to be credited — msrpc_payroll_inc

DOWNLOAD

1.1.11-pl - (28.05.2020)

  • Added conversion of debited coins when paying with coins when removing an item from the cart

1.1.9-pl - (23.05.2020)

  • In the context menu of the list of products added items for mass installation and removal of the flag of product participation in the bonus program for selected products in this list

1.1.8-pl - (20.05.2020)

  • For ease of installation and control, the product participation flag in the cashback bonus program is added to the product table itself in addition to the checkbox on the "product Properties" tab
  • Mass manual crediting/debiting of bonus coins from the balance of the users

1.1.7-pl - (18.05.2020)

  • Added two settings for the welcome bonus when registering:
    1. the Actual number of bonus coins credited to the buyer's balance during registration (0 by default).
    2. Flag claim your welcome bonuses only in case if you have entered a valid promotion code invited, which will increase motivation enter the promotion code invited!
  • Fixed the display of debited coins in the basket

1.1.6-pl - (13.05.2020)

  • Fixed the display of the number of coins when setting the multiplicity of coins

1.1.5-pl - (11.05.2020)

  • Added setting the quantitative ratio of the bonus coin to the store's currency, showing the user how many parts(1, 0.1, ...) of the store's currency will account for one unit of the bonus coin

1.1.4-pl - (11.05.2020)

  • The component added recalculation of bonuses for accrual and debiting and, accordingly, recalculation of the total amount of the order, taking into account the bonus coins being debited and the cost of delivery when editing the order in the site control panel!

1.1.3-pl - (09.05.2020)

  • Fixed the resolver for creating additional table fields when installing the component

1.1.2-pl - (07.05.2020)

  • Added lexicon activation for the product participation flag in the program

1.1.1-pl - (28.04.2020)

  • Added Ajax update of information about debited and credited coins in the bucket snippet when changing the contents of the bucket

1.1.0-pl - (27.04.2020)

  • Added a mechanism for charging and debiting coins in the basket and a snippet for the buyer to choose whether or not to pay in coins and display information about coins
  • Added a snippet for the product card showing the number of cashback coins according to the current individual percentage for products participating in the program
  • Added a snippet for the order page showing information on debited and credited coins

1.0.2-beta - (20.04.2020)

  • Added the ability to set an individual percentage of cashback directly in a table cell and the window for manual charging and debiting coins
  • Added the ability to enable and exclude product participation in the program by setting the flag "Participates in the bonus program" on the product editing page on the "product Properties" tab

1.0.1-beta - (15.04.2020)

  • Added a component page in the Manager for setting an individual cashback percentage

1.0.0-beta - (15.04.2020)

  • Basic version 1.0.