Page 1 of 2

[vQmod] Change "Cart" to "Basket"

Posted: Fri Sep 16, 2011 8:37 pm
by iain_darkflare
Had a quick search and couldn't find another vQmod for this change, I've just started using vQmod, but thought I'd share this one. Client requested I changed all instances of "Cart" to "Basket".

So, this XML changes all headings, notifications, buttons, etc. from "Cart" to "Basket".

It's basic, but hopefully it will save you some time if you need it.

Enjoy :)

Re: [vQmod] Change "Cart" to "Basket"

Posted: Fri Sep 23, 2011 9:22 am
by Degsey
Great addition!

However it does not do everything from cart to basket.

You missed the breadcrumb at checkout, it still states shopping cart.

Re: [vQmod] Change "Cart" to "Basket"

Posted: Fri Sep 23, 2011 8:24 pm
by iain_darkflare
Good catch. I've updated the XML file.

Re: [vQmod] Change "Cart" to "Basket"

Posted: Tue Mar 13, 2012 6:08 pm
by Out2lunch
This is an awsome mod, any chance for a fix for the new ver of Open cart 1.5.2x...


Cheers...

:laugh:

Re: [vQmod] Change "Cart" to "Basket"

Posted: Thu Mar 15, 2012 5:28 am
by iain_darkflare
Sorry I didn't realise that there was a new version realeased this month. I'll be back working on OpenCart sites within the next week or two. Until then I'm afraid I won't have the time to update this.

That said it should just be a case of finding out which additional files needed edited and adding them to the XML file.

I'll update this thread as soon as I get a chance to update the file myself.

Re: [vQmod] Change "Cart" to "Basket"

Posted: Thu Mar 15, 2012 11:41 pm
by Out2lunch
I have updated this mod from the original source, I take no credit for this module, I just updated it for 1.5.2x.

I have PM'd iain_darkflare to ask him if its ok to publish, hes not said yes or no, so im gonna stick this up here, and it will remain unless he decides otherwise.

This is a basic Text Conversion of Cart to Basket - Opencart Ver 1.5.2x





Re: [vQmod] Change "Cart" to "Basket"

Posted: Fri Mar 16, 2012 1:44 am
by iain_darkflare
That's fine by me, thanks for taking the time to update it. :)

Hopefully it will help out a few folk!

Re: [vQmod] Change "Cart" to "Basket"

Posted: Fri Apr 13, 2012 7:41 pm
by glennjamo
hi
great addition, thanks. im new to opencart, what exactly do i do with xml file?

thanks
glenn

Re: [vQmod] Change "Cart" to "Basket"

Posted: Fri Apr 13, 2012 7:49 pm
by iain_darkflare
Here is the most up to date version for OpenCart 1.5.2.

The site I am currently working on required the change to "Bag" instead of "Basket" so that is the file I have attached. You can change "Bag" to anything you like by doing a search and replace in your text editor.

I noticed a missed element in the breadcrumb trail that was different for the checkout page so have added that!

Thanks to

Out2Lunch for his work on the update!

Re: [vQmod] Change "Cart" to "Basket"

Posted: Fri Apr 13, 2012 7:49 pm
by iain_darkflare
glennjamo wrote:hi
great addition, thanks. im new to opencart, what exactly do i do with xml file?

thanks
glenn
Hi Glenn, it's probably best explained in this thread: http://forum.opencart.com/viewtopic.php?f=23&t=40987

Re: [vQmod] Change "Cart" to "Basket"

Posted: Fri Apr 13, 2012 7:58 pm
by glennjamo
Hi Iain

worked like a charm! brilliant thanks for the speedy response.

Cheers

Re: [vQmod] Change "Cart" to "Basket"

Posted: Mon Jul 02, 2012 2:18 am
by Vaccoda
Will the most recent update of this work on version 1.5.3.1?

Re: [vQmod] Change "Cart" to "Basket"

Posted: Mon Jul 02, 2012 6:54 am
by JAY6390
Great little free vQmod. Save's having to edit multiple language files with each upgrade :) Nice work. You could of course be really cheeky and convert the text on the fly via the language loading, using preg_replace to search replace (see attached)

Re: [vQmod] Change "Cart" to "Basket"

