Sama Discount

Sama All in One Dynamic Pricing & Discount


Sama All in One Dynamic Pricing & Discount
Documentation

At the beginning you need download plugin file from CodeCanyon .

Downloaded file format are zipped. After extracting find sma-discount.zip, this zip file will be use to upload as plugin file.

Steps of uploading plugin form WordPress panel:

  1. Go to Plugins > add new
  2. Uploading sama-discount.zip
  3. Click on install now
  4. After installing successfully click on active plugin

For information about installing plugin from FTP please read this link

 

 

 

In order to create dynamic or static product lists, you can click on the lists from the submenu of the plugin. You can then view the title, ID, creation date, and the number of the products included in the lists. It is possible to edit each list by clicking on edit. If you want to create a new list just click on create a new list, then you can enter the title for your list in the related field. 

 

Dynamic Selection

In case you are considering a special category or tag for the products, click on “create taxonomy terms”. In this section, you can filter your products based on categories, tags (WooCommerce default taxonomies), or customized taxonomies created by the plugin or other plugin. You can also combine multiple taxonomies. Click on “+” to add a new row and new taxonomies for filtering products. In case there is variation in the products of your shop, it is possible to filter the variable products based on attributes. To do this click on “create attribute terms” to see different attributes in your shop (in case they are available). You can filter your products based on the selected attributes. It is also possible to combine multiple attributes together (similar to taxonomies). Click on ‘+’ to add a new row and select new attributes for filtering your products. One advantage of dynamic selection over static selection is that when you add a new product to a category or tag the product listing updates automatically. 

Static Filtering of Products

in case you want to select your product manually based on the title or ID, go to the ‘add product’ field and select the related product.

Selection by combination of dynamic and static methods

In case a product list is created dynamically, it is possible to manually add new products to the list. You can also remove a product from the list if necessary.

The sale product option is for filtering regular sale products and it is inactive by default. You can add these products to the listing by setting the option on included or remove them by setting it on excluded.

Note that if a sale product is set on included but also selected in the remove product field, it will be removed from the list.

After creating the product list based on the selected conditions, you can see the product title and ID on the right side.

 

 

 

 

  1. Creating conditions

Click on “conditions” from the submenu of the plugin to set up a new condition. You can see the title, ID, creation date and number of different conditions. It is possible to edit each field of the condition by clicking on “edit” or to add a new condition by clicking on “create a new condition”.

After clicking on “create a new condition” a new row is added and you can enter a title in the related field.

Each row includes six sections:

  1. Rule: selecting the condition
  2. Operator: it includes different options based on the selected condition
  3. Value: it can be either a number or an option based on the selected condition
  4. Relation: the type of relation is determined to examine rules which consist of “and” and “or”
  5. Advanced option: some of the conditions have advanced settings. In this section you can activate this option and use advanced settings.
  6. Add/remove: you can add or remove a row of conditions. You can select multiple conditions together and discount is applied if all the conditions are true.

 

  1. User Rules
    1.  If user ID: with this option, you can determine which users can use the discounts.

Operator: It is a calculation operator and consists of “in” and “not in”.

Value: selecting multiple users

 

  1. If user Role: with this option, you can determine which user role can use the discounts.

Operator: It is a calculation operator and consists of “in” and “not in”.

Value: selecting multiple user role

 

  1. If user email name or user’s domain name: with this option, you can determine which users with particular email addresses or domain names can use the discounts.

     Operator: it is a calculation operator that consists of “in” and “not in”.

     Value: entering the list of multiple email addresses and domains

Note that email addresses should be separated from each other by comma (,). Also email domain names should be entered without “@”, e.g. yahoo.com, gmail.com. You can also use a combination of email address and domain names together.

 

Previous Orders Rules

If number of previous orders: with this option, you can determine that users with a specific number of previous orders can use the discounts.

Operator: calculation operator that consists of “less or equal”, “equal”, “greater or equal”, “in range”, “not equal”, “is a multiple of”.

Value: you have to enter the specific number in this field. In case the “in range” option is selected in the operator field, you can set up the numbers of high and low for the range.

Order status: you can determine to count the number of orders that have the selected status.

Product list: you can determine to count the number of orders that include a specific product list.

Time limitation: you can set up a time limitation for counting orders in two different ways; either based on the previous days (e.g. orders from the previous 10 days, or previous 10 hours) or a selected date period. By activating the “time method” option, you can enter the date period (if you do not fill in the “end date” field, the end date will be unlimited and up to present.)

If Subtotal of previous orders: with this option, you can determine that users with a specific subtotoal of previous orders can use the discounts.

Operator: calculation operator that consists of “less or equal”, “equal”, “greater or equal”, “in range”, “not equal”, “is a multiple of”.

Value: you have to enter the specific amount in this field. In case the “in range” option is selected in the operator field, you can set up the amounts of high and low for the range.

Order status: you can determine to sum the subtotal of orders that have the selected status.

Product list: you can determine to sum the amount of orders that include a specific product list.

Time limitation: you can set up a time limitation for summing orders in two different ways; either based on the previous days (e.g. orders from the previous 10 days, or previous 10 hours) or a selected date period. By activating the “time method” option, you can enter the date period (if you do not fill in the “end date” field, the end date will be unlimited and up to present.)

If Number of previously ordered products: with this option, you can determine that users with a specific number of previous orders products can use the discounts.

Operator: calculation operator that consists of “less or equal”, “equal”, “greater or equal”, “in range”, “not equal”, “is a multiple of”.

Value: you have to enter the specific number in this field. In case the “in range” option is selected in the operator field, you can set up the numbers of high and low for the range.

Order status: you can determine to count the number of orders products that have the selected status.

Product list: you can determine to count the number of orders products that include a specific product list.

Time limitation: you can set up a time limitation for counting orders products in two different ways; either based on the previous days (e.g. orders from the previous 10 days, or previous 10 hours) or a selected date period. By activating the “time method” option, you can enter the date period (if you do not fill in the “end date” field, the end date will be unlimited and up to present.)

If Subtotal of previously ordered products: with this option, you can determine that users with a specific subtotoal of previous orders products can use the discounts.

Operator: calculation operator that consists of “less or equal”, “equal”, “greater or equal”, “in range”, “not equal”, “is a multiple of”.

Value: you have to enter the specific amount in this field. In case the “in range” option is selected in the operator field, you can set up the amounts of high and low for the range.

Order status: you can determine to sum the subtotal of orders products that have the selected status.

Product list: you can determine to sum the amount of orders products that include a specific product list.

Time limitation: you can set up a time limitation for summing orders in two different ways; either based on the previous days (e.g. orders from the previous 10 days, or previous 10 hours) or a selected date period. By activating the “time method” option, you can enter the date period (if you do not fill in the “end date” field, the end date will be unlimited and up to present.)

If previously ordered products in list: this option allows a discount to be applied to users whose previous orders included a certain product on the list.

     Operator: calculation operator that consists of “in” and “not in”.

     Value: selecting the product list

Order status: examine whether a product is included in the list of orders with the selected status.

Time limitation: select the time limitation for examining if the products from the order are included in the list orders in two different ways; either based on the previous days (e.g. orders from the previous 10 days, or previous 10 hours) or a selected date period. By activating the “time method” option, you can enter the date period (if you do not fill in the “end date” field, the end date will be unlimited and up to present.)

Note: in case the “advanced option” item is active for rules of the previous orders and no particular order status is selected, three different statuses of “processing”, “on-hold”, and “completed” will be considered. If the product list is unchanged all of the products will be considered and if you leave the fields related to time limitation empty, no time period will be considered.

 

Previously Used Discounts Rules

If number of previously used discounts: this option allows users with a certain number of previously used discounts to use a selected discount.

Operator: calculation operator that consists of “less or equal”, “equal”, “greater or equal”, “in range”, “not equal”, “is a multiple of”.

Value: you can enter the intended number in this field. In case the “in range” option is selected from the operator field, you can set up the numbers of high and low for the range.

Discount type: define which type of discounts should be counted.

Product list: define to count the discount if it has been applied on a specific product list.

Specific discounts: define which specific discounts should be counted.

Time limitation: select the time period to examine the number of used discounts in the order in two different ways; either based on the previous days (e.g. orders from the previous 10 days, or previous 10 hours) or a selected date period. By activating the “time method” option, you can enter the date period (if you do not fill in the “end date” field, the end date will be unlimited and up to present.)

Calculate free product, cart discount, shipping discount: define whether the free products or the shipping discounts or cart discounts should be calculated.

If subtotal of previously used discounts: this option allows users with a certain subtotal of previously used discounts to use a selected discount.

Operator: calculation operator that consists of “less or equal”, “equal”, “greater or equal”, “in range”, “not equal”, “is a multiple of”.

Value: you can enter the intended amount in this field. In case the “in range” option is selected from the operator field, you can set up the amounts of high and low for the range.

Discount type: define which type of discounts should be summed.

Product list: define to sum the discount if it has been applied on a specific product list.

Specific discounts: define which specific discounts should be summed.

Time limitation: select the time period to examine the subtotal of used discounts in the order in two different ways; either based on the previous days (e.g. orders from the previous 10 days, or previous 10 hours) or a selected date period. By activating the “time method” option, you can enter the date period (if you do not fill in the “end date” field, the end date will be unlimited and up to present.)

Calculate free product, cart discount, shipping discount: define whether the free products or the shipping discounts or cart discounts should be calculated.

Note: in case the “advanced option” item is active for the rules of the previous discounts, by default three order statuses “processing”, “on-hold”, and “completed” will be considered. You can change them in plugin settings. If the product list is unchanged, all of the products will be considered. In “discount type” and “specific discount” options, by default all of the related options are selected. if you leave the fields related to time limitation empty, no time period will be considered.

 

Sold Products Rules

if number of sold products: this option allows a selected discount to be applied if the number of product sales reaches a specific amount.

Operator: calculation operator that consists of “less or equal”, “equal”, “greater or equal”, “in range”, “not equal”, “is a multiple of”.

Value: you can enter the intended number in this field. In case the “in range” option is selected from the operator field, you can set up the numbers of high and low for the range.

Product list: select the product lists which should be calculated (it is better not to select too many products due to heavy calculations).

Time limitation: select the time period for calculating the product sales in two different ways; either based on the previous days (e.g. orders from the previous 10 days, or previous 10 hours) or a selected date period. By activating the “time method” option, you can enter the date period (if you do not fill in the “end date” field, the end date will be unlimited and up to present.)

Calculate for each product: calculation is for each product in the list. You can set product list sales (default option) or sales of each product from the list as the basis for calculating the sales number.

Fast calculation without time limitation: calculating the sales number is done by total_sales meta value. This meta is saved in the post of each product and increases in number for each product sale. It is faster to calculate the sales number by this meta but it is not always accurate. In case of removing the order or returning it, the meta does not decrease. Also it is not possible to define time limitation for sales number by this method.

If Subtotal of previously used discounts: this option allows a selected discount to be applied if the subtotal of product sales reaches a specific amount.

Operator: calculation operator that consists of “less or equal”, “equal”, “greater or equal”, “in range”, “not equal”, “is a multiple of”.

Value: you can enter the intended amount in this field. In case the “in range” option is selected from the operator field, you can set up the amounts of high and low for the range.

Product list: select the product lists which should be calculated (it is better not to select too many products due to heavy calculations).

Time limitation: select the time period for calculating the product sales in two different ways; either based on the previous days (e.g. orders from the previous 10 days, or previous 10 hours) or a selected date period. By activating the “time method” option, you can enter the date period (if you do not fill in the “end date” field, the end date will be unlimited and up to present.)

Calculate for each product: calculation is for each product in the list. You can set product list sales (default option) or sales of each product from the list as the basis for calculating the sales subtotal.

