Page 1 of 1

Cataloger 0.2 Module

Posted: Mon May 08, 2006 1:05 am
by mikemcvey
Hi,

I am hoping to use this module but need some help figuring out how to do this...
I have added a custom attribute to the items called - "summary"

I want this to show when I am looking at the catagory level.

So that user can see the
1] title
2] image
3] and summary

Any ideas how I would access this value from the category template?

Any help very appreciated as am pretty stuck on this one!

Re: Cataloger 0.2 Module

Posted: Sat May 13, 2006 9:20 pm
by sjg
This has actually been updated in SVN to support exactly that kind of thing.

The change is in cataloger/action.defaultcategory.php, around line 99. Before the line that contains

Code: Select all

			array_push($categoryItems,$thisItem);
paste in the following code:

Code: Select all

$theseAttrs = $thisPage->getAttrs();
foreach ($theseAttrs as $thisAttr)
{
$safeattr = strtolower(preg_replace('/\W/','',$thisAttr));
				$thisItem[$thisAttr] = $thisPage->GetPropertyValue($thisAttr);
}
You'll also need to add the attribute tag of your summary to your category template.

Keep in mind that this change imposes an overhead when displaying category pages, and can result in more database queries. But then, Cataloger is not a very efficient module, database-wise.

Re: Cataloger 0.2 Module

Posted: Sun May 14, 2006 7:39 am
by mikemcvey
Awesome... thanks!

Re: Cataloger 0.2 Module

Posted: Sat May 27, 2006 10:30 pm
by HMTKSteve
I could not find the line in my file...

I'm using cataloger 0.4.1

Re: Cataloger 0.2 Module

Posted: Sun May 28, 2006 12:10 am
by sjg
No need to add it!

It's already built in to Cataloger 0.4.1

___Samuel___

Re: Cataloger 0.2 Module

Posted: Sun May 28, 2006 10:18 am
by HMTKSteve
I posted a question about this in a different forum http://forum.cmsmadesimple.org/index.ph ... 834.0.html and I have not been able to pull the values from the db to make it work.

Thanks!

Re: Cataloger 0.2 Module

Posted: Sun May 28, 2006 9:18 pm
by sjg
Doh!

The code posted here has the same bug as is in Cataloger 0.4.1 as well.

It should be

Code: Select all

{
$safeattr = strtolower(preg_replace('/\W/','',$thisAttr));
$thisItem[$safeattr] = $thisPage->GetPropertyValue($thisAttr);
}
I'll patch that, and release 0.4.2.

That way, the attribute will properly be the attribute name all lower cased and with only alphanumerics.

Sorry 'bout that.

___Samuel___

Re: Cataloger 0.2 Module

Posted: Mon Jun 05, 2006 12:21 am
by HMTKSteve
I'm getting a lot of use out of cataloger but I have a question...

I'm using the table layout to list game reviews and their pertinent information (http://www.thedicetower.com/thedicetower) but I was wondering if there is any easy way to allow the user to resort the catalog entries based on the Item Attributes I have addedd to each item?

For example we list publisher, designer and rating for each game. Currently the catalog lists all the reviews alphabeticaly but I would love for the user to be able to resort the displayed listing by product attribute.

If this is already possible, could you help me out?

Thanks!

Re: Cataloger 0.2 Module

Posted: Tue Jun 06, 2006 3:16 am
by sjg
Unfortunately, sorting by attribute is not (yet) possible.

The other thing that I'm facing when working on my own site that uses Cataloger, is that if you have a menu that shows the child pages of a catalog section page, the menu does not re-order according to the ordering selected for the catalog section page. In other words, my catalpg section page displays the items alphabetically, but the menu still shows them in the hierarchy order.

I'm trying to think of the best way to approach this in order to make it make the most sense to the user.

If you have any suggestions, I'd love to hear them. Obviously, they'd also apply to other sort orders as they get added.

Thanks,
___Samuel___

Re: Cataloger 0.2 Module

Posted: Thu Jun 08, 2006 5:12 pm
by HMTKSteve

Re: Cataloger 0.2 Module

Posted: Sat Sep 09, 2006 5:48 pm
by climberusa
You'll also need to add the attribute tag of your summary to your category template.
Can someone explain the code I need to place in my category template to display item attributes at that level? I've added the code to my module and i couldn't figure it out. I even downloaded then latest version of cataloger and still have had no success. Can I just access the attributes like {$attribute} or am I missing something????