Payment Gateway Integration
Note that some payment modules, including Paypal, do not
natively work with Order Total discounts (mine or anyone else's).
Some instructions are provided
on how to do this integration, but doing it is your responsibility.
You can try doing this before purchase by testing my
Better Together
or
Quantity Discounts modules, both of which are free.
Installed Cost: $120.00
(Professional installation by That Software Guy)
Installation Difficulty: Moderate (You must write some PHP to configure this mod; there is no Admin panel)
Support Thread: My commercial software is not supported on the osCommerce forum. Please email me questions instead.
Promotional Page Download:
free from my website (you must buy Big Spender separately)
See it Live: Go to
this test cart.
Add $100 worth of hardware (category 1) to your cart.
On the shopping cart page, you will see the discount (this is because
of Discount Preview). Without Discount Preview, you would see
the message on the Order Confirmation page, as shown in
this image.
The code that created this Big Spender Discount was:
$this->add_threshold(100, 'Spend over $100 on hardware, get 10% off your hardware purchase', false);
$this->set_constraint(CAT,1);
$this->set_discount(CAT, 1, '*', "%",10);
Add-Ons:
If you buy enough hardware items to pass the $200 threshold and then add the movies to your cart, you will be able to see the
discount in your cart because of
Discount Preview.
Current Version: 1.2.7. Occasionally,
new features are documented prior to being publicly available;
please check the version history to ensure the
feature you want is available in your version.
Overview:
My Quantity Discounts
Contribution allows you to discount the purchase of specific
quantities of items, where
items can be grouped and counted in a number of ways. Every once in a while though,
people ask me to modify the contribution to discount by dollars spent
(typically with a few exceptions or exemptions).
This is a modification which I do for $30.
Increasingly, however, I have been receiving more complex requests
for discounts based on dollars spent. Typically these
are initiated after a certain dollar threshold is exceeded. The
most common of these is, "provide a free gift after with purchases of
a certain amount,"
or, "provide additional discounts on further purchases after a certain
amount has been spent."
None of my existing modules is adequate for this task.
This requires a new approach to specifying both conditions and discounts.
Hence, Big Spender.
Big Spender is configured by setting "thresholds" and then
parameterizing these thresholds, specifying the discounts
available once the threshold is exceeded, and (optionally)
specifying how the threshold is to be determined, if it is anything
other than the total value of all cart items.
Big Spender requires you to add these
thresholds and parameters to the module itself - they are not configured through the
admin panel.
This sounds complicated, but it's not that bad, and many examples of
common discounting practices are provided. Please note that Big Spender only provides a discount; it does not automatically
add items to the cart.
The calling conventions for building a threshold are as follows:
{ dollar figure, text description, whether to apply the behavior multiple times }
So suppose the discount was stated as, "After $200 is spent, take some action." This would be
$this->add_threshold(200, "Spend over $200 and get ...", false);
If the discount was, "For every $200 spent, take some action," the
code would be
$this->add_threshold(200, "For every $200 spent, get ...", true);
Now we need to parameterize the threshold. Parameter statements
apply to the threshold statement they immediately follow.
I have provided a visual cue for this by indenting the parameter statements
on this page by three spaces.
The following types of parameter statements are currently supported:
set_discount - discount some product or category by a specific percentage or currency figure
set_choice_discount - discount a specified number of items from some product or category by a specific percentage or currency figure
set_cart_discount - discount the entire cart by a specific percentage or currency figure
set_constraint - determine whether the threshold has been crossed by totalling the value of only the specified products or categories
set_negative_constraint - determine whether the threshold has been crossed by totalling the value of all products except those specified
set_support - provide additional information on the discount
set_deal_id - giving the discount an identifying number to allow other discounts to be filtered out if this number has been run
set_no_double_dip - specifying which discounts which, if executed, will cause this discount to be skipped
set_group - only apply this discount to members of the listed groups
set_min_items - apply this discount only if at least this many items are in the cart and meet the other criteria
One of set_discount(), set_choice_discount() or set_cart_discount() must be done for every
threshold for it to have any action. The use of set_constraint()
is optional.
The discount, "Spend over $200, get a free product 5" would be specified as
$this->add_threshold(200, "Spend over $200 and get a free name-of-product-5", false);
$this->set_discount(PROD, 5, 1, "%", 100);
The discount, "For every $200 spent, get $20 off an item from category 7" would be specified as
$this->add_threshold(200, "For every $200 spent, get $20 off an item from name-of-category-7", true);
$this->set_discount(CAT, 7, 1, "$", 20);
Now let's add a constraint.
The discount, "For every $200 spent from category 3, get two free items from category 7" would be specified as
$this->add_threshold(200, "For every $200 spent from category 3, get two free items from category-7", true);
$this->set_discount(CAT, 7, 2, "%", 100);
$this->set_constraint(CAT, 3);
Now let's add choices.
The discount, "For every $200 spent from category 3, get your choice of 2 free gifts from products 20, 25, 30, 35, or 40" would be specified as
What if instead of category 3, you wanted to provide a discount for spending
on certain types of products which were spread across categories.
We'll call this product class "open stock cookware," and assume that
it is made up of product ids 1, 3, 5, 11, 13, 19, 37, and 41.
We'll only allow this discount to be offered once per order.
(The "$" is just used to specify currency; your cart's currency settings
will be respected when computing the discount.)
Constraints can be specified in the opposite manner; to total all items
in the cart except for gift certificates (category 21), use set_negative_constraint():
$this->add_threshold(100, "Spend over $100 (excluding gift certificates), get a free product 20", false);
$this->set_negative_constraint(CAT, 21);
$this->set_discount(PROD, 20, 1, "%", 100);
The discount, "Spend over $200, get 20% off one item priced at $100 or more" would be specified as
$this->add_threshold(200, "Spend over $200, get 20% off one item $100 or more", false);
$this->set_discount(MINPRICE, 100, 1, "%", 20);
The discount, "Spend over $200 on items by manufacturer ABC, get a free product 20" would be specified as
$this->add_threshold(200, "Spend over $200 on items from manufacturer ABC, get a free product 20", false);
$this->set_constraint(MANUF, 7);
$this->set_discount(PROD, 20, 1, "%", 100);
(assuming the manufacturer id of ABC was 7.)
The discount, "Get 20% off on items by manufacturer ABC" would be specified as
$this->add_threshold(1, "20% off items from manufacturer ABC", true);
$this->set_constraint(MANUF, 7);
$this->set_discount(MANUF, 7, "*", "%", 20);
(again assuming the manufacturer id of ABC was 7.)
Discounts can also be limited to certain groups using set_group():
$this->add_threshold(100, "Spend over $100, get a free product 20", false);
$this->set_group(1,3,7);
$this->set_discount(PROD, 20, 1, "%", 100);
Discounts can be made to require the purchase of a minimum number of items:
$this->add_threshold(100, "Spend over $100 on at least 3 items, get a free product 20", false);
$this->set_min_items(3);
$this->set_discount(PROD, 20, 1, "%", 100);
Discounts can be applied to the cart's value:
$this->add_threshold(100, "Spend over $100 on category 2, get 20% off your purchase", false);
$this->set_constraint(CAT, 2);
$this->set_cart_discount("%", 20);
Discounts can be applied to the items that allowed you
to cross the threshold.
$this->add_threshold(100, "Spend over $100 on category 2, get 20% off all category 2 items", false);
$this->set_constraint(CAT, 2);
$this->set_discount(CAT, 2, '*', "%", 20);
You can have different discounts on different products:
$this->add_threshold(100, 'Spend over $100, get $10 off each hardware item and $5 off each movie', false);
$this->set_discount(CAT, 1, '*', "$",10);
$this->set_discount(CAT, 3, '*', "$",5);
Sometimes you may wish to tier your discounts
$this->add_threshold(500, "Spend $500 get five free product 20", false);
$this->set_discount(PROD, 20, 5, "%", 100);
$this->add_threshold(100, "Spend $100 get a free product 20", false);
$this->set_discount(PROD, 20, 1, "%", 100);
Big Spender does not know that these are related, so this would allow someone spending over $500 to take six free product 20. To indicate that discounts are exclusive, use set_deal_id() and set_no_double_dip().
$this->add_threshold(500, "Spend $500 get five free product 20", false);
$this->set_discount(PROD, 20, 5, "%", 100);
$this->set_deal_id(1);
$this->add_threshold(100, "Spend $100 get a free product 20", false);
$this->set_discount(PROD, 20, 1, "%", 100);
$this->set_no_double_dip(1);
Note that when this is done, the highest discount should be specified first; otherwise, a lower discount will block a higher discount.
A set_no_double_dip() on the first threshold and a set_deal_id() on the last are not required but may be specified; the above block is
identical to this:
$this->add_threshold(500, "Spend $500 get five free product 20", false);
$this->set_discount(PROD, 20, 5, "%", 100);
$this->set_deal_id(1);
$this->set_no_double_dip(2);
$this->add_threshold(100, "Spend $100 get a free product 20", false);
$this->set_discount(PROD, 20, 1, "%", 100);
$this->set_deal_id(2);
$this->set_no_double_dip(1);
These thresholds and parameters are not only
used in discount calculations; they are also used to create
messages which are automatically displayed on the product_info
page.
Details on how to do this are provided in
marketing.
Big Spender is an order total module, so it appears on the Order Confirmation Page
of your checkout as a discount (unless
Discount Preview
is used, which allows the discount to be shown in the cart).
Order Confirmation Page displaying Big Spender Discount
This is a "spend over $100, get 10% off" offer.
Detailed Description:
Thresholds and parameters are specified in the setup()
method at the bottom of the file
There is no admin interface; you must modify the file directly.
Any number of these discounts may be offered; discount computation will
be done in the following order:
Thresholds are calculated in the order in which they are specified in setup()
For each threshold, the set_discount() and set_cart_discount() statements are executed first (in the order they were specified), then the set_choice_discount() statements (in the order they were specified)
Once an item has been discounted, it is not subject to re-discounting, even if rules would permit it
Items in the cart are discounted from least expensive to most expensive.
To make these discounts visible on your product info page,
follow the directions in
marketing below in the installation instructions.
This step will display the message you provided in the add_threshold()
command:
For every $200 spent on open stock cookware, select 2 free gifts ...
The message is displayed to encourage the customer to cross the
threshold. It is displayed on any item which will contribute to crossing
the threshold *and* any item which is discounted after crossing the threshold.
This step is optional; if you prefer, you can add your own marketing text.
Category Handling
Note that CAT has different semantics in Big Spender when compared
to Better Together. In Better Together, CAT only includes items
directly below the specified category (i.e. CAT means "parent category").
In Big Spender, CAT includes all items in the specified category,
whether they are directly below or in subcategories.
Men's Clothing (category 3)
|
----> Shirts (category 5)
| |
| -------> shirt A
| shirt B
| shirt C
----> Pants (category 6)
| |
| -------> pants A
| pants B
| pants C
----> Shoes (category 7)
|
---> Dress Shoes (category 12)
| |
| -------> dress shoes A
| dress shoes B
| dress shoes C
---> Casual Shoes (category 18)
|
-------> casual shoes A
casual shoes B
casual shoes C
Specifying "Men's Clothing" as a category in Big Spender will
include all items in Shirts, Pants and Shoes.
Better Together.
Specifying "Shoes" (CAT 7) as a category in Big Spender will include both
dress shoes and casual shoes.
Because of the ability to specify categories in both
the negative and positive manner, you can create a discount
which is triggered by spending over $100 on Men's Clothing,
excluding shoes:
$this->add_threshold(100, "Spend over $100 on Men's clothing (excl. shoes), get a free product 20", false);
$this->set_constraint(CAT, 3);
$this->set_negative_constraint(CAT, 7);
$this->set_discount(PROD, 20, 1, "%", 100);
Installation Instructions:
Back up everything! Try this in a test environment prior to installing
it on a live shop.
Copy the contents of the unzipped folder to the root directory of your
shop.
Login to admin and in Modules->Order Total.
In osCommerce 2.2: you will see
'Big Spender Discount' listed along with all the other modules available.
Click on 'Big Spender Discount' to highlight the module and click on 'Install'
In osCommerce 2.3: Click on the "Install Module" button on the upper right.
Select the row that says "Big Spender Discount." Press the
"Install Module" button on the right hand side of the screen.
Ensure that the sort order that you have selected for Big Spender is not already used by another module. If necessary, change the sort orders of other modules to ensure that Big Spender displays where you want it, with a unique sort order. Also, if you are using Re-calculate Tax = Standard, be sure the Tax sort order is larger than the Big Spender sort order.
Decide on the discounts you wish to use. The easiest way to do this
is to open a shopping cart in another window, and just start adding
discounts to the setup() method of
includes/modules/order_total/ot_bigspender_discount.php.
The discounts are shown on the second step of checkout in
"Your Total" under "Big Spender Discount."
You may wish to use a less silly name than "Big Spender Discount."
If so, modify the file includes/languages/english/modules/order_total/ot_bigspender.php.
If you wish, follow the guidelines in marketing
to advertise your discounts.
Some contributed payment modules in osCommerce 2.2 (such as Paypal)
are not naturally aware of the
existence of discounts (mine or any other contribution or extension).
For this reason, you must ensure any payment module you use takes
discounts into account. Here are some guidelines:
If the payment module passes in a subtotal, shipping and tax, modify the subtotal (as shown below) to include the discount.
If the payment module passes in a shipping, tax, and total, modify the total (as shown below) to include the discount.
In the case of Paypal, turn OFF the sending of line item details, which will confuse Paypal since the total is not the sum of the line items. This can be done through the admin panel by setting Transaction Type to "Aggregate."
The modification involves simply subtracting the discount amount.
If the order total is computed as follows (example taken from paypal_ipn.php):
foreach ($order_totals as $ot) {
$order_total[$ot['code']] = $ot['value'];
}
then the discount is available in the $order_total variable as follows:
Module
Variable Name
Quantity Discounts
$order_total['ot_quantity_discounts']
Better Together
$order_total['ot_better_together']
Big Chooser
$order_total['ot_big_chooser']
Big Spender
$order_total['ot_bigspender_discount']
Table Discounts
$order_total['ot_table_discounts']
So for instance, subtracting the Quantity Discounts discount from
a variable called $subtotal would be done as follows:
This would be done in process_button() for example.
Another more sophisticated approach would be to execute the order totals and use ot_total, which is the final total after discounts.
// BEGIN: Change to use order_totals to get values
$order_id = substr($cart_PayPal_IPN_ID, strpos($cart_PayPal_IPN_ID, '-')+1);
$ord_totals = array();
$ord_totals_query = tep_db_query("select class, value from " . TABLE_ORDERS_TOTAL .
" where orders_id = '" . (int)$order_id . "' order by sort_order");
while ($totals = tep_db_fetch_array($ord_totals_query)) {
$ord_totals[$totals['class']] = $totals['value'];
}
// END
. . .
$parameters['business'] = MODULE_PAYMENT_PAYPAL_IPN_ID;
// BEGIN : use order_totals['ot_total'] for order total to include all discounts.
if ($ord_totals['ot_total'] > 0) {
$parameters['amount'] = number_format($ord_totals['ot_total'], $currencies->get_decimal_places($currency));
} else {
$parameters['amount'] = number_format($order->info['total'] - $order->info['shipping_cost']
- $order->info['tax'], $currencies->get_decimal_places($currency));
}
// END
Both Paypal and some contributed payment modules in osCommerce 2.3
are not naturally aware of the
existence of discounts (mine or any other contribution or extension).
For this reason, you must ensure any payment module you use takes
discounts into account.
I don't yet have turnkey instructions for doing this; if you need
help, I can install it for a fee.
Marketing
What good is having cross selling and upselling specials if you don't
advertise them?
Big Spender Discounts may be automatically displayed in two places:
on the product info page, and on a separate promotional page. We'll
talk about the product info page first.
Modify catalog/product_info.php, and add this block
of code:
The placement of this code is a matter of personal preference;
try placing it below the product description and adjust to your tastes.
It creates a message on your page that uses the description you
provided in the add_threshold():
For every $200 spent on open stock cookware, select 2 free gifts ...
Only one div block of text will be produced, with the div id
bigSpenderDiscountPolicy.
The file bigspender_marketing.php also contains additional print statements which are commented out, but which you may uncomment if desired. These include:
An indication of whether this product contributes towards reach the threshold and/or is discounted after the threshold is reached
The display of additional "supporting" text for the discount that you have added using $this->set_support(). Such text can include links to PDFs, links to products in your cart, links to external pages, or simply descriptive text.
This text will be automatically displayed on the Big Spender Discount promotional page.
Styling this block of text (changing
font, color, etc.) is simply a matter of adding to your stylesheet
For every $200 spent on open stock cookware, select 2 free gifts ...
Probably a bit more obnoxious than you would truly want, but you
get the idea.
Alternately, you could modify the marketing text template (bigspender_marketing.php) and put the text into a fieldset:
The approach to marketing text for Big Spender is different than the one used
in Better Together, in that it is not triggered
by a particular product. Instead, it is globally displayed on all product info pages unless that product is constrained out of the discount. So for
instance, if you have
$this->add_threshold(100, "Spend over $100 on Men's clothing (excl. shoes), get a free product 20", false);
$this->set_constraint(CAT, 3);
$this->set_negative_constraint(CAT, 7);
$this->set_discount(PROD, 20, 1, "%", 100);
then the marketing text will appear on pages for products in category 3 (and subcategories), and on the page for product 20, but not on pages in category 7 (and subcategories).
If the two constraints were not specified, the marketing text
would appear on all product info pages. Note that price based constraints
are not used to filter out marketing text because the final price
of a product may not be known
on the product info page.
The other available marketing vehicle is the Big Spender Discount promotional page. This page is completely optional; it is not included in the bigspender.zip file,
but it is a free download from my website for people who
have purchased Big Spender. It creates a page that looks like
this,
displaying all discounts and supporting text.
Thresholds and Parameters,
which are specified in the setup() function of ot_bigspender_discount.php,
are the mechanism for configuring a store's discounts.
Thresholds
Discounts always begin by specifying a spending threshold.
All subsequent parameters (until the next threshold) apply
to this threshold.
Is a textual description of the discount. This description is not automatically created the way it is in Better Together;
it must be added manually. The reason for this is to allow greater flexibility
repeatable
is a boolean flag indicating whether to apply the discount only one time (false) or as many times as possible (true).
Parameters - set_discount
The set_discount() command specifies the items or categories whose
prices should be reduced if the threshold has been met.
is the string PROD, CAT, PRICE, MINPRICE or MANUF, followed by an identifier (product or category id, or product price), followed by a quantity, followed by a percent or dollar sign, followed by an amount
<PROD | CAT | PRICE | MINPRICE | MANUF> <product or category identifier or price> <item count> < "$" | "%" > <discount amount>
The item_count may be specified as "*", meaning "the discount may be taken an unlimited number of times."
Parameters - set_cart_discount
The set_cart_discount() command specifies the reduction in the
total cart price that should be done
if the threshold has been met.
is the number of discounts the customer will receive; it must be a numeric quantity
choice
is the string PROD, CAT, PRICE, MINPRICE or MANUF, followed by an identifier (product or category id, or product price), followed by a percent or dollar sign, followed by an amount
Note that this is different from the discount specified in
set_discount because no explicit quantity is specified per choice;
the quantity set at the level above.
The set_constraint() command specifies the items whose prices are used
to determine if the threshold has been passed. If this command is
not specified, the total price of all items in the cart is used.
is the string PROD, CAT, PRICE, MINPRICE, or MANUF, followed by an identifier (product or category id, or product price)
<PROD | CAT | PRICE | MINPRICE | MANUF> <product or category identifier or price>
Parameters - set_negative_constraint
The set_negative_constraint() command specifies the items whose prices are NOT used
to determine if the threshold has been passed. If this command is
not specified, the total price of all items in the cart is used.
is the string PROD, CAT, PRICE, MINPRICE, or MANUF, followed by an identifier (product or category id, or product price)
<PROD | CAT | PRICE | MINPRICE | MANUF> <product or category identifier or price>
NOTE: A negative constraint does not mean "the item must not be in the cart;" it simply means "the item is not counted towards the reaching the total."
Parameters - set_support
The set_support() command provides additional supporting text to
describe your promotion.
It is completely optional.
$this->set_support(<text>);
where:
text
is a text string, which can be plain text or a link
These strings are displayed on your promotional page, and optionally, on your product info page if you
follow the guidelines in marketing.
Parameters - set_deal_id
The set_deal_id() command allows you to give a threshold and its
associated discount an id, to allow later discounts to be filtered out
if this discount has been run using set_no_double_dip. This parameter is optional and is
only needed for discounts which preclude other discounts.
$this->set_deal_id(<nnnn>);
where:
nnnn
is some number which identifies this threshold or group of thresholds.
For convenience, use the same id for all members of a related group
of thresholds ("Spend $1000, get..", "Spend $500, get ...",
"Spend $250, get ...") where you only want the highest value
discount to be executed.
Parameters - set_no_double_dip
The set_no_double_dip() command allows you to give a
specify that if a certain discount has already been run,
the current discount should be skipped.
This parameter is optional and is
only needed for discounts which preclude other discounts.
$this->set_no_double_dip(<nnnn>);
where:
nnnn
is the id which was used in a set_deal_id() command for one or more previous thresholds.
Multiple set_no_double_dip commands may be used as required.
Parameters - set_group
The set_group() command specifies that the discount is only available
to members of the listed group(s).
The set_group() command specifies that the discount is only available
to if a certain number of items or more are purchased and meet the
other discount requirements.
$this->set_min_items(<nnnn>);
where:
nnnn
is the minimum number of items required to get the discount.
Major Versions
Version 1.2.7 - 11/01/11 - Added VAT + bug fixes from Zen Cart Big Spender 1.2.7.
Version 1.2.5 - 05/01/10 - Some PHP5's didn't handle quantities correctly.
Version 1.2.4 - 11/18/09 - First release
FAQ
Q: Why is there an Big Spender in the first place? A: To better facilitate a more powerful model for discounting based
on dollars spent than can be done by modifying
Quantity Discounts.
Q: Why is the version number of the first release so high? A: Big Spender for osCommerce is based on a product of the
same name for the Zen Cart platform. The version of
this product at the time was 1.2.4, so I started at the same number.
This means you get hardened, field tested code in the first release.
Q: Why is doesn't this have the same features as the Zen Cart version? A: Zen Cart has certain built in features which osCommerce does
not, such as groups and coupons. I didn't want to rely on the contributions
that provided these features in osCommerce, so I omitted them entirely.
Q: Why do you have to add PHP code to setup()? Why didn't you put
this in the Admin panel? A: Although it's a bit tedious to have to manually code the associations,
it maximizes the module's flexibility.
If you need help with the
setup logic, I will be happy to do it for you for a small fee,
but first look at the many examples in this page.
Q: Can I start and stop my Big Spender discounts on certain dates in the future? A: Please see Timing Discounts in osCommerce for an explanation of how to do this.
Q: How do I determine a product's id? A: In the catalog, click on the product to open the product info page.
In the address bar of your browser, you see something like
... product_info.php?products_id=24&osCsid=...
The products_id = 24 tells you the product's id is 24.
Q: How do I determine a product's category id? A: In admin->catalog, single click on the category you're interested in. In the address bar of your
browser, you will see something like
categories.php?cPath=3&cID=11
If you were to double click on it, you'd see something like
categories.php?cPath=3_11
The category you want to use is "11".
In the same way, in the catalog you can hover over this category in
the categories sidebox and see
catalog/index.php?cPath=3_11
This re-confirms that the category is "11."
Q: How do I find out the manufacturer id so I can use MANUF? A: Go to the Manufacturer's sidebox on your catalog home
page and select a manufacturer. The resultant URL will look
something like this:
The "manufacturers_id=8" component of this URL indicates that the
id for this manufacturer is 8.
Q: I would like my discounts to show up in the shopping cart.
Why don't they? A: The way the Order Total modules work is that they show up at
checkout time. However, if you require the discounts to
show up in the shopping cart, you may wish to
purchase the
Discount Preview
module for $30.
Alternately, you may indicate that you have a Big Spender
discount policy by displaying a message on the shopping cart page
informing the user that Big Spender discounts will be
calculated (and visible) at checkout time.
Additionally, changing SUB_TITLE_SUB_TOTAL in the same file to
something like 'Sub-Total BEFORE Discount' will emphasize the fact that
a discount will be added at checkout time.
Q: How can I present my Big Spender discounts on the product page? A:
Follow the directions in
marketing in the installation instructions
for details on the changes that are required.
Q: I like the message on my product page, but I'd like it to have a link in it. The threshold for my discount is a $100 hardware purchase, which corresponds to category 1. A: You can create a link in your message.
$this->add_threshold(100, 'Spend over $100 on <a href="index.php?main_page=index&cPath=1">hardware</a>,
get two movies free', false);
This will show up on your product info page as
'Spend over $100 on hardware, get two movies free'
Be sure to construct your link WITHOUT a oscSid. Do not just copy and paste
from your address bar!
Q: What is the difference between MINPRICE and PRICE? A: PRICE means the price must be exactly equal to the specified value. MINPRICE means the price must be greater than or equal to the
specified value. So using MINPRICE in a set_constraint means that
only items of this price or greater count in the threshold calculation.
Using MINPRICE in a set_negative_constraint means that only items
below this price are counted. And using MINPRICE in a set_discount() or
set_choice_discount() means that items at the specified price or greater
will match the rule.
Q: If I specify multiple thresholds with the same discounts, will Big Spender double discount my products? A: Each product in the customer's cart will only be discounted once by Big Spender. Specifying "repeatable" for a threshold
or an item count greater than 1 for set_discount will discount multiple
times only if multiple items exist; it will not cause the same item
to be discounted multiple times.
Q: I like Big Spender, but I really just want to give cash discounts to my customers. Is this possible? A: The "set_cart_discount()" command was introduced to allow this.
Q: In what order are the discounts evaluated? A: The thresholds are evaluated in the order they are entered, with the
set_discount() parameters executed first (in the order they were entered),
followed by the set_choice_discounts (in the order they were entered).
If repeatable is specified, a discount is run as many times as possible
(as long as products are not discounted multiple times).
If a threshold uses no_double_dip, and other thresholds with the specified ids
have already been passed and discounted, that threshold's discounts will not
be run.
All discounts are run unless a discount is precluded because of a
set_no_double_dip() command. Items are discounted in the order least
expensive to most expensive.
Q: OK, I have the Big Spender information on my product page, but my customers can't figure out that the discount isn't visible until checkout time A: Add some explanatory text to the discountPolicy information you created
above. This way it will show up every time there is Big Spender
information on a page. Alternately, you may purchase
the Discount Preview
module,
or you may also add text to the shopping cart
page to indicate that Big Spender discounts will show up at checkout time
as discussed above.
Q: I operate a multilingual shop. How can I avoid putting my descriptions in ot_bigspender_discount.php? A: If you run a multilingual shop, then instead of putting the string in the add_threshold() command directly,
edit the file includes/languages/english.php and put your definitions there as PHP defined strings.
Here's an example:
<?php
define('BIGSPENDER_MOVIE_DISCOUNT', "Spend over $200, get a movie half off");
?>
Q: All these rules and parameters and combinations make my head hurt. Will you configure this for me? A: Naturally. Contact me with your requirements for a quote.
I charge a fee of $60 for Big Spender.
The fee covers software only; installation is extra if you require help.