google-code-export / google-checkout-oscommerce

Automatically exported from code.google.com/p/google-checkout-oscommerce
1 stars 0 forks source link

Cannot save the Merchant Calculated Shipping Configuration default values on admin interface (admin/gc_dashboard.php) #108

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set the Merchant Calculated Shipping option's default values from admin 
console.
2.
3.

What is the expected output? What do you see instead?
The Merchant Calculated Shipping options default values are not saved in 
database instead it is replaced by 1.

What version of the product are you using? On what operating system?
v1.5_rc1 on debian 5.0.5

Please provide any additional information below.
To fix these issue i suggest the following changes
Edit the file 
catalog/googlecheckout/library/configuration/merchant_calculated_shipping_option
.php
1) On line number 158 and 162 replace 'hid_' by 'hidden_'.

2) add the following line after line no 138

                $input .= ' value="' . $key .  '_VD:' . $value . '"';

Original issue reported on code.google.com by sawa...@gmail.com on 10 Sep 2010 at 6:11

GoogleCodeExporter commented 9 years ago
To get these default values sent to google I needed to modify the following in 
gcheckout.php

I changed this:

$default_value = gc_compare($module_info[$key]['code'].$method . $type 
,$key_values);
$shipping_price = $currencies->get_value(DEFAULT_CURRENCY) * $default_value;

To this:

$merchant_calculated_shipping_configuration = 
gc_get_configuration_value($config->merchantCalculatedShipping());
$merchants_config = explode(', ', $merchant_calculated_shipping_configuration);
$default_value = gc_compare($module_info[$key]['code'].$method . $type 
,$merchants_config);
$shipping_price = $currencies->get_value(DEFAULT_CURRENCY) * $default_value;

Original comment by clickcon...@gmail.com on 11 Feb 2012 at 5:32