News:

Support the VirtueMart project and become a member

Main Menu

create page based on filtering url

Started by 2cool, March 30, 2021, 09:10:15 AM

Previous topic - Next topic

2cool

Hi, in using a filters plugin which shows products based on this filters.
I can open a filtered page from this generated url but I would like to create a separate page (category) with a title and description + the filtered products.
Does anyone how this can be done? maybe use a template override? Not sure how to modify such category page.

Working with Joomla! 3.9.25 + VirtueMart 3.8.8

Thanks,
Pas

Jörgen

Defining the landingpage for the filterextension. Maybe ? Same principle as defining a category for the VM extension.

Jörgen @ Kreativ Fotografi
Joomla 3.9.18
Virtuemart 3.4.x
Olympiantheme Hera (customized)
This reflects current status when viewing old post.

2cool

Sorry Jörgen,
I don't understand what you mean? can you explain?

right now I have a 'filter url' like //seachresults/?custom_f_31[0]=313435
Would like to have this with title and description in a menu (maybe with a logic url;)

Thanks,
Pas

pinochico

Yes, of course

We use CF4All too.

Look at this: https://www.kolo-park.cz
On right side in slideshow are links for result after filtering products from shop.

Example:
https://www.kolo-park.cz/obchod/prislusenstvi-1/nejnovejsi

This URL you can add to menu, but need define in httacess:
RewriteRule ^obchod/prislusenstvi-1/nejnovejsi https://www.kolo-park.cz/obchod/prislusenstvi-1/radit_podle,datum_vytvoreni?keyword= [L,R=301]

So for you you have to change to

seachresults/?custom_f_31[0]=313435

www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

balai

You need to copy the url and create a menu item of type System Links > URL, with that url as destination.

Is the title and description refers to meta tags or actual/visible elements?

In any case Custom Filters uses the category layout for displaying the results.
If you are using a template with normal template overrides, the category layout file is located in: templates/YOUR TEMPLATE/html/com_virtumart/category/default.php
You should edit that file and either change the meta-tags or add the visual elements you want.

2cool

Thanks,
Indeed add link to menu as sytem link is working but
I want to add a title and description like any vm category page to this.

So guess use a template override should be possible, but i'm not sure if I should modify the template(templates/YOUR TEMPLATE/html/com_virtumart/category/default.php)
or can I set this in template override setting in vm backend?

Regards,
Pas

balai

QuoteSo guess use a template override should be possible, but i'm not sure if I should modify the template(templates/YOUR TEMPLATE/html/com_virtumart/category/default.php)
or can I set this in template override setting in vm backend?

This is not related with the VM backend which btw recognizes and uses the template overrides.
You need to edit the layout and put conditional title/description based on a page or whatever you want.

pinochico

For this we use in www.kolo-park.cz own modul

virtuemart_category_header with two template:
- title of category
- title and description of category

Look at this (Search result from Customfield Search from Breakdesign):
https://www.kolo-park.cz/obchod/kola-a-elektrokola/radit_podle,datum_vytvoreni?keyword=

The modul is putted in position above outside category / search result view in override template.

But if you need add cusotm title and description:
- title you can put from menu item
- description you can add in override template as condition
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

2cool

Yes, this is exactly what I want. Nice site also!
How can this be done? I have only a view so can I create separate templates and modify each in code?

Regards,
Pas

balai

QuoteYes, this is exactly what I want. Nice site also!
In terms of title display, the mentioned site shows the current category name.
This already happens in Custom Filters without any customization.

It also shows the selections as tags/breadcrumbs which can be done through the included CF tags/breadcrumbs module.

2cool

Hi,
I really don't know what you say Balai?
I have filter for colors; if I use the url of this filter option I have no title or description?
So my idea was to use a template overrride and change the template php page thatss used for display filter results and add title and description.
But i'm not sure if possible and how this should be done.


pinochico

I don't understand

The basic info from Custom Filters (balai) in documentation is:
- create new menu item as type Custom Filter Search Result

From this menu you have title without description and every filter results are connected with this menu (not with category shop), of course with similiar view.

But in our shop (www.kolo-park.cz) we don't show this menu item title, then we need custom title and custom description too.

Then we created custom modul == VM category header, with option:
- show only category title from active category
- show category title and category description from active category

The main advantage from this module is, then module is outside from VM category view == above the view with filtering module....


Maybe balai have other info then me?
www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

marvays

Quote from: 2cool on March 30, 2021, 09:10:15 AM
Hi, in using a filters plugin which shows products based on this filters.
I can open a filtered page from this generated url but I would like to create a separate page (category) with a title and description + the filtered products.
Does anyone how this can be done? maybe use a template override? Not sure how to modify such category page.

Working with Joomla! 3.9.25 + VirtueMart 3.8.8

Thanks,
Pas

Hi. I've been working on this for months. And I have no result.
What I've found so far:
I use JoomSEF where I can set up my own 301 redirects. So I create a filter, copy the url and create 301 on a nice sef url
I can set TITLE, Meta Description and much more for this sef url.

Now I'm working on replacing the H1 category name and category description directly on the page with my own h1 name and another description.

I would like to make the H1 name by inserting my own meta tag into the sef url and displaying it instead of the h1 category title. Using the module or articles, I will proceed in the same way to describe the category.
To be able to replace in the code, I will use extensions from Regularlabs.

That's just a theory. I haven't tried it in practice yet, because I don't have a Regularlabs subscription and I can't try it in the free version because they have limitations.

If you have access to Regularlabs, we can join forces and work on it together.

pinochico

www.minijoomla.org  - new portal for Joomla!, Virtuemart and other extensions
XML Easy Feeder - feeds for FB, GMC,.. from products, categories, orders, users, articles, acymailing subscribers and database table
Virtuemart Email Manager - customs email templates
Import products for Virtuemart - from CSV and XML
Rich Snippets - Google Structured Data
VirtueMart Products Extended - Slider with products, show Others bought, Products by CF ID and others filtering products

balai

#14
Quote from: pinochico on April 06, 2021, 10:28:37 AM

Then we created custom modul == VM category header, with option:
- show only category title from active category
- show category title and category description from active category

The main advantage from this module is, then module is outside from VM category view == above the view with filtering module....
Maybe balai have other info then me?

As wrote in my message, what you describe happens without the need for any modification. This is a core feature in Custom Filters.
Beyond that it also updates the meta tags from the active category.
But if anyone wants to print other data, will need coding to the category layout.