Page 1 of 1

Control display of ConLib

Posted: Thu Jun 25, 2009 8:03 am
by ThinkNoodle
Hi

I want to display a conlib if the shopping basket is not empty. I want to control the display from within a scriplet depending on the basket being not empty. What is the nvelocity variable I can use for this?

Thanks

Re: Control display of ConLib

Posted: Thu Jun 25, 2009 8:15 am
by mazhar
Try following code block where you need to put your conlib between if statement

Code: Select all

#if($customer.Basket.Items.Count() > 0)
[[ConLib:YourControlName]]
#end

Re: Control display of ConLib

Posted: Thu Jun 25, 2009 9:53 am
by ThinkNoodle
That's great many thanks.

I notice you need to have this in the same area as the mini basket (right hand bar) to work, if I place the conlib in another area, for example left hand bar, (effectively before the basket) then there is an error in the basket on checkout, I've seen something like this before... there was a fix issued, something to do with "elastic banding"? if I remember rightly.

Cheers

Matt