Jump to content

Change (Free) text and the order of shipping in dropdown.


Chargin

Recommended Posts

Ive asked this question before, how do I change the (Free) text in the cart for the free shipping option?

The reply I got last time was its in Admin > Languages. But this is the only "free" I can find and it doesnt make any difference.

'misc_free' => "Free"

So how is this done?

Also, how do I change the default selected shipping option, I want to have 2 options, 1 will be free and I dont want it to be the default, I want the paid method to be the default. CC4 tries to select the cheapest freight, but in this case thats not what I want.

Link to comment
Share on other sites

You can change the phrase through the language section in admin:

Languages > en > Global Common Phrases > misc_free

Change the phrase and click the 'Modify Language File' button at the bottom.

If you have tried to edit the file itself you will still need to go into the lang section and the phrase will probably have 'Revert' next to it. Click that then click the 'Modify Language File' button for the changes to take affect.

Shipping is sorted low > high on the file includes/content/cart.inc.php by this code:


function cmp($a, $ { $b=floatval($b['value']); $a=floatval($a['value']); return $a<$b ? -1 : ($a>$b ? 1 : 0); }

usort($Shipping, 'cmp');



Changing it to the following will sort it high > low:



//function cmp($a, $ { $b=floatval($b['value']); $a=floatval($a['value']); return $a<$b ? -1 : ($a>$b ? 1 : 0); }

//usort($Shipping, 'cmp');

rsort($Shipping);

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
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...