Control display of ConLib

Store UI, layout, design, look and feel; Discussion on the customer facing pages of your online store. Cascading Style Sheets, Themes, Scriptlets, NVelocity and the components in the ConLib directory.
Post Reply
ThinkNoodle
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 33
Joined: Fri Oct 10, 2008 7:14 am
Location: UK

Control display of ConLib

Post by ThinkNoodle » Thu Jun 25, 2009 8:03 am

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

User avatar
mazhar
Master Yoda
Master Yoda
Posts: 5084
Joined: Wed Jul 09, 2008 8:21 am
Contact:

Re: Control display of ConLib

Post by mazhar » Thu Jun 25, 2009 8:15 am

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

ThinkNoodle
Lieutenant, Jr. Grade (LT JG)
Lieutenant, Jr. Grade (LT JG)
Posts: 33
Joined: Fri Oct 10, 2008 7:14 am
Location: UK

Re: Control display of ConLib

Post by ThinkNoodle » Thu Jun 25, 2009 9:53 am

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

Post Reply