Fast calculation without time limitation: calculating the sales number is done by total_sales meta value. This meta is saved in the post of each product and increases in number for each product sale. It is faster to calculate the sales number by this meta but it is not always accurate. In case of removing the order or returning it, the meta does not decrease. Also it is not possible to define time limitation for sales number by this method.

Note: in case the “advanced option” item is active for rules of the previous discounts, by default all the products of the list will be counted and it leads to heavy calculations. Therefore, it is suggested to limit the number of products.

 

Carts Rules

If cart subtotal: this option allows users to use a selected discount if the subtotal of their cart reaches a specific amount.

Operator: calculation operator that consists of “less or equal”, “equal”, “greater or equal”, “in range”, “not equal”, “is a multiple of”.

Value: you can enter the intended amount in this field. In case the “in range” option is selected from the operator field, you can set up the amounts of high and low for the range.

Product list: You can choose the products that you intend to be included in the total calculation of the cart.

If cart items count: this option allows a user whose total number of items in the cart has reached a specific amount to use a selected discount.

Operator: calculation operator that consists of “less or equal”, “equal”, “greater or equal”, “in range”, “not equal”, “is a multiple of”.

Value: you can enter the intended number in this field. In case the “in range” option is selected from the operator field, you can set up the numbers of high and low for the range.

Product list: You can choose the products that you intend to be included in the total calculation of the cart.

If cart product count: this option allows a user whose total number of product in the cart has reached a specific amount to use a selected discount.

Operator: calculation operator that consists of “less or equal”, “equal”, “greater or equal”, “in range”, “not equal”, “is a multiple of”.

Value: you can enter the intended number in this field. In case the “in range” option is selected from the operator field, you can set up the numbers of high and low for the range.

Product list: You can choose the products that you intend to be included in the total calculation of the cart.

If cart products: this option allows a specific product in the cart to be counted for discount if it is included or not included in the product list.

     Operator: calculation operator that consists of “in” and “not in”.

     Value: select the product list.

If Total weight: this option allows users to use a selected discount if the total weight of their cart reaches a specific amount.

Operator: calculation operator that consists of “less or equal”, “equal”, “greater or equal”, “in range”, “not equal”, “is a multiple of”.

Value: you can enter the intended amount in this field. In case the “in range” option is selected from the operator field, you can set up the amounts of high and low for the range.

Product list: You can choose the products that you intend to be included in the total calculation of the cart.

If Total volume: this option allows users to use a selected discount if the total volume of their cart reaches a specific amount.

Operator: calculation operator that consists of “less or equal”, “equal”, “greater or equal”, “in range”, “not equal”, “is a multiple of”.

Value: you can enter the intended amount in this field. In case the “in range” option is selected from the operator field, you can set up the amounts of high and low for the range.

Product list: You can choose the products that you intend to be included in the total calculation of the cart.

If Payment gateway: this option allows a specific payment gateway to be selected for discount if it is included or not included in the selected value.

     Operator: calculation operator that consists of “in” and “not in”.

     Value: select consider payment gateway.

If Shop currency: this option allows a specific Shop currency to be selected for discount if it is included or not included in the selected value.

     Operator: calculation operator that consists of “in” and “not in”.

     Value: select consider shop currency.

 

Billing and Shipping Rules

If Shipping method: this option allows a specific shipping method to be selected for discount if it is included or not included in the selected value.

     Operator: calculation operator that consists of “in” and “not in”.

     Value: select consider shipping method.

If Billing country: this option allows a specific billing country to be selected for discount if it is included or not included in the selected value.

     Operator: calculation operator that consists of “in” and “not in”.

     Value: select consider billing country.

If Billing state: this option allows a specific billing state to be selected for discount if it is included or not included in the selected value.

     Operator: calculation operator that consists of “in” and “not in”.

     Value: select consider billing state.

If Billing city: with this option, you can determine which users with particular billing city can use the discounts.

     Operator: it is a calculation operator that consists of “in” and “not in”.

     Value: entering the list of multiple city

If Shipping country: this option allows a specific shipping country to be selected for discount if it is included or not included in the selected value.

     Operator: calculation operator that consists of “in” and “not in”.

     Value: select consider shipping country.

