Kelley,
Thanks for your patch. Leon's integrating it because I don't have any
time, but I thought I'd like to thank you now since it's been two days
since you submitted it.
Cheers,
-jj
"Kelley L.ingerfelt" wrote:
>
> I haven't seen this in the list, so here goes, I have been noticing
> differing taxes and shipping rates, finally realized it was due to the
> way you checked out... If you go out through just plain checkout, the
> totals will be correct, but if you go out through express checkout, the
> Free Shipping and Not Taxable are ignored..
>
> to check this out, set an item up with Free Shipping and Not Taxable,
> then put the item in your basket and go through checkout, the totals
> will be correct... If you repeat the process and go through the Express
> Checkout, the Tax and Shipping will be applied ...
>
> the problem is in actions/SET_ORDER_INFO, it doesn't check the
> attributes for these ... here is a patch, that I believe will fix the
> problem, the added code was basically copied from the SET_SHIPPING_ALL
> file, which does check for the attributes...
>
> the patch was against the 20000825 CVS file:
>
> --- SET_ORDER_INFO.original Thu Aug 31 21:28:05 2000
> +++ SET_ORDER_INFO Thu Aug 31 21:28:05 2000
> @@ -34,6 +34,9 @@
> //ShippingByTotal function
> include(APPLICATION_ROOT . "/modules/include/ShippingByTotal");
>
> + //getVariationID function
> + include(APPLICATION_ROOT .
> "/modules/include/attribute_functions");
> +
> //get credit card validation function
> include(APPLICATION_ROOT . "/modules/include/validateCard");
>
> @@ -188,7 +191,56 @@
> */
> if ($continue)
> {
> - $TotalShipping = ShippingByTotal($Total['Items']);
> +
> + //get total of non-taxable items
> + $tItemCostNonTaxable = 0;
> + $Query = "SELECT s.Quantity, s.ListPrice, s.SalePrice ";
>
> + $Query .= "FROM invoice_sku s, sku_variation v ";
> + $Query .= "WHERE s.SKU = v.SKU ";
> + $Query .= "AND v.Variation = " .
> getVariationID(getAttributeID("Tax"), "Not Taxable") . " ";
> + $Query .= "AND Invoice = " . $UserInfo['Invoice'] . " ";
>
> + $DatabaseResult = mysql_query($Query, $DatabaseLink);
> + while($DatabaseRow = mysql_fetch_row($DatabaseResult))
> + {
> + $tQuantity = $DatabaseRow[0];
> + $tListPrice = $DatabaseRow[1];
> + $tSalePrice = $DatabaseRow[2];
> + $tShipping = $DatabaseRow[3];
> +
> + if($tSalePrice > 0)
> + {
> + $tListPrice = $tSalePrice;
> + }
> +
> + $tItemCostNonTaxable += $tQuantity *
> $tListPrice;
> + }
> +
> +
> + //get total of items with free shipping
> + $tItemCostFreeShipping = 0;
> + $Query = "SELECT s.Quantity, s.ListPrice, s.SalePrice ";
>
> + $Query .= "FROM invoice_sku s, sku_variation v ";
> + $Query .= "WHERE s.SKU = v.SKU ";
> + $Query .= "AND v.Variation = " .
> getVariationID(getAttributeID("Free Shipping"), "Free Shipping") . " ";
> + $Query .= "AND Invoice = " . $UserInfo['Invoice'] . " ";
>
> + $DatabaseResult = mysql_query($Query, $DatabaseLink);
> + while($DatabaseRow = mysql_fetch_row($DatabaseResult))
> + {
> + $tQuantity = $DatabaseRow[0];
> + $tListPrice = $DatabaseRow[1];
> + $tSalePrice = $DatabaseRow[2];
> + $tShipping = $DatabaseRow[3];
> +
> + if($tSalePrice > 0)
> + {
> + $tListPrice = $tSalePrice;
> + }
> +
> + $tItemCostFreeShipping += $tQuantity *
> $tListPrice;
> + }
> +
> +
> + $TotalShipping = ShippingByTotal($Total['Items'] -
> $tItemCostFreeShipping);
>
> //erase previous shipping fees
> $Query = "DELETE FROM invoice_fee ";
> @@ -212,11 +264,11 @@
> list($tax_Rate, $tax_TaxShipping) =
> mysql_fetch_row($DatabaseResult);
> if($tax_TaxShipping == 'Y')
> {
> - $TotalTax = ($Total['Items'] +
> $TotalShipping) * $tax_Rate;
> + $TotalTax = ($Total['Items'] -
> $tItemCostNonTaxable + $TotalShipping) * $tax_Rate;
> }
> else
> {
> - $TotalTax = $Total['Items'] * $tax_Rate;
>
> + $TotalTax = ($Total['Items'] -
> $tItemCostNonTaxable ) * $tax_Rate;
> }
> }
> else
>
> ------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Site: http://www.working-dogs.com/freetrade/
> Problems?: [EMAIL PROTECTED]
--
if (shannon - jj) * behrens == webEngineer["CLEAR INK�"]:
print "<i>imagination is the only real medium(sm)</i><br>"
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Site: http://www.working-dogs.com/freetrade/
Problems?: [EMAIL PROTECTED]