Forums / Setup & design / HideSettings problem

HideSettings problem

Author Message

Saravanan .R

Monday 17 April 2006 11:54:40 pm

Hi All,

I have to hide the two product nodes for a specific dates between 17th April 2006 and 18th April 2006. I have set the Hide Settings in Content.ini with override settings. I have given the settings done in my content.ini.append.php ( override). But its not working.

Please guide me in this reg.

[HideSettings]
RootNodeList[]
RootNodeList[]= 61
RootNodeList[]= 62
HideDateAttributeList[]
HideDateAttributeList[]= 04/18/2006

Thanks

Saravanan.R

Łukasz Serwatka

Tuesday 18 April 2006 12:00:32 am

Hi Saravanan,

Your settings are wrong. HideDateAttributeList[] takes the attribute ID from your content class. So if your product class has attribute ID "hide_date" then use it like:

HideDateAttributeList[]
HideDateAttributeList[]=hide_date

For RootNodeList[] use the parent node id of your products.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Saravanan .R

Tuesday 18 April 2006 2:14:23 am

Hi Serwatka,

Thanks Serwatka. I am confused about the attribute ID and Node Id. I will show my CONTENT Structure and Node Id in my ezPublish.

<i> [-] Products ( Node Id 60 )
[-] Voix ( Node Id 66 ) ( Object Id 65 )
|__# Voix ( Node Id 65 ) ( Object Id 64 )
[-] Black Box ( Node Id 62 ) ( Object Id 60 )
[-] Cube ( Node Id 61 ) ( Object Id 59 )
[-] Contact us ( Node Id 59 ) ( Object Id 57 )
</i>

In above which is attribute ID for my product class ? and what should i give in RootNodeList[] ?

expecting your reply

Thanks in advance

Łukasz Serwatka

Tuesday 18 April 2006 11:13:03 pm

Hi there,

If you want to hide your product at specified date then you need to extend product class with one more attribute (date or datetime datatype).

Go to Setup->Classes then choose Content class group. Edit product class and add one more attribute (Name: Hide date, Identifier: hide_date). Save your changes.

Then put in content.ini.append.php

[HideSettings]
RootNodeList[]
RootNodeList[]= 60
HideDateAttributeList[]
HideDateAttributeList[]=hide_date

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Saravanan .R

Tuesday 18 April 2006 11:53:34 pm

hi Serwa

Thanks Serwa.

I have created an attribute in the product content class. After I was put the settings in content.ini.append.php i have run the runcronjobs.php still that product is visible.

I need to hide the products between two dates.

Saravanan.R

Saravanan .R

Friday 21 April 2006 1:01:37 am

Hi All,

I am not able to find my error... please guide me in this reg. expecting earliest reply.

Regards
Saravanan.R

Łukasz Serwatka

Friday 21 April 2006 1:11:26 am

Did you republish product object with today date for test? Does cronjob run hide.php script? Do you have any errors?

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Saravanan .R

Friday 21 April 2006 2:09:55 am

Hi

thanks for your reply.

I did like that. but i don't get any errors while run the runcronjobs.php. Instead when i was debugging the HIDE.php

    while( true )
    {
        $nodeArray =& $rootNode->subTree( array( 'ClassFilterType' => 'include',
                                                 'ClassFilterArray' => $hideClasses,
                                                 'Offset' => $offset,
                                                 'Limit' => $limit ) );

        if ( !$nodeArray ||
             count( $nodeArray ) == 0 )
        {
            break;
        }

In the file hide.php the $nodeArray returns only 0 thats why it break at this line.