7 replies [Last post]
dimon_td's picture
Offline
Joined: 10/16/2007
Juice: 52
Was this information Helpful?

I have an uc_block on my site, but I want that cart always be closed, and don't show products...
Or help, how can I set by default my cart-block to be closed.. because by default it always is open!
Sorry for my English!

dimon_td's picture
Offline
Joined: 10/16/2007
Juice: 52
Re: uc_cart - HELP!

Anybody know how can I solve my problem

Mariano's picture
Offline
Joined: 09/04/2007
Juice: 110
Re: Re: uc_cart - HELP!

Perhaps you could try at admin/build/block/configure/uc_cart/0.
You may find that link at admin/store/settings/cart/edit/block.
Play around with the various settings.

Check "Hide this block by default but let individual users show it." and "Hide block if cart is empty.".

Hope that helps.

dimon_td's picture
Offline
Joined: 10/16/2007
Juice: 52
Re: Re: Re: uc_cart - HELP!

No, you don't understand me.
I want that the cart-block was like on that picture below.
I mean cart ALWAYS is closed, and the users can't open it! How can I realize this???

AttachmentSize
cart.JPG 4.35 KB
Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
Re: Re: Re: Re: uc_cart - HELP!

If you don't mind losing the cart icon, you can set it to be collapsed by default and set the block's title manually to "Shopping Cart". This will override the images. The contents are hidden with JS, though, so anyone browsing your site with JS off will still see the contents. The only way around that totally is to override it in your theme.

dimon_td's picture
Offline
Joined: 10/16/2007
Juice: 52
Re: Re: Re: Re: Re: uc_cart - HELP!

Oh, I understand now how it can be realized...
You only need to find a uc_cart_block.js and here find next:
if (expanded_block == false)"
and change "false" on "true"

Then you need to find in this file next code:

/**
* Toggle the shopping cart block open and closed.
*/
function cart_toggle(uc_cart_path) {
  $('#block-cart-contents').toggle();

  isrc = $('#block-cart-title-arrow').attr('src');
  if (isrc.toLowerCase().match("up") != null) {
    $('#block-cart-title-arrow').attr('src', uc_cart_path + '/images/bullet-arrow-down.gif');
  }
  else {
    $('#block-cart-title-arrow').attr('src', uc_cart_path + '/images/bullet-arrow-up.gif');
  }
}                                                                            

And DELETE IT...

Done, I have an uc_cart-block, that user can't open! =)

alien73's picture
Offline
Bug Finder
Joined: 11/10/2007
Juice: 450
Re: Re: Re: Re: Re: Re: uc_cart - HELP!

umm... I'm using the zen theme that I modified and my cart block isn't showing the cart image or the collapsible features?

Any ideas?

bwv
bwv's picture
Offline
Uber DonorBug FinderEarly adopter... addicted to alphas.Spreading the word - Ubercart for president.
Joined: 08/07/2007
Juice: 417
Re: uc_cart - HELP!

You could remove the little arrow that points down, perhaps, so now one will click on it.

(This reminds me of a solution for addressing that pesky check-engine light on your car dash. Just remove the lightbulb and the annoying light will never come on.)