Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Credit Card Batch Report


laemmle

Recommended Posts

I was wondering if anyone has been using the "Credit Card Batch Report" contrib?:

 

Link to Contribution: http://www.oscommerce.com/community/contributions,4578

 

It's a fairly decent and easy contrib that shows how much $$ is sold per Credit Card Class (i.e. Visa, Mastercard, etc)

 

I wish to update the contrib a bit, to have it breakdown items a little more. Would love to have it list seperately per Credit Card Type:

 

Tax

Shipping

 

It just currently lists the totals(i.e Visa = $1400), it would be nice to break it down more.

Link to comment
Share on other sites

  • 2 months later...

I am trying to use this contrib with ot discount code contrib. When I run the batch contrib, it is not showing the total of the order. Instead is showing the discount (i.e. $1.40).

 

Can someone explain to me how this script is gathering the totals it records?

 

Another problem:

The ccbr contrib is recording the correct credit card, but on the right card subtotals is not showing the credit card total.

Link to comment
Share on other sites

I am trying to use this contrib with ot discount code contrib. When I run the batch contrib, it is not showing the total of the order. Instead is showing the discount (i.e. $1.40).

 

Can someone explain to me how this script is gathering the totals it records?

 

Another problem:

The ccbr contrib is recording the correct credit card, but on the right card subtotals is not showing the credit card total.

Currently the customers order report calculates the totals by looking through all the customer's orders and adding up the prices of each item in the order, multiplied by the number of items.

 

What the Customers Order report should use is the subtotal of the products minus any discounts. There must be some kind of formula that will calculate the totals based off of the subtotals in the orders_total.

 

Any fix for the right card subtotals problem?

Link to comment
Share on other sites

I am trying to use this contrib with ot discount code contrib. When I run the batch contrib, it is not showing the total of the order. Instead is showing the discount (i.e. $1.40).

 

Can someone explain to me how this script is gathering the totals it records?

 

Another problem:

The ccbr contrib is recording the correct credit card, but on the right card subtotals is not showing the credit card total.

 

 

Currently the customers order report calculates the totals by looking through all the customer's orders and adding up the prices of each item in the order, multiplied by the number of items.

 

What the Customers Order report should use is the subtotal of the products minus any discounts. There must be some kind of formula that will calculate the totals based off of the subtotals in the orders_total.

 

Any fix for the right card subtotals problem?

Link to comment
Share on other sites

Another problem:

The ccbr contrib is recording the correct credit card, but on the right card subtotals is not showing the credit card total.

This appears to be working properly now.

 

I am trying to use this contrib with ot discount code contrib. When I run the batch contrib, it is not showing the total of the order. Instead is showing the discount (i.e. $1.40).

 

Can someone explain to me how this script is gathering the totals it records?

With more testing here is what is happening:

 

The credit card batch report is adding the subtotals of both credit cards and cash orders properly if there is no discount. However, if there is a discount, it is showing the discount amount (the 10% discount) instead of the subtoal of the order.

 

All my other reports show the subtotals properly, so it is not an ot discount contrib problem. It has to be a problem with credit card batch report contrib. Somehow how it is pulling subtotals must not be by subtotal code, but location of totals on the page or something like that.

 

Any idea of how to fix this? I have added the code where I think it is gathering the subtotal data.

 

 

ALSO:

There is an inherent flaw with this contrib anyways. Why is it grabbing subtotals anyways? It shoudl be gathering Grand Totals. If you are going to compare credit card totals (and cash totals) from oscommerce with actual credit card transactions and deposits, then you would want grand totals.

 

Anyone know how to change the code in credit card batch report contrib to grab grand totals instead of subtotals?

Link to comment
Share on other sites

This appears to be working properly now.

With more testing here is what is happening:

 

The credit card batch report is adding the subtotals of both credit cards and cash orders properly if there is no discount. However, if there is a discount, it is showing the discount amount (the 10% discount) instead of the subtoal of the order.

 

All my other reports show the subtotals properly, so it is not an ot discount contrib problem. It has to be a problem with credit card batch report contrib. Somehow how it is pulling subtotals must not be by subtotal code, but location of totals on the page or something like that.

 

Any idea of how to fix this? I have added the code where I think it is gathering the subtotal data.

ALSO:

There is an inherent flaw with this contrib anyways. Why is it grabbing subtotals anyways? It shoudl be gathering Grand Totals. If you are going to compare credit card totals (and cash totals) from oscommerce with actual credit card transactions and deposits, then you would want grand totals.

 

Anyone know how to change the code in credit card batch report contrib to grab grand totals instead of subtotals?

 

Forgot to add the code that I believe needs to be changed.

<?php

if (isset($_GET['month']) or isset($_GET['status']) ) {

$batch_query_raw = "select o.customers_id, ot.value, ot.title, ot.class, o.date_purchased, o.orders_id, o.cc_type, o.payment_method from ". TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot where " . $os . " o.orders_id = ot.orders_id and o.date_purchased between '" . $date1 . "' and '" . $date2 . "' GROUP BY o.orders_id ORDER BY o.date_purchased DESC ";

} else {

$batch_query_raw = "select o.customers_id, ot.value, ot.title, ot.class, o.date_purchased, o.orders_id, o.cc_type, o.payment_method from ". TABLE_ORDERS . " o, " . TABLE_ORDERS_TOTAL . " ot where " . $os . " o.orders_id = ot.orders_id GROUP BY o.orders_id ORDER BY o.date_purchased DESC ";

}

Link to comment
Share on other sites

Forgot to add the code that I believe needs to be changed.

After more testing here is what I have come up with.

 

The stats_batch_report.php file does the totals properly including orders with discounts. The cc_card_report.php does not work properly.

 

But here is a problem with it.

 

The Start and End date feature is not working properly (or how I would think it should work).

If you want the totals for today's date (the same day that the sales took place) , the Start date must be today and the End date must be tomorrow.

i.e. Todays date is 1/4/07 so enter 1/4/07 start 1/5/07 end

 

If you have the Start and End date the same, it will not show any totals.

i.e. Todays date is 1/4/07 so enter 1/4/07 start 1/4/07 end no totals shown

 

Not sure what happens if you run the report a few days later.

i.e. if it is 1/5/07 and you want 1/4/07 totals. If you put 1/4/07 start and 1/5/07 end, will you get the sales of 1/5/07 also? I assume not.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...