tploumis Posted March 31, 2014 Share Posted March 31, 2014 Hi, i would like to ask where exactly i can edit the output of the All In one Shipping module, what i want to do, is NOT show the price next to the available shipping methods names ( it comes as (price)(method name), i want only the name of each shipping method to be shown in my cart ) Thank you in advance Quote Link to comment Share on other sites More sharing options...
bsmither Posted March 31, 2014 Share Posted March 31, 2014 Depending on your version of CC5, look in the file /classes/cubecart.class.php, near line 1436: $GLOBALS['tax']->exchangeRate($data['value'], (!empty($data['currency'])) ? $data['currency'] : $GLOBALS['config']->get('config', 'default_currency')); $value = array( 'offset' => $offset, 'name' => $data['name'], 'value' => $data['value'], 'tax_id' => $data['tax_id'], ); $shipping_values[] = $value; $data['name'] = empty($data['name']) ? '' : ' ('.$data['name'].')'; $data['desc'] = empty($data['desc']) ? '' : ' ('.$data['desc'].')'; $option = array( 'value' => base64url_encode(json_encode($value)), 'display' => (isset($data['name'])) ? $GLOBALS['tax']->priceFormat($data['value'], true).$data['name'] : $data['desc'] ); Looking at the 'display' line, if this shipping option has a name, then show the price followed by the prepared name. If not, then show the prepared description. N.B. This code is weird. Four lines up, $data['name'] gets set to either a zero-length-string, or the name in parentheses. The point is that it does get set no matter what. Then, in the 'display' line, the test is for being set, which it will always be. Anyway, if you are familiar with PHP, you should be able to figure out what you need to do. If you need instruction, let us know. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.