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.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 31 2025 06:13:26
Script start
Timing: Jan 31 2025 06:13:26
Module start 'layout'
Timing: Jan 31 2025 06:13:26
Module start 'content'
Timing: Jan 31 2025 06:13:26
Module end 'content'
Timing: Jan 31 2025 06:13:26
Script end

Main resources:

Total runtime0.0163 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 588.1250151.2109
Module start 'layout' 0.00510.0026 739.335936.6484
Module start 'content' 0.00770.0072 775.984498.2500
Module end 'content' 0.01490.0014 874.234437.9922
Script end 0.0163  912.2266 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002414.5982140.0002
Check MTime0.00116.6665140.0001
Mysql Total
Database connection0.00063.982610.0006
Mysqli_queries0.002414.567530.0008
Looping result0.00000.061410.0000
Template Total0.00106.410.0010
Template load0.00084.797910.0008
Template processing0.00031.550110.0003
Override
Cache load0.00063.431910.0006
General
dbfile0.003319.926480.0004
String conversion0.00000.048240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs