First with the CCS option turned on I keep getting this error: "The
address that you are shipping from is invalid. Please send a correct
US address."
The XML seems to be ok, first the city was blank so I tried adding in
the city into the gcheckout.php file, but that didn't work either.
<ship-from id="Store_origin">
<city></city>
<region>OH</region>
<postal-code>43230</postal-code>
<country-code>US</country-code>
</ship-from>
Then I turned that off and noticed the Order Total (handling for under
$50) show up but the value is set to 0 when it shouldn't be. Could the
new version of Google checkout not be loading something that the
module needed before or something?
function process() {
global $order, $currencies;
if (MODULE_ORDER_TOTAL_LOWORDERFEE_LOW_ORDER_FEE == 'true') {
switch (MODULE_ORDER_TOTAL_LOWORDERFEE_DESTINATION) {
case 'national':
if ($order->delivery['country_id'] == STORE_COUNTRY) $pass
= true; break;
case 'international':
if ($order->delivery['country_id'] != STORE_COUNTRY) $pass
= true; break;
case 'both':
$pass = true; break;
default:
$pass = false; break;
}
if ( ($pass == true) && !$order->info['software_order'] &&
( ($order->info['total'] - $order->info['shipping_cost']) <
MODULE_ORDER_TOTAL_LOWORDERFEE_ORDER_UNDER) ) {
$tax =
tep_get_tax_rate(MODULE_ORDER_TOTAL_LOWORDERFEE_TAX_CLASS, $order-
>delivery['country']['id'], $order->delivery['zone_id']);
$tax_description =
tep_get_tax_description(MODULE_ORDER_TOTAL_LOWORDERFEE_TAX_CLASS,
$order->delivery['country']['id'], $order->delivery['zone_id'], $order-
>info['customers_tax_exempt']);
$order->info['tax'] +=
tep_calculate_tax(MODULE_ORDER_TOTAL_LOWORDERFEE_FEE, $tax);
$order->info['tax_groups']["$tax_description"] +=
tep_calculate_tax(MODULE_ORDER_TOTAL_LOWORDERFEE_FEE, $tax);
$order->info['total'] += MODULE_ORDER_TOTAL_LOWORDERFEE_FEE
+ tep_calculate_tax(MODULE_ORDER_TOTAL_LOWORDERFEE_FEE, $tax);
$this->output[] = array('title' => $this->title . ':',
'text' => $currencies-
>format(tep_add_tax(MODULE_ORDER_TOTAL_LOWORDERFEE_FEE, $tax), true,
$order->info['currency'], $order->info['currency_value']),
'value' =>
tep_add_tax(MODULE_ORDER_TOTAL_LOWORDERFEE_FEE, $tax));
}
}
}
Nothing was changed to this OT module and it worked fine for the
previous version of the google checkout mod.
I wonder if something else is wrong with the XML being sent for CCS
and just throwing the shipping from is invalid error. Here's more from
the XML:
<shipping-methods>
<carrier-calculated-shipping>
<carrier-calculated-shipping-options>
<carrier-calculated-shipping-option>
<price currency="USD">10</price>
<shipping-company>UPS</shipping-company>
<shipping-type>Ground</shipping-type>
<carrier-pickup>REGULAR_PICKUP</carrier-pickup>
</carrier-calculated-shipping-option>
<carrier-calculated-shipping-option>
<price currency="USD">20</price>
<shipping-company>UPS</shipping-company>
<shipping-type>2nd Day Air</shipping-type>
<carrier-pickup>REGULAR_PICKUP</carrier-pickup>
</carrier-calculated-shipping-option>
<carrier-calculated-shipping-option>
<price currency="USD">30</price>
<shipping-company>UPS</shipping-company>
<shipping-type>Next Day Air Saver</shipping-type>
<carrier-pickup>REGULAR_PICKUP</carrier-pickup>
</carrier-calculated-shipping-option>
<carrier-calculated-shipping-option>
<price currency="USD">40</price>
<shipping-company>UPS</shipping-company>
<shipping-type>Next Day Air</shipping-type>
<carrier-pickup>REGULAR_PICKUP</carrier-pickup>
</carrier-calculated-shipping-option>
<carrier-calculated-shipping-option>
<price currency="USD">50</price>
<shipping-company>UPS</shipping-company>
<shipping-type>Next Day Air Early AM</shipping-type>
<carrier-pickup>REGULAR_PICKUP</carrier-pickup>
</carrier-calculated-shipping-option>
</carrier-calculated-shipping-options>
<shipping-packages>
<shipping-package>
<ship-from id="Store_origin">
<city></city>
<region>OH</region>
<postal-code>43230</postal-code>
<country-code>US</country-code>
</ship-from>
<width unit="IN" value="1" />
<length unit="IN" value="1" />
<height unit="IN" value="1" />
<delivery-address-category>RESIDENTIAL</delivery-address-
category>
</shipping-package>
</shipping-packages>
</carrier-calculated-shipping>
</shipping-methods>
> --
> .-. --- .--. ..-
> R o p u
On Oct 1, 11:32 am, Ropu <rovagn...@gmail.com> wrote:
> i must check that, but its wokring on my side.
>
> checkhttps://demo.globant.com/~brovagnati/osc_demo2/catalog
> > R o p u- Hide quoted text -
>
> - Show quoted text -
06/20/2007 v1.4 apha (ropu)
...
- Added OT support (low order fees, group discounts and any other
custom OT module)
I modified the code in gcheckout.php as follows:
$Gitem = new GoogleItem($order_total['title'],
'',
'1',
// $currencies->get_value(DEFAULT_CURRENCY)
* $products[$i]['final_price'],
// 'LB', 0);
//// number_format(($amount) * $currencies-
>get_value($my_currency), $currencies-
>get_decimal_places($my_currency))
$currencies->get_value(DEFAULT_CURRENCY) *
$ot_value);
The values for the desired order total modules now display. When I
tested it in sandbox, everything looked ok.
The developer might want to check this for verification