If Shipping state: this option allows a specific shipping state to be selected for discount if it is included or not included in the selected value.

     Operator: calculation operator that consists of “in” and “not in”.

     Value: select consider shipping state.

If Shipping city: with this option, you can determine which users with particular shipping city can use the discounts.

     Operator: it is a calculation operator that consists of “in” and “not in”.

     Value: entering the list of multiple city

 

 

Click on “discounts” from the submenu of the plugin to create a new discount. In this section you can see the title, ID, creation date, priority of applying conditions, and status options of the previously created discounts. You can edit the previously created discounts or create a new one.

 

 

Time limitation settings

You can set up time limitation for a discount by three methods:

  1. No time limit
  2. Time Period: you can select a period date for the discount to be active.

  1. Time period after specific order made: you can select the date of a specific order as the starting date of the time period. It is possible to select whether the first or final order of the customer should be considered. In case the intended order number is neither the first or final one, you can enter your desired order number in the related field after selecting the “set order number” option. You can specify the duration of time after the order has been made that is counted for the discount in the “hours after order” and “days after order” fields.

  1. Time period after registration: with this option you can set the registration date of a user as the beginning time. You can specify the duration of time after registration that is counted for the discount in the “hours after registration” and “days after registration” fields.

 

Discount usage limitation

You can limit the usage of discounts by users with three options:

  1. Unlimited: users can use discounts without limitation.
  2. Discount limitation: Discounts have usage limitation. You can specify the maximum number of usable discount in the “limitation number” field.

  1. User limitation: each user has limitation in using discounts. You can specify the maximum number of usable discounts in the “limitation number” field.

 

Select a condition

You can select the previously made conditions for applying discounts. In case there is no condition for a discount, just select the “unconditional” option.

 

Discount Settings

In this section you can choose the discount type. Other options including “action product list”, “discount percentage/amount”, and “action model” will be either active or inactive based on the selected discount type.

In general, discounts consist of 5 categories:

  1. Automatic discounts: in case it is in accordance with the conditions and other settings, the discount automatically is applied for the product or cart.
  2. Coupon discounts: in case it is in accordance with the conditions and other settings, the discount is applied for the product or cart after entering the coupon code.
  3. Bulk discounts: in case it is in accordance with the conditions and other settings, the discount applies for each step based on the settings.
  4. Free product: in case it is in accordance with the conditions and other settings, the free product is added to the cart with no expense.
  5. Shipping discount: in case it is in accordance with the conditions and other settings, the discount is applied for shipping.

 

Automatic Discounts

Product adjustment: in case it is in accordance with the conditions and other settings, the discount is applied for the selected product list based on the method selected in the “action model” field and with the specified amount in the “discount percentage/amount” field.

Cart adjustment: in case it is in accordance with the conditions and other settings, the discount is applied for the total of the cart based on the selected method in the “action model” field and with the specified amount in the “discount percentage/amount” field.

Cheapest or highest product price in cart: in case it is in accordance with the conditions and other settings, the discount is applied for the specified number of products in the “product limit” by assessing whether the price of the products in the cart is higher or lower (“product price” option), based on the selected method in the “action model” field and with the specified amount in the “discount percentage/amount” field.

Cheapest or highest subtotal product price in cart: in case it is in accordance with the conditions and other settings, the discount is applied for the specified number of products in the “product limit” by assessing whether the subtotal of the products in the cart is higher or lower (“product price” option), based on the selected method in the “action model” field and with the specified amount in the “discount percentage/amount” field.

 

Coupon discounts

Product adjustment: In case it is in accordance with the conditions and other settings, the discount is applied for the selected product list based on the selected method in the “action model” field and with the specified amount in the “discount percentage/amount” field after entering the coupon code.

Cart Adjustment: In case it is in accordance with the conditions and other settings, the discount is applied for the total of the cart based on the selected method in the “action model” field and with the specified amount in the “discount percentage/amount” field after entering the coupon code.

 

