Post by sazpurua » Sat Jan 13, 2018 12:16 pm

in v3.0.2.0 how can I find out all the commissions that have to be paid to the Affiliates?
The report is not in Modules...

New member

Posts

Joined
Mon Aug 14, 2017 6:50 am

Post by straightlight » Sat Jan 13, 2018 10:46 pm

in v3.0.2.0 how can I find out all the commissions that have to be paid to the Affiliates?
The report is not in Modules...
There are two distinction on using the term all in this case. Either you are talking about all the commissions of each regrouped orders to find out all commissions or you are looking for all totals of each affiliates that needs to be owned within the reports. Assuming you are talking about the first one,

In your admin/model/extension/report/sale.php file, in the getOrders() method,

find:

Code: Select all

SUM(o.total) AS `total`
on the same line, right after, add:

Code: Select all

, SUM(`o`.`commission`) AS `commission`
In your admin/controller/extension/report/sale_order.php file,

find:

Code: Select all

'products'   => $result['products'],
add below:

Code: Select all

'commission' => $this->currency->format($result['commission'], $this->config->get('config_currency')),
In admin/language/<your_language_code>/extension/report/sale_order.php file,

add at the bottom of the file:

Code: Select all

$_['column_commission'] = 'Commission';
In your admin/view/template/extension/report/sale_order_info.twig file,

find:

Code: Select all

<td class="text-right">{{ column_products }}</td>
add below:

Code: Select all

<td class="text-right">{{ column_commission }}</td>
Then, find:

Code: Select all

<td class="text-right">{{ order.products }}</td>
add below:

Code: Select all

<td class="text-right">{{ order.commission }}</td>

Code: Select all

<td class="text-center" colspan="X">{{ text_no_results }}</td>
Where X would be your highest value. Increment it by one.

This should show you the total commissions of all related orders of the same products for each rows.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by sazpurua » Wed Jan 17, 2018 8:45 am

straightlight wrote:
Sat Jan 13, 2018 10:46 pm
in v3.0.2.0 how can I find out all the commissions that have to be paid to the Affiliates?
The report is not in Modules...
There are two distinction on using the term all in this case. Either you are talking about all the commissions of each regrouped orders to find out all commissions or you are looking for all totals of each affiliates that needs to be owned within the reports. Assuming you are talking about the first one,
Thanks for your reply!
Actually what I need is a report that shows me (for a given time period) the list of the affiliates that have earned commissions, and the amount owed to each of them.
However, the info you supply before is quite useful as well.

Thanks

New member

Posts

Joined
Mon Aug 14, 2017 6:50 am

Post by R3l4X » Thu Jun 21, 2018 4:54 pm

sazpurua wrote:
Wed Jan 17, 2018 8:45 am
straightlight wrote:
Sat Jan 13, 2018 10:46 pm
in v3.0.2.0 how can I find out all the commissions that have to be paid to the Affiliates?
The report is not in Modules...
There are two distinction on using the term all in this case. Either you are talking about all the commissions of each regrouped orders to find out all commissions or you are looking for all totals of each affiliates that needs to be owned within the reports. Assuming you are talking about the first one,
Thanks for your reply!
Actually what I need is a report that shows me (for a given time period) the list of the affiliates that have earned commissions, and the amount owed to each of them.
However, the info you supply before is quite useful as well.

Thanks

I was wondering what did you do for your problem? :)

Newbie

Posts

Joined
Fri Jun 08, 2018 4:26 pm

Post by straightlight » Thu Jun 21, 2018 9:37 pm

I did developed an extension for this but not published it on the Marketplace. Send me a PM, if interested.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by oberheimer » Mon Dec 03, 2018 8:10 pm

sazpurua wrote:
Wed Jan 17, 2018 8:45 am
straightlight wrote:
Sat Jan 13, 2018 10:46 pm
in v3.0.2.0 how can I find out all the commissions that have to be paid to the Affiliates?
The report is not in Modules...
There are two distinction on using the term all in this case. Either you are talking about all the commissions of each regrouped orders to find out all commissions or you are looking for all totals of each affiliates that needs to be owned within the reports. Assuming you are talking about the first one,
Thanks for your reply!
Actually what I need is a report that shows me (for a given time period) the list of the affiliates that have earned commissions, and the amount owed to each of them.
However, the info you supply before is quite useful as well.

Thanks
Did you find this?
I can't seem to find it in opencart and that is pretty bad if you have no clue what the affiliates earn

New member

Posts

Joined
Fri Jun 22, 2012 5:28 am
Who is online

Users browsing this forum: No registered users and 420 guests