AwoCoupon for Virtuemart (Free Version) - User Guide


Introduction
AwoCoupon for Virtuemart was created to fill a void and make Virtuemart Coupons easy to use and manage. Although Virtuemart has coupon capabilities, they are not extensive enough to cover what many people would call basic coupon features. AwoCoupon for Virtuemart fills this gap. Some of its features include:
  • Product(s) specific discounts
  • Customer(s) specific discounts
  • The ability to only trigger coupons if a minimum cart total is reached
  • Ability to set expiration dates for coupons
  • Restrict the number of times a coupon can be used by any given user
  • Easy management of all coupons
  • Gift Certificate style coupons
Installation
Backup your code before starting this installation process. This is a 2 step process. First the component is installed, then the virtuemart source code is edited. If the second part of the installation is not completed for some reason then knowledge of php code as well as write access to your joomla source code will be needed. Please read through the instructions carefully.
System requirements
Joomla 1.5, Virtuemart 1.1.2 to 1.1.9
Step 1 - Virtuemart Coupon
1.   Download AwoCouon for Virtuemart to a location on your computer
2.   Log into Joomla as an Administrator
3.   From the top menu go to Extensions->"Install/Uninstall"
4.   Under the "Upload Package File" section press the button "Browse..."
5.   Find and select the file, com_awocoupon.zip, downloaded to your computer
6.   Install component by pressing "Upload File & Install" button
7.   You will receive a page telling you the status of step 1 and step 2. If step 2 was successful, you are done, if not, please follow instructions below for step 2. (if unsuccessful, see Section 7. Troubleshooting)
Step 2 - Virtuemart Injection (ONLY if Unsuccessful)
This section requires the user to have access to the website files for edit. You may need to use an ftp client to access the files.
1.   Open the file $webroot/administrator/components/com_virtuemart/classes/ps_coupon.php
2.   Right after these lines (around line 158):
PHP Code:
/* function to process a coupon_code entered by a user */
function
process_coupon_code( $d ) {
      Enter the following code:
PHP Code
return require_once (JPATH_ADMINISTRATOR.DS."components".DS."com_awocoupon".DS."assets".DS."virtuemart".DS."ps_coupon_process.php");
3.   Right after these lines (around line 135):
PHP Code:
/* function to remove coupon coupon_code from the database */
function
remove_coupon_code( &$d ) {
      Enter the following code:
PHP Code:
return require_once (JPATH_ADMINISTRATOR.DS."components".DS."com_awocoupon".DS."assets".DS."virtuemart".DS."ps_coupon_remove.php");
Using the software - Administration
Now that we have finished the installation, we can look closely at the features presented in this application.
Getting Around
Log into the administration screen and go to Components » AwoCoupon. Here you will see the control panel. It shows the general statistics of what coupons you currently have configured as well as a couple of menus. From here you can enter a new coupon or view the entries of coupons you have.
Configuring a Coupon
To add a new coupon, select "New Coupon" from the control panel, or from the coupons list "New".
Fields:
Coupon Code enter a unique coupon code of up to 32 characters
Published Options
    Published: active coupon
    Unpublished: inactive coupon
Function Type Options
    Coupon: used as a normal coupon. If number of uses is set to 2, then all users can use the coupon a total of 2 times each.
    Gift Certificate: used as a gift certificate. If number of uses is set to 2, then the coupon can be used for a total of 2 times, no matter who uses it.
Number of uses Number: the number of times a coupon/gift certificate can be used. This number is dependent on the function type. If set to 0 or is left blank (only valid for function type of coupon), there is no limit.
Percent or Total Options
    Percent: coupon takes a percent of value
    Total: coupon is an actual figure that is subtracted from total
Discount Type Options
This option can only be used if a product is selected AND the Percent or Total field is selected as a Percent. Otherwise it defaults to "Overall".
    Overall: The discount is calculated as a percentage of the overall total in the shopping cart
    Specific: The discount is calculated as a percentage of the total of the products configured in the coupon that are in the shopping cart
Value Number: this is the value of the coupon and is dependent on the Percent or Total field to determine how it is calculated
Minimum Value Number: this is the minimum value of the shopping cart before this coupon can take effect. If set to 0 or is left blank, then there is no minimum value
Expiration Date: the date the coupon expires. If left blank, then it never expires.
Customers A multiple select box of all your Virtuemart customers. Selection of customers will activate the coupon only for those customers.
Products A multiple select box of all your Virtuemart products. Selection of products will limit the activation of the coupon to those specific products.
Example Usage
The customer and product field are multiple selection boxes. So you can select none, one, or multiple customers and/or products for every coupon configured.
Example 1
Coupon Code: COUPONCODE
Published: Published
Function Type: Coupon
Number of Uses: 1
Percent or Total: Percent
Discount Type: Overall
Value: 25
Minimum Value: blank
Expiration: blank
Customer: None chosen
Products: None chosen
This coupon will work for all products and all customers (including any new registrations) for exactly 1 time per customer. It will take 25% off the total value of the shopping cart. The coupon never expires. The customer is required to have an account to be able to use this code.
Example 2
Coupon Code: COUPONCODE
Published: Published
Function Type: Coupon
Number of Uses: blank
Percent or Total: Value
Discount Type: Overall
Value: 25
Minimum Value: 100
Expiration: 2020-10-17
Customer: 2 chosen
Products: 3 chosen
This coupon will work for the 2 customers chosen as long as their shopping cart total has a minimum total of 100 and at least one product in the cart is one of the 3 chosen in the coupon. It is a permanent coupon so it will work everytime used as long as the criteria are met. The coupon will become invalid on October 17, 2020.
Example 3
Coupon Code: COUPONCODE
Published: Published
Function Type: Coupon
Number of Uses: 3
Percent or Total: Percent
Discount Type: Specific
Value: 20
Minimum Value: 120
Expiration: blank
Customer: 7 chosen
Products: 3 chosen
This coupon will work for the 7 customers chosen as long as their shopping cart has a minimum total of 120 and at least one product in the cart is one of the 3 chosen in the coupon. Since the discount type is set to specific, 20% will only be deducted from the value of the product set in the coupon. If the customer has all 3 products, 20% will be deducted from all 3 products. Each of the customers selected can use this coupon a total of 3 times. Since it has no expiration date, it never expires, but with the restrictions set, it effectively expires after all 7 customers use the coupon on 3 seperate occasions each.
Example 4
Coupon Code: COUPONCODE
Published: Published
Function Type: Gift Certificate
Number of Uses: 1
Percent or Total: Total
Discount Type: Overall
Value: 5
Minimum Value: blank
Expiration: blank
Customer: blank
Products: blank
This coupon will work exactly like a gift certificate. Anybody can use it (an account is not required) and it will work for exactly 1 time. Once used, it becomes invalid.
Troubleshooting
Please contact the forum with specific question.