Posted: Fri Oct 11, 2013 3:30 am
by timparnell
Hi, I've just made a few mods to make this work with v1.5.6.
I didn't realise this had been superceded by the preg match.
As I've done the work now I may as well put it here if anyone wants it.
I've left Iain's original author credit as he did the original work - so thanks for that and hope that is ok.
Would it be worth making this a choice in core settings?

Re: [vQmod] Change "Cart" to "Basket"

Posted: Thu Apr 10, 2014 7:02 pm
by BodgeIT
Quick question, does this also change the url grub or permalink or whatever you call it?

Re: [vQmod] Change "Cart" to "Basket"

Posted: Thu Apr 10, 2014 8:07 pm
by JAY6390
No, this changes language files. There are extensions on the extension store such as my Route Editor that allow for all the urls to be edited, not just product, category, manufacturer and info pages

Re: [vQmod] Change "Cart" to "Basket"

Posted: Wed May 14, 2014 5:29 am
by barkeyo
Hi, I understand that this VQMod is provided on an 'as is' basis, but thought it would save me a little bit of hassle in switching to the use of the "basket" phrase. ;) Unfortunately neither of the versions provided in this thread quite work the way I'd hoped with OC 1.5.6.4 and the default theme :(

The original version, latterly modified by timparnell, works like a charm in switching all the cart references to basket, but also seems to have the side effect of preventing the real time updating of the (mini) basket in the header and display of basket modification notifications, when you hit an 'add to basket' button. The basket does actually update, but you need to refresh (or navigate to another page) to see it take effect.

The version provided by jay6390 is brilliantly simple in it's execution, short and sweet and remarkably effective. However its one single downside is that it doesn't respect case sensitivity of the word 'cart' when replacing with 'Basket', i.e. all 'cart' and 'Cart' references become 'Basket'. Which means that in a sentence where 'shopping cart' was used, it now becomes 'shopping Basket'.

Any ideas or suggestions would be massively appreciated.

Thanks.

Re: [vQmod] Change "Cart" to "Basket"

Posted: Wed May 14, 2014 5:06 pm
by JAY6390
That's pretty easy to do. See attached

Re: [vQmod] Change "Cart" to "Basket"

Posted: Wed May 14, 2014 5:17 pm
by barkeyo
@ jay6390, brilliant! thank you very much for the tweak. just makes it a perfect mod for a UK store.

Re: [vQmod] Change "Cart" to "Basket"

Posted: Tue Sep 02, 2014 4:54 am
by barkeyo
Hi Jay,

I've run into a minor problem with the VQMod you so kindly provided, and I was wondering whether you could provide some pointers as to how to resolve. I recently purchased the 'SEO Friendly URLS' extension from iNmuto, and it doesn't seem to play nicely with the 'Cart to Basket' mod :( . I got in touch with iNmuto to try and figure out what was happening, and fortunately he seems to have diagnosed it. I've therefore detailed the explanation he provided below, and his suggestions to remedy it, but I thought I'd check with you first to see if there is any way to amend the 'Cart to Basket' mod and avoid having to hack the core files.
I've been looking at the Cart to Basket mod you sent me.

At first, I was quite sceptical that it would cause the issue. Until I installed it on my test site and that showed similar results.

After a little digging around, I traced it to the fact that the SEO Keyword extension uses an array stored in a language file and Jay's extension changes cart to basket in ALL language files. It therefore changed the SEO Keyword one too.

The extension relies on this being 'cart' instead of 'basket' therefore the Jay mod will just break it.

My only suggestion is that you stop using Jay's mod and manually change all the 'cart' to 'basket' in the language files.

I've searched the default OpenCart 1.5.6.4 code and have found 18 instances in 12 different files that need changing.

I've attached a file that lists them all.

Please note that you only need to change the word 'cart' to 'basket' in the right hand side of the equal sign. For example:
/catalog/language/english/information/sitemap.php:$_['text_cart'] = 'Shopping Cart';
change the 'Shopping Cart' to 'Shopping Basket', but do NOT change 'text_cart' to 'text_basket' as it's the name of a variable (that is what was happening when using Jay's vqmod with the SEO extension).

Sorry I couldn't fix it so that both work.

Kind regards,
iNmuto
I appreciate that your revised 'Cart to Basket' mod was provided FOC to me, so if the most reasonable option for me is to hack the files as iNmuto suggest, then just let me know.

Many thanks