User attributes problem

This is a FORK of the CMS Made Simple project and is not oficially supported in any way by the CMS Made Simple development team.
Elli
Forum Members
Forum Members
Posts: 25
Joined: Thu Mar 27, 2008 3:32 pm

Re: User attributes problem

Post by Elli »

I meen user attributes of course... sorry.

That code {items|print_r}  gives only error message.
alby

Re: User attributes problem

Post by alby »

Elli wrote: I meen user attributes of course... sorry.

That code {items|print_r}  gives only error message.
Strange, post your template, it's:

Code: Select all

{get_template_vars}
{[b][color=red]$[/color][/b]items|print_r}
EDIT: was missing $

Alby
Last edited by alby on Tue Apr 08, 2008 6:44 am, edited 1 time in total.
User avatar
groupewibi
Forum Members
Forum Members
Posts: 35
Joined: Fri Jan 11, 2008 8:02 am
Location: India

Re: User attributes problem

Post by groupewibi »

Hi everybody,

I have test to put

Code: Select all

{items|print_r}
but it display nothing.
I have test also with {$items|print_r}. In this case, the result is "1".

I working also with MLE and Cataloger 0.7.
But i have a issue. I don't exactly understand the logic behind cataloger.
There is no explanation for that in all forum and docs available.

For exemple, to display the name of an item (product), and the category associate with (item parent), i have try to look but i don't have any idea.

I don't find also a parameter to display the type of template use (category, article, ..). It can be helpfull if we want to display the category and the product associate and make a loop.

So maybe there is something i have not understood, but it's not clear for me.

So if you have any respond :

- How to display the type of template used (category, article, ...) ?
- How to display the name of the parent category for a item ?

B Regards,
 
alby

Re: User attributes problem

Post by alby »

groupewibi wrote: - How to display the type of template used (category, article, ...) ?
- How to display the name of the parent category for a item ?
I don't use Cataloger (in one site and a simple way only).
You should post a message in Modules/AddOn

Alby
Elli
Forum Members
Forum Members
Posts: 25
Joined: Thu Mar 27, 2008 3:32 pm

Re: User attributes problem

Post by Elli »

Ok tested around and the syntax is {$items|print_r} and now you can see the results http://gsss.gsgroup.fi/gsss/index.php?p ... t&hl=en_US

So there is all the attributes that should be seen in the template, but the user definited wont show... should i try some {$lang} codes in the template... no... they are supposed to come automatic... argh!
Last edited by Elli on Tue Apr 08, 2008 8:06 am, edited 1 time in total.
Elli
Forum Members
Forum Members
Posts: 25
Joined: Thu Mar 27, 2008 3:32 pm

Re: User attributes problem

Post by Elli »

Hi again!

Can't get it to work what ever I try. Does anyone know how to trace the problem?
Ok tested around and the syntax is {$items|print_r} and now you can see the results http://gsss.gsgroup.fi/gsss/index.php?p ... t&hl=en_US
How can I alter the template so I get the [lyhennelma_en_us] / [lyhennelma_fi_fi] user attributes to show in the front page random parameter?

Code: Select all

<div class="catalog_item">
{section name=numloop loop=$items}
<div>
<a href="{$items[numloop].link}"><img src="{$items[numloop].image}" alt="{$items[numloop].title}" align="right"/></a></div>
  <div>
<h3>{$items[numloop].title}</h3>

<p>{$items[numloop].lyhennelma}</p><br />
<a href="{$items[numloop].link}"><img width="150" height="45" src="uploads/images/spacer.gif" alt="" /></a>


{get_template_vars}

</div>

{/section}

</div>

??? ??? ???
alby

Re: User attributes problem

Post by alby »

Elli wrote: Can't get it to work what ever I try. Does anyone know how to trace the problem?
have you tried Cataloger with the installation not MLE.
It may be a bug in module.

Alby
alby

Re: User attributes problem

Post by alby »

[quote="Elli"]
Can't get it to work what ever I try. Does anyone know how to trace the problem?
[quote]

Try with this

Alby
Elli
Forum Members
Forum Members
Posts: 25
Joined: Thu Mar 27, 2008 3:32 pm

Re: User attributes problem

Post by Elli »

Jeah, I have it just like that. Only count is 1...

I'll have to try and install second site and test there, maybe I find the problem. I think there is somewhere an id or what ever that won't recognise the database attribute to be the same one that I want to call because it is called when using the {$items|print_r}. Maybe the sql-dump got screwed somehow.

The worst case would be removing all the items and insert them again one by one.  :'(

Well thanks for all your help!
doolak
New Member
New Member
Posts: 5
Joined: Tue Oct 07, 2008 1:41 pm

Re: User attributes problem

Post by doolak »

Hello there,

any results/solutions about this topic?

I have the same problem with an 1.4.1 MLE / Cataloger 0.7 - installation.

If i use the original template "Item-CSS-based" for the item-page, attributes are not displayed:

Code: Select all

{section name=at loop=$attrlist}
<div class="item_attribute_name">{$attrlist[at].name}:</div>
<div class="item_attribute_val">{eval var=$attrlist[at].key}</div>
{/section}
That will display all the attribute - names, but not the values - so there seems to be a problem with $attrlist[at].key somehow.

So it seems to be not possible to display the user-defined attributes with an array.

On the item-page i used them without an array now - like this:

Code: Select all

<div class="item_attribute_name">{$mle_translation.konzeption}</div>
<div class="item_attribute_val">{$konzeption}</div>
<div class="item_attribute_name">{$mle_translation.industry}</div>
<div class="item_attribute_val">{$industry}</div>
That works without any problem. But of course i can use that only on item-pages...

On the category-page i tried this:

Code: Select all

    {section name=numloop loop=$items}
        <div class="category_item"><a href="{$items[numloop].link}">
<img src="{$items[numloop].image}" title="{$items[numloop].title}" alt="{$items[numloop].title}"/></a><br />
<a href="{$items[numloop].link}">{$items[numloop].title}</a></div>
       <div class="short_description">
            {$items[numloop].konzeption}<br />
            {$items[numloop].industry}
       </div>
    {/section}
That will display title, image and link, but again no user-defined attribute.

Any idea how it could be possible to display user-defined attributes on the category-page?

I used Cataloger in an installation without MLE - there it works without any problems.

Except this problem i am very happy with MLE and the Cataloger MLE - great work!
alby

Re: User attributes problem

Post by alby »

doolak wrote: any results/solutions about this topic?
Look in new child forum

Alby
Last edited by alby on Wed Oct 08, 2008 7:04 am, edited 1 time in total.
doolak
New Member
New Member
Posts: 5
Joined: Tue Oct 07, 2008 1:41 pm

Re: User attributes problem

Post by doolak »

Hello Alby,

i forget to mention that i already used the 0.7 patch for cataloger in the above examples...

I had a look at the sticky post and tried the patch you have posted there. But it seems to be the same patch like i downloaded before - the problem with the user-defined attributes is still the same.

Then i read what you wrote about hematec's patch and i added his changed function getCatalogItemsList in the Cataloger.module.php of your patch.

Now the problem with the user-defined attributes seems to be solved - maybe you have to add that changed function to your patch?

Many thanks for the great work! MLE saved my life in a current project.
alby

Re: User attributes problem

Post by alby »

doolak wrote: i forget to mention that i already used the 0.7 patch for cataloger in the above examples...
No, here the patch is more different and it's similar to hematec (but not same).
I have tested and works well.
I have not tested recent and random action

Alby
Locked

Return to “[locked] CMSMS MLE fork”