Products Module - URL Slug

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Locked
gnegne74
Forum Members
Forum Members
Posts: 11
Joined: Wed May 10, 2017 12:01 pm

Products Module - URL Slug

Post by gnegne74 »

Hello to all, I'm using Products module 2.28.4 on cmsms 2.2.7
I'm tryin to use URL SLug Template but I' have some issues.
I set hierarchy and category for each item.
It works if I insert:
- {$name}
- {$hierarchy}/{$name}
- {$hierarchy3}/{$name}
and similar....
but If I use
- {$first_category}/{$name} : only "Name" part is filled.
- {$first_category} : the URL Slug remain empty, it seems doesn't catch that data in any manner
or
{$category_parts[0]}/{$name} : I get an error "Undefined offset"
How can I put category name into URL Slug?
i'm driving nuts!
thank you for support
User avatar
Rolf
Dev Team Member
Dev Team Member
Posts: 7825
Joined: Wed Apr 23, 2008 7:53 am
Location: The Netherlands
Contact:

Re: Products Module - URL Slug

Post by Rolf »

Untested, you should probably need to do something like
{$category_parts[0]['name']}
- + - + - + - + - + - + -
LATEST TUTORIAL AT CMS CAN BE SIMPLE:
Migrating Company Directory module to LISE
- + - + - + - + - + - + -
Image
gnegne74
Forum Members
Forum Members
Posts: 11
Joined: Wed May 10, 2017 12:01 pm

Re: Products Module - URL Slug

Post by gnegne74 »

Thanks but it doesn't works.
After some test I've noticed that issue is related to "category" field. Syntax seems ok.
If I write
{$hier_parts[1]}
I catch the expected sublevel of the first hierarchy item (i.e. subcategory1, child of category1)

If I apply the same syntax logic to
$category_parts
and I write
{$category_parts[0]} or {$category_parts[1]}
I get an error.

Trying with
$first_category
(that variable is not an array) I get an empty value.
{$first_category}/{$name} -> returns only "name"

It's very strange. I've seen this behaviour in previous versions too.

Anyone use in right mode URL Slug with category name?
gnegne74
Forum Members
Forum Members
Posts: 11
Joined: Wed May 10, 2017 12:01 pm

Re: Products Module - URL Slug

Post by gnegne74 »

Does anybody have a solution? Or a working example?
gnegne74
Forum Members
Forum Members
Posts: 11
Joined: Wed May 10, 2017 12:01 pm

Re: Products Module - URL Slug

Post by gnegne74 »

Maybe I've found a code error into action.admin_ajax_getslug.php on row 78:
there's a variable array $callcats, but in other row is referred as $allcats (without initial "c"). It's a typo?
Unfortunately after doing a correction the URL slug still doesn't work
Locked

Return to “Modules/Add-Ons”