[Koha] cart button - change or remove

Church, Beverly bchurch at liblime.com
Fri Nov 26 02:42:47 NZDT 2010


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


On Thu, Nov 25, 2010 at 5:29 AM, Elaine Bradtke <eb at efdss.org> wrote:

> We are in the process of fine tuning the OPAC display, and have an
> outside web designer providing a 'skin' in the house style so it
> matches the rest of the Society's web sites.
> Having learned html back in the dark ages, I'm not yet up to speed on
> css.  I'm not even sure which parts are governed by the skin and which
> are internal koha stylesheets.
> Is this spelled out somewhere?
>
> My boss has taken an extreme dislike to the 'cart' button.  He would
> like it removed, or at least called something else (still pondering
> about what to change it to).
> I have experimented with them both, and there seems to be very little
> difference between the cart function and the list function.  Am I
> wrong in this?
>
> Has anyone switched it off, or changed the name of the button?
> --
> 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)
> _______________________________________________
> Koha mailing list  http://koha-community.org
> Koha at lists.katipo.co.nz
> http://lists.katipo.co.nz/mailman/listinfo/koha
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.katipo.co.nz/pipermail/koha/attachments/20101125/283e4f16/attachment-0001.htm 


More information about the Koha mailing list