[Contribution] Quantity Discounts for osCommerce 3.0
#1
Posted 08 June 2009 - 09:38 PM
My Quantity Discounts contribution permits you to offer discounts that are structured many different ways:
* By total number of items purchased
* By number of items purchased, counting per item
* By number of items purchased, counting per category
* Counting by items or by number of dollars spent, in any of the ways above
* Specifying the discount as a percentage, a flat dollar figure or dollars per item
Download it here:
http://addons.oscommerce.com/info/6804
Installation instructions and configuration help is in the README; more ideas and sample marketing text is on my home page.
#2
Posted 09 June 2009 - 03:02 AM
http://www.oscommerce.com/community/contributions,1435.
There is problem when I try to edit my order and the total order price , there is problem adding up!
Fatal error: Call to a member function get_products() on a non-object in /home/canvas/public_html/includes/modules/order_total/ot_quantity_discount.php on line 293
$products = $_SESSION['cart']->get_products();
$prod_list = array();
$prod_list_price = array();
$cat_list = array();
$cat_list_price = array();
$all_items = 0;
$cat_list_back = array();
$prod_list_back = array();
$all_items_price = 0;
for ($i=0, $n=sizeof($products); $i<$n; $i++) {
if (!$this->is_discountable($products[$i]['id'])) continue;
thank!
#3
Posted 09 June 2009 - 04:44 AM
asbestos0, on Jun 8 2009, 11:02 PM, said:
Yes - but the problem you are reporting is with the osCommerce 2.2 version of Quantity Discounts; this thread is for osCommerce v3. I will post a fix to the problem you have reported to the 2.2 thread later this month.
#4
Posted 24 June 2009 - 11:57 PM
is it possible to show the discount in the shopping_cart.php ?
thx
#5
Posted 25 June 2009 - 12:09 AM
#6
Posted 13 July 2009 - 02:44 PM
Just one question - is it possible to get it to only apply the discount to a specific country/zone only?
Cheers
#7
Posted 13 July 2009 - 02:48 PM
seank123, on Jul 13 2009, 10:44 AM, said:
That's not a feature it has right now.
Did you add code for buy 2 get a third free? Otherwise the results when you buy 4 or more might be surprising ...
#8
Posted 17 July 2009 - 04:04 PM
swguy, on Jul 13 2009, 03:48 PM, said:
Did you add code for buy 2 get a third free? Otherwise the results when you buy 4 or more might be surprising ...
Cheers for the reply. Hopefully it will appear in future versions!
I set 'Discount Level 1' to 3 and 'Discount Amount' to the price of the items (all items are the same price) - seems to work - when I add 2 itmes I get no discount, when I add 3 or more items I get the price of one item discounted - perfect! Probably will run into problems if the prices of items are different though!
Would it be possible to set the discount amount to the cost of the cheapest item if the 'Total Items In Cart' option was selected rather than a set value?
#9
Posted 17 July 2009 - 04:19 PM
seank123, on Jul 17 2009, 12:04 PM, said:
No. It offers a percentage or a fixed amount as the discount choices.
#10
Posted 02 August 2009 - 07:28 PM
I get this problem:
Catchable fatal error: Object of class osC_OrderTotal_quantity_discounts could not be converted to string in K:\xampp\htdocs\osc3\includes\modules\order_total\quantity_discounts.php on line 644
(I change to this pair)
currency per item
Total Items in Car
Used options:
Sort Order
Sort order of display. 3
Include Tax
Include Tax in calculation.
true
x false
Re-calculate Tax
Re-Calculate Tax
None
x Standard
Discount Units
Are AMOUNT values below expressed as a percentage or as currency units (e.g. dollars)
currency
percentage
x currency per item
Discount Basis
How quantity totals are computed
Total By Category
Total By Item
x Total Items in Cart
Counting Method
Are LEVEL values below expressed in number of items or currency units (e.g. dollars spent)
x items
currency
Discount Level 1
Total required to reach this discount level
10
Discount Amount 1
Percent or amount off at this level
10
Discount Level 2
Total required to reach this discount level
11
Discount Amount 2
Percent or amount off at this level
20
Discount Level 3
Total required to reach this discount level
20
Discount Amount 3
Percent or amount off at this level
22
Discount Level 4
Total required to reach this discount level
30
Discount Amount 4
Percent or amount off at this level
30
Discount Level 5
Total required to reach this discount level
100
Discount Amount 5
Percent or amount off at this level
30
SCM
v3
and some rewrites :-)
#11
Posted 02 August 2009 - 07:50 PM
$h_exp = $verb . " " . $over_level . " " . $basis . " " . $this->$this->GET . " " . $off_amt . " " . $this->PER_ITEM_OFF;
to
$h_exp = $verb . " " . $over_level . " " . $basis . " " . $this->GET . " " . $off_amt . " " . $this->PER_ITEM_OFF;
Thanks for the report. This will be fixed in the next release.
#12
Posted 19 September 2009 - 12:51 PM
I find TAX calculating problem of Quantity Discounts:
Example:
Shopping Cart
Shopping Cart
Date Added: 09/19/2009
Delete osCommerce T-Shirt
- Size: Medium
- Front: 15,000Ft
Sub-Total: 15,000Ft
Free Shipping (for orders over 20Ft): 0Ft
Quantity Discounts: -1,200Ft
Áfa 25%: 3,000Ft
Total: 16,800Ft
My opinion, that the Quantity Discounts:-1,200Ft have to be -1500Ft without tax or 1800Ft with Tax value. The total results have to be 16200Ft.
SCM
v3
and some rewrites :-)
#13
Posted 19 September 2009 - 02:26 PM
Gergely, on Sep 19 2009, 02:51 PM, said:
I find TAX calculating problem of Quantity Discounts:
Example:
Shopping Cart
Shopping Cart
Date Added: 09/19/2009
Delete osCommerce T-Shirt
- Size: Medium
- Front: 15,000Ft
Sub-Total: 15,000Ft
Free Shipping (for orders over 20Ft): 0Ft
Quantity Discounts: -1,200Ft
Áfa 25%: 3,000Ft
Total: 16,800Ft
My opinion, that the Quantity Discounts:-1,200Ft have to be -1500Ft without tax or 1800Ft with Tax value. The total results have to be 16200Ft.
Hi Gergely and swguy!
Gergely!
You've got the wrong sort of calculation.
VAT should be calculated at the end.
osCommerce T-Shirt
- Méret: Medium
- Front: 25.000,-Ft
Sub-Total: 25.000,-Ft (bruttó)
Quantity Discounts: -2.000,-Ft
Free Shipping (for orders over 2.000,-Ft): 0,-Ft
Total: 22.500,-Ft
VAT (ÁFA 25%): 4.500,-Ft
10pcs tshirt 2.000,-Ft +25% VAT (ÁFA) = 25.000,-Ft
Setup:
Include Tax
Include Tax in calculation= false (20000-10% engedmény = 18.000,-Ft)
Bruttó Total: 18.000,-Ft + 25% ÁFA = 18000*1,25= 22.500,-Ft
TAX (ÁFA 25%) 18000*0,25%= 4.500,-Ft
The module is correctly calculated. In my opinion. Are you agree?
Thanks and regards
Marsy from Hungary
#14
Posted 19 September 2009 - 02:41 PM
Gergely, on Sep 19 2009, 02:51 PM, said:
I find TAX calculating problem of Quantity Discounts:
Example:
Shopping Cart
Shopping Cart
Date Added: 09/19/2009
Delete osCommerce T-Shirt
- Size: Medium
- Front: 15,000Ft
Sub-Total: 15,000Ft
Free Shipping (for orders over 20Ft): 0Ft
Quantity Discounts: -1,200Ft
Áfa 25%: 3,000Ft
Total: 16,800Ft
My opinion, that the Quantity Discounts:-1,200Ft have to be -1500Ft without tax or 1800Ft with Tax value. The total results have to be 16200Ft.
Sorry, but very important, that the last will be the TAX modul sort order number!!!!!
Thanks to Marsy!
SCM
v3
and some rewrites :-)
#15
Posted 08 October 2009 - 03:08 AM
#16
Posted 10 May 2013 - 02:52 PM
I have installed the Quantity Discount Module and everything seems to be working fine on my site (ie..the discount shows perfectly) However, when my customer clicks process payment button the order total in Paypal Standard or Authorize.net (which ever they choose) does not reflect the discounted amount. It tried to charge the total amount before the discounts (in other words the discount is not being carried over to paypal or authorize).
I really don't mind (although it would be nice) if the paypal order is not itemized. I just want the correct total to show.
Background...I am not an oscommerce expert by any means.
I have now been burned twice by programmers that said they can fix this and here I am.
CAN ANYONE PLEASE HELP? (besides paying "that software guy" $200 to fix this)
Not sure if it matters I believe I am running Oscommerce v2.3.1 (Paypal Standard)
#17
Posted 10 May 2013 - 08:13 PM
ONLY the total should be seen by PayPal or Authorize.net. Usually, discounts, taxes, shipping, etc.....are not provided to the payment processor. So, As along as you have your discounted amount deducted before the sub-total, it shouldn't make any difference to your payment processor.
Chris
ps. If you are in fact using v3.0.....you're in for a world of disappointment as it is/ was never really supported and is now dead as the core structure originally used in 3.0 has changed with newer GITHUB revisions.
Edited by DunWeb, 10 May 2013 - 08:14 PM.
#18
Posted 10 May 2013 - 08:30 PM
Thank You for your response !!
I have seen people say to discount before subtotal in other parts of the forum, however, I don't know how/where to do this. Can you explain?
I believe I'm using v2.3.1 is that bad?? If so how hard is it to upgrade?
#20
Posted 10 May 2013 - 09:41 PM
ot_total.php ?
If not which one ??
Thank You For Your Help !!
ps..If this helps me fix the problem do you have a paypal account so i can send you a "Tip"









