[Koha] cart button - change or remove
Elaine Bradtke
eb at efdss.org
Fri Nov 26 04:56:50 NZDT 2010
Thanks, all your answers are helpful.
I think we may change it rather than disable it.
Elaine
On Thu, Nov 25, 2010 at 3:15 PM, Church, Beverly <bchurch at liblime.com> wrote:
> Jared,
>
> Thanks for the reminder. I forgot that there is a now a preference to
> control its display :)
>
> Bev
>
> * * * *
> Beverly Church
> LibLime Project Manager
>
> phone: 1-888-564-2457 ext. 717
> 1-301-654-8088 ext. 292
> email: bchurch at liblime.com
> skype: beverlychurch
>
>
> On Thu, Nov 25, 2010 at 8:57 AM, Jared Camins-Esakov
> <jcamins at cpbibliography.com> wrote:
>>
>> Elaine, et. al.,
>> If you want to just remove the Cart, you can set the system preference
>> "opacbookbag" in the OPAC tab to "Don't allow."
>> Regards,
>> Jared
>>
>> 2010/11/25 Church, Beverly <bchurch at liblime.com>
>>>
>>> Hi Elaine,
>>>
>>> Here's a script I found which lets you use the system preference
>>> "opacuserjs" to rename the cart function. This script below changes "Cart"
>>> to "Book Bag" but you can use choose any other label:
>>>
>>> $("a.addtocart").text('Add to Book Bag');
>>>
>>> // redefining messages to use "book bag"
>>> MSG_BASKET_EMPTY = _("Your book bag is currently empty");
>>> MSG_RECORD_IN_BASKET = _("This item is already in your book bag");
>>> MSG_RECORD_ADDED = _("This item has been added to your book bag");
>>> MSG_NRECORDS_ADDED = _(" item(s) added to your book bag");
>>> MSG_NRECORDS_IN_BASKET = _("already in your book bag");
>>> MSG_NO_RECORD_ADDED = _("No item was added to your book bag");
>>> MSG_CONFIRM_DEL_BASKET = _("Are you sure you want to empty your book
>>> bag?");
>>>
>>> $(".container > h1:contains('Your Cart')").html("Your Book Bag");
>>> $("span.addto").click( function(){
>>> $("select#addto > option:contains('Cart')").html("Book Bag");
>>> });
>>>
>>> top_button_convert = function() {
>>> basketcount = $("#basketcount").html();
>>> $("#cartmenulink").html(
>>> '<i></i><span><i></i><span></span><img
>>> src="/opac-tmpl/prog/images/cart.gif" width="14" height="14" alt=""
>>> border="0" /> Book Bag<span id="basketcount">' + basketcount +
>>> '</span></span>'
>>> );
>>> };
>>> top_button_convert(); // run once
>>> $("a.addtocart").click( function(){
>>> top_button_convert(); // run on given clicks
>>> });
>>>
>>>
>>> You need to enter the above script between the following beginning and
>>> opening lines:
>>>
>>> $(document).ready(function(){
>>>
>>>
>>> });
>>>
>>>
>>> There may be a way to use Jquery to hide the actual Cart button but I
>>> don't have any scripts that do this.
>>>
>>> Bev
>>>
>>> * * * *
>>> Beverly Church
>>> LibLime Project Manager
>>>
>>> phone: 1-888-564-2457 ext. 717
>>> 1-301-654-8088 ext. 292
>>> email: bchurch at liblime.com
>>> skype: beverlychurch
>>
>> --
>> Jared Camins-Esakov
>> Freelance bibliographer, C & P Bibliography Services, LLC
>> (phone) +1 (917) 727-3445
>> (e-mail) jcamins at cpbibliography.com
>> (web) http://www.cpbibliography.com/
>
>
--
Elaine Bradtke
Data Wrangler
VWML
English Folk Dance and Song Society | http://www.efdss.org
Cecil Sharp House, 2 Regent's Park Road, London NW1 7AY
Tel +44 (0) 20 7485 2206 ext 36
--------------------------------------------------------------------------
Registered Company No. 297142
Charity Registered in England and Wales No. 305999
---------------------------------------------------------------------------
"Writing about music is like dancing about architecture"
--Elvis Costello (Musician magazine No. 60 (October 1983), p. 52)
More information about the Koha
mailing list