Post by ALawrence » Mon Feb 04, 2013 9:15 am

This is the official topic for the FREE GLOBAL DISCOUNT extension, which can be found here: http://www.opencart.com/index.php?route ... on_id=4099

Direct support requests may be dealt with faster by submitting a help request at http://dev.anthonylawrence.me.uk/helpde ... partment=3

=======
Overview
=======

Allows the shop owner to specify a global discount (either fixed price or percentage) to be automatically applied at checkout.

Features include:
* Ability to set either a fixed price OR a percentage discount.
* Discount to take VAT/Shipping into account (if you wish).
* No file edits! Simple upload.

=======
Demo
=======

http://opencart.anthonylawrence.me.uk/

Choose any version of OpenCart (bearing in mind which versions this extension is compatible with)!

Admin:
User: demo
Pass: demo

Customer:
User: demo@anthonylawrence.me.uk
Pass: demo

NB: Databases are restored to default on a nightly basis.

=======
Support
=======

For support, please submit a ticket to the helpdesk at http://dev.anthonylawrence.me.uk/helpde ... partment=3 support requests will be handled within 7 business days.

Alternatively, you can find out whether anyone else has shared your experience or has a similar issue by viewing the official forum topic at http://forum.opencart.com/viewtopic.php?t=94563

=======
Installation
=======

1) Choose the base version folder (for example, 1_4 or 1_5) - take note of what versions are supported by this extension!
2) Upload the "admin" and "catalog" directories to the root of your OpenCart installation.
3) Login to your admin panel.
4) Go to "Extensions" > "Order Totals".
5) Click "Install" next to "Global Discount".
6) Complete the form as you want it! Note: Status must be set to enabled!
7) Done!

=======
Upgrade
=======

From v1.0.3 - v1.0.4
--------------------

In v1.0.4 the name of the extension was changed from "sitewide discount" to global discount.
To upgrade, do the following:

1) Login to your shop and go to "Extensions" > "Order Totals".
2) Uninstall "Sitewide Discount".
3) Delete a few files.
a) Delete admin/controller/total/sitewide_discount.php
b) Delete admin/language/english/total/sitewide_discount.php
c) Delete admin/view/template/total/sitewide_discount.php
d) Delete catalog/language/english/sitewide_discount.php
e) Delete catalog/model/total/sitewide_discount.php
4) Follow instructions 1 - 7 of the installation.

From v1.0 - v1.0.3
------------------
Since only the core files are edited, and no files are deleted, follow steps 1 & 2 of the installation.
If the global discount isn't enabled, follow steps 3 - 7

=======
FAQ
=======

Q) I have it setup as described but the total doesn't reflect the discount that has been applied.
A) That's normally caused by bad positioning of order totals. Check to makesure that nothing else is given the same sort order as this extension.

Q) When using a fixed price discount, the value shown is different to what's expected. Is this right?
A) This is because the discount is applied in your local currency. For example, if you give a discount of 10 (with your default currency being US Dollars) when a customer switches to British Pounds, the value will be converted.

Q) My taxes don't appear to be correct... My product is selling for £100, with £10 global discount, but a tax of 10% still shows £10 and not £9! WHY?!
A) Due to the inner workings of Opencart, taxes are calulcated on the sub total of all items in the cart. Discount is always applied after tax and the sort orders make no difference to this.

=======
Release Notes
=======

V1.0.4 - xx/xx/xxxx - [Opencart Version 1.4.9 - 1.5.2.1]
--------------------------------------------------------
- Not yet released!

V1.0.3 - 22/12/2011 - [Opencart Version 1.4.9 - 1.5.2.1]
--------------------------------------------------------
- Fixed issue with incorrect values being reported to the user when discount is applied in 1.5.x. [Thanks goes to vladko13 for reporting this and suggesting a fix]

V1.0.2 - 04/12/2011 - [Opencart Version 1.4.9 - 1.5.2.1]
--------------------------------------------------------
- Fixed percentage based discount to use entire total, rather than just subtotal. [Thanks goes to skip for reporting this]

V1.0.1 - 04/12/2011 - [Opencart Version 1.4.9 - 1.5.2.1]
--------------------------------------------------------
- Fixed tax error in version 1.4.9.x. [Thanks goes to skip for reporting this]

V1.0 - 27/11/2011 - [Opencart Version 1.4.9 - 1.5.2.1]
------------------------------------------------------
- Initial release.

Newbie

Posts

Joined
Tue Jun 14, 2011 4:31 am

Post by agelinaking » Thu Apr 11, 2013 12:40 pm

hmm...this is a very good info dude.. thanks for sharing such a info .. i thing it should be share around the web. O0

discount sofa beds


Newbie

Posts

Joined
Thu Apr 11, 2013 12:38 pm

Post by swguy » Mon Apr 15, 2013 4:37 am

Small suggestion: you could make either or both date fields optional by making this small change:
(Line numbers are for 1.5.x version)

In ./catalog/model/total/sitewide_discount.php, replace lines 17-19

Code: Select all

                        if(date("Y-m-d") < $this->config->get("sitewide_discount_date_start") || date("Y-m-d") >= $this->config->get("sitewide_discount_date_end")){
                            return;
                        }
with

Code: Select all

          $start_date = $this->config->get("sitewide_discount_date_start");
          $end_date =  $this->config->get("sitewide_discount_date_end");
          if($start_date != '' && !is_null($start_date) && (date("Y-m-d") < $start_date)) {  
             return;        
          }             
          if($end_date != '' && !is_null($end_date) && (date("Y-m-d") < $end_date)) {  
              return;       
          }             

Better Together: Buy one product, get another at a discount.
Discount Chooser: Buy a group of products, get another group at a discount.


User avatar
New member

Posts

Joined
Mon Apr 15, 2013 4:13 am

Post by Infinite » Wed Sep 11, 2013 1:31 am

Hi,

I've found a problem and I'm not sure if it's the way Opencart works or if it's the way the extension works.

If I have the discount module priority greater than the tax module (or after the shipping) it's fine:
Sub-Total £43.75
VAT £8.75
Discount £-5.25
Postage £7.50
Total £54.75

But if I have the discount module just after the sub total I get this:

Sub-Total £43.75
Discount £-4.38
VAT £8.75
Postage £7.50
Total £55.63

So it's taking the 10% off the sub total (and the order total) but calculating tax based on the original sub total. I need to take the discount off the net price but then the tax is wrong and the order total is wrong.

If I have the discount after tax or after shipping it's fine so I'm not sure if it's a problem of the tax module working on the subtotal and ignoring the discount (like I almost need a subtotal then the discount then another subtotal for tax to be applied correctly) or if I need to do something different?

Thanks,

Steve.

Newbie

Posts

Joined
Wed Feb 15, 2012 3:08 am

Post by xenux » Thu Oct 24, 2013 2:25 am

I agree it doesn't calculate right! can you fit it?

Newbie

Posts

Joined
Fri Aug 31, 2012 7:01 am
Who is online

Users browsing this forum: No registered users and 34 guests