Cheapest or highest product price in cart: In case it is in accordance with the conditions and other settings, the discount is applied for the number of products specified in the “product limit” by assessing whether the price of the products in the cart is higher or lower (“product price” option), based on the selected method in the “action model” field and with the specified amount in the “discount percentage/amount” field after entering the coupon code.

Cheapest or highest subtotal product price in cart: In case it is in accordance with the conditions and other settings, the discount is applied for the number of products specified in the “product limit” by assessing whether the subtotal of the products in the cart is higher or lower (“product price” option), based on the selected method in the “action model” field and with the specified amount in the “discount percentage/amount” field after entering the coupon code.

 

Bulk Discounts

Stair step: Clicking on this option will reveal the new settings at the bottom section. In the “based on” setting from the “bulk stair step” method, you can choose whether the bulk discounts should be calculated based on the number or total of products. In the “action list” section you can choose whether the determined or sum amount of products should be calculated for all the products on the list or for each one of the products from the selected products on the production list.
In the “stair” method, you can set the min and max amount of the range for each step. In the “value” section you can enter the discount amount based on the selected action model option. You can choose other discount methods (percent, fixed amount, fixed price, free product from the same goods, free product from other goods) in the “action model” section. In case the “label” field is active, you can view the bulk discount table in a single product page as the title of the stair.

You can add a new range by clicking on “+” and set up all the previous settings for the new range.

Bundle: Clicking on this option will reveal the new settings at the bottom section. In the “based on” setting from the “bulk bundle” method, you can choose whether the bulk discounts should be calculated based on the number or total of products. In the “action list” section you can choose whether the determined or sum amount of products should be calculated for all the products on the list or for each one of the products from the selected products on the production list.

Contrary to the “stair” method, you do not need to define a range in the “bundle” method. You can select different methods of discount (percent, fixed amount, fixed price, free product from the same goods, free product from other goods) in the “action model” field. Enter the amount of discount in the “value” field based on the selected option in the “action model” field. Activating “Multiple calculation” option allows a discount to be applied when the number or price of the product is a multiple of the amount specified in the “value” section”. In case bulk discount display is active, you can view the bulk discount table in a single product page as the title of the step.

You can add a new step by clicking on “+” and set up all the previous settings for the new step.

 

Free product: in case it is in accordance with the conditions and other settings, the selected products will be added to the cart based on specified number

 

Shipping discount: In case it is in accordance with the conditions and other settings, the discount is applied for the selected shipping method list based on the selected method in the “action model” field and with the specified amount in the “discount percentage/amount” field.

 

Other options


Enable discount: you can manually enable or disable a specific discount.

Priority: you can set priority for discounts. This is especially important when several discounts overlap. Then you can set priority to determine the order in which discounts should be applied. (in case the “calculate price before discount” option is enabled, when several discounts overlap only the last discount is applied and the previous discounts remain ineffective.

Total number of used discount: shows the total number of discounts used by users

 

 

 

 

Display original price on cart page

Displays the original price of products next to the new price after discounts (only for discounts that is applied to a product not coupon discounts).

Use regular price as basis for discount calculation

In case there is a sale or several discounts apply to a product, the plugin will use the regular price of the product as basis for discount calculation not the sale price after discounts. Therefore, only the last discount based on priority is applied to the product.

Remove third party coupon

In case WooCommerce or other plugin enable a coupon in a cart and apply discount on the products, the plugin will automatically remove third party coupons (excluding the coupons created by the plugin).

Showing total discount in cart and checkout page

Displays the total sum of the applied discounts in the cart and checkout page (excluding coupon and cart discounts).

Default order status

In order to calculate the previously applied discounts and also product sales based on the orders, you can select the order status to calculating these items.

Select order date

Select the intended order date for calculating the discounts on the previous orders.

Display discount table

In case the bulk discount is enabled, the discount table will be displayed for the products.

 

Hide action model column

If the discount table is on display, enabling this option will hide the action model column from the table.

Display position of bulk discount table

If the discount table is on display, based on WordPress hooks you can determine the position of the table in the single product page. If you select “display with short code” option, you can display the table in any section of the single product page using the short code [sama_discount_table].